Find answers from the community

Updated 3 months ago

Why do i get different chunks returned when asking the same question over and over again?

At a glance

The community member posted a question about why they get different chunks returned when asking the same question repeatedly. Other community members responded, suggesting that the issue may be related to the use of a vector store, specifically Chroma DB, which has a "weird retrieval algorithm" and is approximate, leading to slightly different results for similar queries. They recommended exploring other vector databases that may provide more precise results, such as those using HNSW or IVF methods. However, there was no explicitly marked answer provided.

Hi

Quick question

Why do I get different chunks returned when asking the same question over and over again?
L
H
6 comments
Are you using a chat engine or agent? What vector store are you using?
possible neither πŸ˜„ just the original - index = GPTVectorStoreIndex.from_vector_store(vector_store=vector_store)

query_engine = index.as_query_engine(similarity_top_k=s_topk)

Using chromadb as the vector store
hmm, I know chroma has a very weird retrieval algorithm. Its approximate, so its definitely possible it changes slightly if you've indexed very similar chunks
Thank you - what is a good alternative which is more "precise"
anything using HNSW will be approximate. Other dbs have options for exact match methods like IVF etc.

Tbh though I see the most issues about wonky retrieval from chroma, but never any other vector db
So probably anything else
Add a reply
Sign up and join the conversation on Discord