Find answers from the community

Updated 3 months ago

Add

hey guys, I was working on a rag based chatbot using llamaindex and gpt api. successfully built the chatbot retrieving knowledge from the public documents. now i want to add a feature to it so that when a user uploads their private document, he can ask questions based on that document while also keeping the old indexed documents. my question is how can i combine those documents that I've had with the public documents with the private documents?
W
n
3 comments
You can add new info into existing index using insert method.

Plain Text
documents = private data
for doc in docs: 
    index.insert(doc) 


But I guess you'll have spin up new index for new with public and thier private data as previous one will have first user private data until you delete it
thanks a lot @WhiteFang_Jr will try that and can i get back to you on this thread if i face another issue?
Add a reply
Sign up and join the conversation on Discord