-
When the pipeline outputs the final answer, return the file name or metadata of the document where the answer originated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hey @mc112611... |
Beta Was this translation helpful? Give feedback.
-
This old discussion might help you. (If not, please provide the code you used). |
Beta Was this translation helpful? Give feedback.
-
I think Instead, I suggest looking at this example: https://github.com/deepset-ai/haystack/blob/main/examples/basic_qa_pipeline.py Particularly these lines can be useful for you: haystack/examples/basic_qa_pipeline.py Lines 25 to 26 in fd25106 haystack/examples/basic_qa_pipeline.py Line 53 in fd25106 Please let me know if you find a way to solve this problem! |
Beta Was this translation helpful? Give feedback.
I think
convert_files_to_docs
is a bit too magic and does not allow the flexibility you need.Instead, I suggest looking at this example: https://github.com/deepset-ai/haystack/blob/main/examples/basic_qa_pipeline.py
Particularly these lines can be useful for you:
haystack/examples/basic_qa_pipeline.py
Lines 25 to 26 in fd25106
haystack/examples/basic_qa_pipeline.py
Line 53 in fd25106
Please let me know if you find a way to solve this problem!