Loading…
Glossary term
A database built to store embeddings and quickly find the most similar ones.
A vector database stores embeddings and answers the question 'which stored vectors are closest to this one?' quickly, even among millions. It uses approximate nearest-neighbor indexes to avoid comparing against every item.
Many also store the original text and metadata alongside the vectors.
Store and query with Chroma
import chromadb
client = chromadb.Client()
docs = client.create_collection("docs")
docs.add(ids=["1", "2"], documents=["Cats nap a lot", "Stocks fell today"])
print(docs.query(query_texts=["sleepy kitten"], n_results=1))It is the standard storage layer for semantic search and RAG applications.