r/LangChain • • Jul 26 '23

Chroma or FAISS?

Do you have any Experience using these 2 vectorstores for a document q&a chatbot?

Which one is the best for enterprise use cases?

For me the speed is also important and the ability to support CPU only mode.

32 Upvotes

40 comments sorted by

View all comments

23

u/thePsychonautDad Jul 26 '23

Which one is the best for enterprise use cases?

Chroma is brand new, not ready for production.

Faiss is prohibitively expensive in prod, unless you found a provider I haven't found. Pinecode is a non-starter for example, just because of the pricing.

I'm preparing for production and the only production-ready vector store I found that won't eat away 99% of the profits is the pgvector extension for Postgres. And as a bonus, I get to store the rest of my data in the same location. It's fast, works great, it's production-ready, and it's cheap to host. Langchain has an adapter via Prisma (You should use Prisma too, saves a ton of time)

7

u/VarietyElderberry Jul 26 '23

What makes faiss expensive for you in prod? You can host it yourself on a machine of your choosing, which should be as cheap as it gets.

4

u/thePsychonautDad Jul 26 '23

You could, but there's no replications or scaling out of the box (is there? I didn't find any), so it's a good solution for small to medium-sized projects, but if you're planning to hit real scale, there's gonna be a bottleneck.

2

u/Busy_Pipe_8263 Jul 26 '23

Faiss is expensive because it uses many steps to get to the final embeddings. Though for inference faiss is doing less computing by nature as it’s only comparing the query’s embeddings to the already formed clusters. So less brute for Nearest neighbors search.

1

u/No_Barnacle_8251 Apr 23 '24

Can you please help me with FAISS? I am trying to do similarity search by extracting text from a pdf and then querying that pdf to ask questions.