Hello everyone!
First post on this Discord server - I hope I am using the right channel.
I have been suffering for 2 months with LangChain until I discovered LlamaIndex. What a better documentation and an easier use!
My question is related to VectorStore Indexes, and especially Chroma. I processed a large book (362k words) and tested various VectorStore solutions.
- the default index provided in the LlamaIndex tutorials give decent results but is slow and does not seem to be designed for a production real-life app.
- Using Pinecone gives me great results (scores at 0.83 and great responses from the LLM).
- Chroma was my next test, since it is free and I have my own server. But I get terrible results! The scores of retrieved Nodes are around 0.23 and (not surprisingly) the LLM gives me very bad results ("junk-in, junk out" effect I guess). I tried to play with various parameters, but did not have luck.
Code extract:
print("Building the Chroma VectorStore...")
db = chromadb.PersistentClient(path="./laelith_chroma")
chroma_collection = db.get_or_create_collection("quickstart")
vector_store = ChromaVectorStore(chroma_collection=chroma_collection)
storage_context = StorageContext.from_defaults(vector_store=vector_store)
embed_model = OpenAIEmbedding(OpenAIEmbeddingMode.SIMILARITY_MODE)
service_context = ServiceContext.from_defaults(
llm=llm,
embed_model=embed_model,
chunk_size=400,
chunk_overlap=20
)
index = VectorStoreIndex.from_documents(
documents=documents,
storage_context=storage_context,
service_context=service_context,
show_progress=True
)
Any ideas?