Database / ChromaDB Interview Questions
What is ChromaDB and what problem does it solve?
ChromaDB is an open-source, AI-native vector database designed to store, index, and query high-dimensional embedding vectors efficiently. It was created specifically to make building LLM-powered applications easy — particularly for retrieval-augmented generation (RAG), semantic search, and recommendation systems.
Traditional databases store and search data using exact matches or SQL-style predicates. ChromaDB instead answers the question: "which stored items are most semantically similar to this query?" It does this by storing numerical vectors (embeddings) that represent the meaning of text, images, or other data, and finding nearest neighbours using vector similarity search.
| Feature | Detail |
|---|---|
| Language | Python-first (also JS/TS client) |
| License | Apache 2.0 open source |
| Storage modes | In-memory (ephemeral) or persistent (disk-backed) |
| Default embedding model | all-MiniLM-L6-v2 via sentence-transformers |
| Distance metrics | cosine, l2 (Euclidean), ip (inner product) |
| Primary use cases | RAG pipelines, semantic search, duplicate detection, recommendation |
pip install chromadb
import chromadb
# Quickstart — in-memory client
client = chromadb.Client()
collection = client.create_collection("my_docs")
collection.add(
documents=["ChromaDB is a vector database", "Python is great"],
ids=["doc1", "doc2"],
)
results = collection.query(query_texts=["vector store for AI"], n_results=1)
print(results["documents"]) # [["ChromaDB is a vector database"]]
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
