0PricingLogin
Learn AI with Python · Lesson

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-cpu

Creating 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

  1. LangChain Architecture and LCEL
  2. Document Loading, Splitting, and Embedding
  3. Vector Stores: Chroma and FAISS
  4. Building a RAG Q&A System End-to-End
← Back to Learn AI with Python