Hi @Logan M , sorry to keep asking questions here, but how does one query only within a set of nodes using Llama index?
Now that I can use
PGVectorStore
to get the nodes matching a
document_id
directly, I want to do a query and find the top k within those nodes only.
Here is my code. It seems to be trying to insert the nodes and then doing a broad query against the entire table, which is not what I expect.
vs_index = VectorStoreIndex(
nodes,
embedding_model=manager.embedding_model(),
storage_context=storage_context,
)
query_engine = vs_index.as_query_engine(
llm=sllm,
similarity_top_k=similarity_top_k,
)
response = await query_engine.aquery(query_str)
Thanks for all the help so far!