Find answers from the community

Updated 8 months ago

I want to create a secondary index (

I want to create a secondary index (default Vector Store Index) , which will have summarised chunks from the primary index. I need the node_ids in both the indexes to be same so that the context is retrieved from the primary index but the context passed to LLM for generation is from the secondary index. How can i do this , I was trying index.docstore.docs.values() to get the node_ids from primary index but that is not working. @Logan M
L
S
7 comments
You can manually create nodes and set the node ids
TextNode(id_="123", text="Hello")
but tbh, you probably just want a piece in the metadata to connect a summary chunks to the main chunks? Sounds easier
Yes I think that would be a better solution to my problem
But it throws this error :
ValueError: Metadata length (1458) is longer than chunk size (1024). Consider increasing the chunk size or decreasing the size of your metadata to avoid this.
You should decrease the metadata length, or set excluded_llm_metadata_keys and excluded_embed_metadata_keys
Add a reply
Sign up and join the conversation on Discord