Get the document associated with a response. #7054
-
My need is the following: I need to associate a document with the retriever's answer, in such a way that I can identify the document in which said answer appears and with that show the document to the user. Any ideas? PS: I'm using Haystack 2.0 A thousand thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @javirenaiss for Generative QA, you can have a look at our tutorial using a RAG pipeline: https://haystack.deepset.ai/tutorials/27_first_rag_pipeline In the result there is not only the generated answer but also the documents that were used to generate that answer. |
Beta Was this translation helpful? Give feedback.
Hello @javirenaiss for Generative QA, you can have a look at our tutorial using a RAG pipeline: https://haystack.deepset.ai/tutorials/27_first_rag_pipeline In the result there is not only the generated answer but also the documents that were used to generate that answer.
As an alternative you could try Extractive QA, for which we have a separate tutorial: https://haystack.deepset.ai/tutorials/34_extractive_qa_pipeline
Both tutorials are specifically for Haystack 2.0