lfoppiano commited on
Commit
4152778
1 Parent(s): 16cab89

more constraints on the memory

Browse files
Files changed (1) hide show
  1. document_qa/document_qa_engine.py +3 -1
document_qa/document_qa_engine.py CHANGED
@@ -169,7 +169,9 @@ class DocumentQAEngine:
169
  relevant_documents = retriever.get_relevant_documents(query)
170
  if self.memory and len(self.memory.buffer_as_messages) > 0:
171
  relevant_documents.append(
172
- Document(page_content="Following, the previous question and answers, use these information with care:\n{}\n\n".format(self.memory.buffer_as_str))
 
 
173
  )
174
  return relevant_documents
175
 
 
169
  relevant_documents = retriever.get_relevant_documents(query)
170
  if self.memory and len(self.memory.buffer_as_messages) > 0:
171
  relevant_documents.append(
172
+ Document(
173
+ page_content="""Following, the previous question and answers. Use these information only when in the question there are unspecified references:\n{}\n\n""".format(
174
+ self.memory.buffer_as_str))
175
  )
176
  return relevant_documents
177