Find answers from the community

Updated 11 months ago

Hey, a basic question here -- When

Hey, a basic question here -- When storing to any index, is it recommended to store nodes or documents? Does it make any difference? (Consider documents are tiny and won't create multiple nodes)
R
1 comment
It's recommended to use nodes for indices, as they wrap more info like relationships between nodes in documents, more metadata etc.
Also if you directly use documents to create the vectorstoreindex, then there's a chance of getting an error of exceeding context limit of the embedding model.

So for vectorstoreindex, it's recommended to use VectorStoreIndex.from_documents() method, which will apply transformations on the documents and returns nodes.
Add a reply
Sign up and join the conversation on Discord