Skip to content

How do I find the source document of the answer from the answer #5347

Answered by anakin87
mc112611 asked this question in Questions
Discussion options

You must be logged in to vote

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:

file_paths = [p for p in Path(doc_dir).glob("**/*")]
files_metadata = [{"name": path.name} for path in file_paths]

indexing_pipeline.run(file_paths=file_paths, meta=files_metadata)

Please let me know if you find a way to solve this problem!

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@mc112611
Comment options

Comment options

You must be logged in to vote
1 reply
@mc112611
Comment options

Comment options

You must be logged in to vote
1 reply
@mc112611
Comment options

Answer selected by mc112611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants