Find answers from the community

Updated last year

My Requirement is : When updating RAG,

At a glance

The community member's requirement is to generate embeddings only for newly added documents when updating RAG, rather than regenerating embeddings for all documents in the Chroma DB using LlamaIndex. In the comments, another community member suggests using the insert method to add new documents, which will only create embeddings for the newly inserted docs. Additionally, the community members discuss how to remove a document from the index using the delete_ref_doc(ref_doc_id) method, which will delete all nodes associated with that reference document ID.

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