Great question — answering as the UphillTech team:
The issue is mostly due to the older LangChain Chroma wrapper keeping a stale collection state after add_documents() . Instead of: from langchain_community.vectorstores import Chroma use: from langchain_chroma import Chroma With newer chromadb versions, newly added embeddings are sometimes not immediately reflected in the active retriever session. Re-initializing the vector store after add_documents() usually fixes it: vector_store.add_documents(docs, ids=ids) vector_store = Chroma( collection_name="research_docs", embedding_function=embeddings, persist_directory="./chroma_db" ) Also make sure: old collections are not created with different embedding models collection count is increasing:...
Full answer by Ritik Thakur: https://stackoverflow.stackexchange.com/a/79946752 (CC BY-SA 4.0).
Need it done for your business? UphillTech.