2

I'm modifying the Haystack tutorial notebook to make a basic extractive QA system. Everything works great, but now I want to link each answer back to its original .txt file.

When printing the predicted answers with pprint, each answer has an attribute document_ids that looks like this: 'document_ids': ['c4711696aa2c81c609932143da711ea3']. This helps link back to the right Document object from the DocumentStore, and the Document objects have a 'meta' attribute that looks like the right place to store the original file name.

How can I edit this notebook to save the file name with each Document in the DocumentStore?

ekohrt
  • 41
  • 4
  • Questions on Stack Overflow need to be self-contained, meaning all necessary details need to be included in the post. – AlexK Mar 17 '23 at 07:34
  • 1
    If you want a quick feedback, you can reach the Deepset team and the Haystack community through Github discussions (https://github.com/deepset-ai/haystack/discussions) or Discord (https://haystack.deepset.ai/community) – Stefano Fiorucci - anakin87 Mar 17 '23 at 09:10

0 Answers0