Find answers from the community

Updated 2 months ago

RAG APP

hello.. need some advice here. i,m buildng an app that allows a user to upload pdf documents. llamaindex then indexes the document and stores it into milvus. the app will support one user having multiple different pdf documents. how do i point llamaindex to load the correct vectorindex for a particular document?
W
a
11 comments
Do you want each document to have a unique index for each user?
yeah im thinking of having each document have its own unique index
have you any ideas? my brainblocker is as so:
for each user, there could be 10 documents. when a user performs a query, it should only query that one single document that a user has open instead of performing a query across all the 10 documents
Okay so you can have some sort of dict that can contain index for the particular user and thier index.

User will select the document from which they wants to query

Based on that

{"user_id":[{"document_name": query_engine_instance},{"document_name2": query_engine_instance2}]

}
You can pick the instance based on user ID and document name and answer the query
so basically.. when i do this..
pdfReader = download_loader("PDFReader") loader = pdfReader() documents = loader.load_data(file) storage_context = StorageContext.from_defaults(vector_store=vector_store) index = VectorStoreIndex.from_documents( documents, storage_context=storage_context)

we have to add the userid and document_id/document_name inside?
thankful for the advice @WhiteFang_Jr , are there any docs you can point me to so that i can delve deeper? πŸ˜„
Not on the above mentioend steps but sharing one document which combines all your different indexes and answers based on the descriptions

https://docs.llamaindex.ai/en/stable/examples/query_engine/RouterQueryEngine.html
thank you @WhiteFang_Jr WhiteFang!
Haha, You seem like man of culture! 😎
Haha, i just dabble..
Add a reply
Sign up and join the conversation on Discord