Find answers from the community

Updated 11 months ago

My Requirement is : When updating RAG,

My Requirement is : When updating RAG, only generate embeddings for newly added documents rather than regenerating embeddings for all documents in chroma db using llamaindex.
W
A
L
4 comments
How are you currently adding new docs?
You can insert new docs using insert method that will only create embedding for the newly inserted docs.

Sample code would look like
Plain Text
docs = newly created documents

for doc in docs:
  index.insert(doc)
Can I remove a doc ?
yes -- index.delete_ref_doc(ref_doc_id)
will delete all nodes associated with that ref doc id
Add a reply
Sign up and join the conversation on Discord