Asking questions to a Specific Documents #430
Replies: 3 comments
-
The best way is to include the doc id in the metadata during ingestion. You can use the Some pointers for you to take a look -- https://github.com/langroid/langroid/blob/main/examples/docqa/filter-multi-doc-auto.py https://github.com/langroid/langroid/blob/main/langroid/agent/special/doc_chat_agent.py#L939 A pre-defined Filtered rag is available if you use lancedb, see this example https://github.com/langroid/langroid/blob/main/examples/docqa/lance-rag-movies.py https://github.com/langroid/langroid/blob/main/langroid/agent/special/lance_rag/lance_rag_task.py |
Beta Was this translation helpful? Give feedback.
-
@sandeepanprime I made another example script closer to what you're looking for: |
Beta Was this translation helpful? Give feedback.
-
Thank you Prasad. Will try and let you know. Exactly what I was looking for |
Beta Was this translation helpful? Give feedback.
-
Hi,
We have a use case where we have got large documents running into 500+ pages. Let's say we have 10 of them for simplicity (Doc1, Doc2,..., Doc10). Now when a question comes, the question comes along with the document ID (DocN). How do I use Langroid to run the RAG only on that document? I want to be able to ingest all the documents but run question (query) only on a specific document.
Beta Was this translation helpful? Give feedback.
All reactions