Chunk a Document Into ChromaDB and Connect Your AI Agent (Free, Local)
Short answer: upload a file to the Vector DB tab of the Evals Lab, pick a chunking method, and the lab cuts it into chunks, embeds each one and stores it in ChromaDB inside Docker. You then see every chunk with its position and vector, search it by meaning, and connect your own AI agent to the same database. It needs no API key.
What happens when you press Store
1. The lab reads your document (TXT, Markdown, PDF, HTML, CSV or JSON).
2. It splits the text with the method you chose: recursive, Markdown, paragraph, sentence or fixed size. Size and overlap are in characters.
3. Each chunk is embedded on your computer with the all-MiniLM-L6-v2 model.
4. Chroma stores the chunk text, its vector and its position (start and end characters) in the collection `my_documents`.
The app shows the result: a table of chunks with the first numbers of each vector, a chunk map that paints each chunk on the document (overlap in amber), and a search box.
Connect your own agent
Start the lab with port 8768 published (`-p 127.0.0.1:8768:8768`). Then, from any Python code:
import chromadb
client = chromadb.HttpClient(host="localhost", port=8768)
col = client.get_collection("my_documents")
res = col.query(query_texts=["your question"], n_results=3)To give it to an agent, wrap the query in a function and register it as a tool in your framework. Use the same embedding model (Chroma's default) so your questions match the stored vectors.
Take the database with you
The database is a folder in the Docker volume. Copy it out with `docker cp evals-lab:/workspace/chroma ./my_chroma` and open it with `chromadb.PersistentClient(path="./my_chroma")`.
Why use it
You see chunking instead of guessing at it. Change the method or size, press Store again and watch the chunks, the map and the search results change. Then take the same database into your own project. See the [ChromaDB docs](https://docs.trychroma.com) for more.
Related tool pages
- LLM as a Judge Playground: Grade AI Answers Free: Try LLM as a judge free on your laptop: write a judge prompt or a DeepEval G-Eval metric, run it on every test question and read a score and a reason for each answer.
- RAG Evaluation Playground: Test Chunking and Retrieval: Evaluate a RAG app free on your computer: chunk a document into ChromaDB, test retrieval by meaning, grade every answer and compare chunk sizes side by side in MLflow.
- DeepEval Playground: Try G-Eval Free on Your Laptop: Learn DeepEval hands-on, free: a Python IDE with a ready G-Eval project, goldens.csv, your own Gemini, Claude or OpenAI key and MLflow tracking. Runs in Docker.
- Chunk a Document Into ChromaDB: Free Local Vector DB: Upload a document, pick a chunking method and see every chunk and vector stored in ChromaDB, free in Docker. Then connect your own AI agent to that database. No API key.
Also try
How to use the Evals Lab: step by step
- Start the lab with port 8768 published
- Open the Vector DB tab and upload a document
- Pick a chunking method and press Store
- Search it, then copy the connection code for your agent
When to use the Evals Lab
- Seeing how chunking and embeddings work
- Building a local knowledge base for an AI agent
- Comparing chunk sizes by searching the same question
- Learning ChromaDB without installing anything but Docker
Example
Input: northwind_support_handbook.txt, chunked and stored in ChromaDB
Output: A score and a reason for every answer, and each run logged in MLflow
Frequently asked questions
Which vector database does it use?
ChromaDB, an open-source vector database. It runs inside the lab container and keeps its data in a Docker volume.
Do I need an API key?
No. Chunks are embedded locally with all-MiniLM-L6-v2. Only the evals, where a model answers and judges, need a key.
Can my AI agent use the database?
Yes. Publish port 8768 and connect with chromadb.HttpClient(host="localhost", port=8768), then query the collection my_documents.
Tip: Try the same question at chunk size 250 and 1000 and compare which chunk comes back first.