I am trying to implement small-to-big retrieval and in this chunk of code
vector_index_chunk = VectorStoreIndex(all_nodes,
service_context=self.service_context,
storage_context=self.storage_context)
index = VectorStoreIndex.from_vector_store(vector_store=self.vector_store,
service_context=self.service_context)
vector_retriever_chunk = vector_index_chunk.as_retriever(similarity_top_k=2)
retriever_chunk = RecursiveRetriever("vector",
retriever_dict={"vector": vector_retriever_chunk},
node_dict=all_nodes_dict,
verbose=True)
if rag:
query_engine_chunk = RetrieverQueryEngine.from_args(retriever_chunk,
service_context=self.service_context)
response = query_engine_chunk.query(query)
return str(response)
else:
result = retriever_chunk.retrieve(query)
res = []
for node in result:
res += [display_source_node_custom(node, 200, True)]
return res
I want the function to store the vector_index_chunks and then to read them from the vector store. When I run this function (the whole thing not just this snippet) with rag = False, I get:
ValueError: Query id c092cd56-9404-43b8-84a0-d591c2cc2dc9 not found in either `retriever_dict` or `query_engine_dict`.
I'm guessing it's an error that the relevant node was not saved somehow, but I can't figure out what exactly causes the error.