Generative AI Tutorial 0/80 lessons ~6 min read Lesson 46
ChromaDB Basics
Chroma is an open-source, embedded vector database that runs in-process or as a server.
Course progress0%
Focus
6 guided sections
Practice signal
Examples included
Career prep
Foundation builder
Introduction
Chroma is an open-source, embedded vector database that runs in-process or as a server. Perfect for prototyping, local dev, and small/medium production loads.
Beginner analogy: SQLite for vectors — zero config, runs anywhere.
Understanding the topic
Core concepts to understand:
- Pip install or Docker run.
- Built-in embedding generation (or BYO).
- Persistent storage (DuckDB + Parquet).
- Python, JavaScript, REST APIs.
Syntax reference
Visual workflow / architecture:
bash
import chromadbclient = chromadb.Client()col = client.create_collection("docs")col.add(documents=["..."], ids=["1"])col.query(query_texts=["..."], n_results=3)
Real-world use
Heavy use in RAG tutorials, hackathons, prototypes. Many startups start on Chroma and migrate to Pinecone/Qdrant at scale.
Best practices
- Start with Chroma; migrate when you outgrow it.
- Use persistent client mode in production, not in-memory.
Hands-on exercise
Interview preparation — practice these questions:
- Q1. What is ChromaDB?
- Q2. When would you migrate off Chroma?
- Q3. Compare Chroma vs Pinecone.
Ready to mark this lesson complete?Track your journey across the entire course.