New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Fix number of documents logging when using chromadb #13074
Comments
It looks like the issue you're encountering with the logging statement However, if you're observing that the log always reports the number of nodes as 1, despite expecting more based on the query, it's crucial to:
If after these checks the issue persists, providing more details about the query and the data could help further diagnose the problem.
|
@dosu for node_id, text, metadata, distance in zip(
results["ids"][0],
results["documents"][0],
results["metadatas"][0],
results["distances"][0],
): |
To address the logging discrepancy you've identified, you should update the logging statement in the logger.debug(f"> Top {len(results['documents'][0])} nodes:") This adjustment ensures the log message correctly reports the actual number of documents returned by the query, aligning with the structure of the It's important to note that this change is specific to the logging functionality and is based on the current structure of the If you encounter any further issues or have additional questions, feel free to ask.
|
Bug Description
https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/vector_stores/llama-index-vector-stores-chroma/llama_index/vector_stores/chroma/base.py
It seems that the number of retrieved nodes should be
len(results['documents'][0])
Version
0.10.30
Steps to Reproduce
Using chromadb, retrieve nearest nodes with a query. Even when the number of retrieved nodes is 10, which is a default setting, it prints that the number of nodes is 1 as below.
Relevant Logs/Tracbacks
No response
The text was updated successfully, but these errors were encountered: