Spaces:
Runtime error
Runtime error
Update retrieve.py
#4
by
itbyouri
- opened
- retrieve.py +1 -2
retrieve.py
CHANGED
@@ -39,8 +39,7 @@ def retrieve_documents_from_collection(query, api_key, qdrant_url, qdrant_api_ke
|
|
39 |
2. Choose the most relevant content (the key content that directly relates to the question) from the retrieved context and use it to generate an answer.
|
40 |
3. Generate a concise, logical answer. When generating the answer, Do Not just list your selections, But rearrange them in context so that they become paragraphs with a natural flow.
|
41 |
4. When you don't have retrieved context for the question or if you have retrieved documents, but their content is irrelevant to the question, you should answer 'I can't find the answer to that question in the material I have'.
|
42 |
-
5.
|
43 |
-
6. At the end of the response provide metadata provided in the relevant docs, For example:"Metadata: page: 19, source: /content/OCR_RSCA/Analyse docs JVB + mails et convention FOOT INNOVATION.pdf'. Return just the page and source. Provide a list of all the metadata found in the relevant content formatted as bullets
|
44 |
# Question:
|
45 |
{question}""",
|
46 |
input_variables=["context", "question"]
|
|
|
39 |
2. Choose the most relevant content (the key content that directly relates to the question) from the retrieved context and use it to generate an answer.
|
40 |
3. Generate a concise, logical answer. When generating the answer, Do Not just list your selections, But rearrange them in context so that they become paragraphs with a natural flow.
|
41 |
4. When you don't have retrieved context for the question or if you have retrieved documents, but their content is irrelevant to the question, you should answer 'I can't find the answer to that question in the material I have'.
|
42 |
+
5. At the end of the response provide metadata provided in the relevant docs, For example:"Metadata: page: 19, source: /content/OCR_RSCA/Analyse docs JVB + mails et convention FOOT INNOVATION.pdf'. Return just the page and source. Provide a list of all the metadata found in the relevant content formatted as bullets
|
|
|
43 |
# Question:
|
44 |
{question}""",
|
45 |
input_variables=["context", "question"]
|