Update candidate number
Browse files
app.py
CHANGED
@@ -56,6 +56,7 @@ clear_label = ["清除","清除","Clear"]
|
|
56 |
submit_label = ["提交","提交","Submit"]
|
57 |
|
58 |
threshold = 0.6
|
|
|
59 |
|
60 |
# %%
|
61 |
# helper functions for prompt processing for this LLM
|
@@ -119,7 +120,7 @@ def answer(input_text,context=None):
|
|
119 |
|
120 |
# helper function for RAG
|
121 |
def helper_rag(text):
|
122 |
-
docs_out = vectordb.similarity_search_with_relevance_scores(text,k=
|
123 |
#docs_out = vectordb.max_marginal_relevance_search(text,k=5,fetch_k = 20, lambda_mult = 0.5)
|
124 |
context = []
|
125 |
for doc in docs_out:
|
|
|
56 |
submit_label = ["提交","提交","Submit"]
|
57 |
|
58 |
threshold = 0.6
|
59 |
+
candidate = 1
|
60 |
|
61 |
# %%
|
62 |
# helper functions for prompt processing for this LLM
|
|
|
120 |
|
121 |
# helper function for RAG
|
122 |
def helper_rag(text):
|
123 |
+
docs_out = vectordb.similarity_search_with_relevance_scores(text,k=candidate)
|
124 |
#docs_out = vectordb.max_marginal_relevance_search(text,k=5,fetch_k = 20, lambda_mult = 0.5)
|
125 |
context = []
|
126 |
for doc in docs_out:
|