Hands-On Practice
From the course ChromaDB: Local Vector Database
Put what you have learned in this course into practice with the structured exercise below. Working through it end-to-end is the single best way to consolidate the concepts.
Exercise: Chromadb Local Vectors in the Real World
Pick one realistic scenario from your own work, study, or curiosity and apply the techniques covered in earlier lessons. Aim for a small, completable artifact — a notebook, a working script, a written design, or a side-by-side comparison.
Suggested Workflow
- Frame the goal: write a one-sentence problem statement that the techniques in this course can address.
- Pick the right tool: revisit the lessons above and choose the specific method, model, or pattern that best fits.
- Build an MVP: produce the simplest version that proves the approach works. Keep it small.
- Evaluate: how did it perform? What surprised you? What broke?
- Iterate: refine one decision (prompt, parameter, tool) and re-evaluate.
Self-Check Questions
- Could you explain the chosen approach to a teammate in under two minutes?
- Where might this break in production? What guardrails would you add?
- What is the next thing you would try if you had another day?
Stretch Goal
Document your run as a short write-up. Compare against alternative approaches and note the trade-offs.
This practice loop converts passive reading into durable skill — the exact transfer-of-learning step most learners skip.
Concrete Starter Project: Build a Local Research Assistant
Here is a fully defined project you can complete in under two hours:
Goal: Build a CLI tool that indexes a folder of Markdown files and answers questions about them using ChromaDB + a local embedding model.
Steps:
- Install
chromadbandsentence-transformersvia pip. - Walk a
./docsfolder, read each.mdfile, and split it into 300-token chunks. - Use
SentenceTransformerEmbeddingFunction(model_name="all-MiniLM-L6-v2")as the embedding function. - Add all chunks to a
PersistentClientcollection at./chroma_data. - Build an interactive REPL that accepts a question, queries the collection for the top 3 chunks, and prints them ranked by distance score.
Extend it:
- Pipe the top chunks into an Ollama-hosted Llama 3 model to generate a grounded answer.
- Add a
--reindexflag that detects changed files using their modification timestamp stored in metadata. - Benchmark query latency with 100 vs. 10,000 documents to understand scaling behaviour.
What you will learn: The end-to-end lifecycle of a vector search application — chunking, embedding, indexing, querying, and result ranking — all running entirely offline.
Key Takeaways
- •Hands-on application converts course concepts into real skill
- •Start small with an MVP before optimising
- •Self-check questions catch gaps in understanding before they ship to production
Progress is kept in this browser only.