Find answers from the community

Updated 7 months ago

Hello, I have pretty simple doubt that I

Hello, I have pretty simple doubt that I couldnt figure out how to do it. I am building RAG based chatbot using llama index and I created vector store but now I have to add new docs in that vector store. How can I do that?
L
S
7 comments
index.insert(document)
or index.insert_nodes(nodes) if you already parsed into nodes
documents2 will be data from pdf files
documents2 = SimpleDirectoryReader(
input_dir="dir"
).load_data()

parser = SimpleNodeParser.from_defaults()

nodes = parser.get_nodes_from_documents(documents2)

index is existing vector index
index.insert_nodes(nodes)
will this work?
yuo that works!
thanks for the help man.
Add a reply
Sign up and join the conversation on Discord