lfoppiano commited on
Commit
16cab89
·
1 Parent(s): 258cce5

trying ot harness the model to avoid hallucinating due to the chat memory

Browse files
Files changed (1) hide show
  1. document_qa/document_qa_engine.py +1 -1
document_qa/document_qa_engine.py CHANGED
@@ -169,7 +169,7 @@ 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="Previous conversation:\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(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