Vector Stores: Chroma and FAISS
Creating and persisting vector stores, similarity search, MMR retrieval, hybrid search.
What is a Vector Store?
A vector store holds your embedded chunks and finds the most similar ones to a query vector. It is the search engine at the heart of RAG. Two popular choices are Chroma and FAISS.
pip install langchain-chroma faiss-cpuCreating a Chroma Store
Chroma.from_documents embeds your chunks and indexes them in one call. Pass the documents and an embeddings object. Chroma returns a store you can immediately search.
from langchain_chroma import Chroma
from langchain_openai import OpenAIEmbeddings
embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
db = Chroma.from_documents(chunks, embeddings)All lessons in this course
- LangChain Architecture and LCEL
- Document Loading, Splitting, and Embedding
- Vector Stores: Chroma and FAISS
- Building a RAG Q&A System End-to-End