Replies: 1 comment 1 reply
-
Hello @aimlnerd I suggest you add the file path or add least parts of the directory structure that you think is relevant as metadata to the Haystack Documents. In your RAG pipeline, the retrieved documents that are passed to the generator will contain that filepath as metadata and you can add it to the prompt you use just like any other metadata. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There 1000s of .py files from 20 different projects. The directory structure is as follows
What is the best strategy to index/chunk the codes to a vector database (pgvector) so that RAG uses the folder structure (multiple projects and common libaries) while answering the questions? Just dumping 1000s of files in a single root folder does not sound like a good startegy since folder stucture information is lost.
Beta Was this translation helpful? Give feedback.
All reactions