itbyouri commited on
Commit
9d94482
1 Parent(s): 56ff5bd

Update retrieve.py

Browse files
Files changed (1) hide show
  1. 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. Use five sentences maximum. Keep the answer concise but logical/natural/in-depth.
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"]