Replies: 3 comments
-
🤖 Hello, The issue you're experiencing could be due to the way the Here is the relevant code: def query(self, query: VectorStoreQuery, **kwargs: Any) -> VectorStoreQueryResult:
"""Get nodes for response"""
if query.filters is not None:
raise ValueError(
"Metadata filters not implemented for SimpleVectorStore yet."
)
items = self._kvstore.get_all(collection=self._collection_embedding).items()
if query.node_ids:
available_ids = set(query.node_ids)
node_ids = [k for k, _ in items if k in available_ids]
embeddings = [v[self._key_value] for k, v in items if k in available_ids]
else:
node_ids = [k for k, _ in items]
embeddings = [v[self._key_value] for k, v in items]
query_embedding = cast(List[float], query.query_embedding)
if query.mode in LEARNER_MODES:
top_similarities, top_ids = get_top_k_embeddings_learner(
query_embedding=query_embedding,
embeddings=embeddings,
similarity_top_k=query.similarity_top_k,
embedding_ids=node_ids,
)
elif query.mode == VectorStoreQueryMode.DEFAULT:
top_similarities, top_ids = get_top_k_embeddings(
query_embedding=query_embedding,
embeddings=embeddings,
similarity_top_k=query.similarity_top_k,
embedding_ids=node_ids,
)
else:
raise ValueError(f"Invalid query mode: {query.mode}")
return VectorStoreQueryResult(similarities=top_similarities, ids=top_ids) To resolve this issue, you might need to check how your query embeddings are being generated and ensure they are unique for each query. Also, check how your DynamoDB table and query engine are set up, and ensure they are properly configured to handle different queries and return different results. You can find more details in the source code of the LlamaIndex repository:
I hope this helps! If you have any other questions or need further clarification, feel free to ask. Best, Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
now sure what i need to do |
Beta Was this translation helpful? Give feedback.
-
@axz91 can you share a more reproducible example? which models, embeddings, vector db |
Beta Was this translation helpful? Give feedback.
-
Question Validation
Question
when i query, whey always the same contents being sent to LLM
Beta Was this translation helpful? Give feedback.
All reactions