By Sagar Shankaran, Founder of CallSphere
How CallSphere uses ChromaDB embeddings + a Lookup specialist agent for voice RAG vs Vapi PDF Knowledge Base. Retrieval quality, indexing, costs.
Key takeaways
Vapi Knowledge Base lets you upload PDFs and documents that the assistant can cite during a call — managed embedding, managed retrieval, opaque chunking. CallSphere runs ChromaDB as a self-hosted vector store with a dedicated Lookup specialist agent in IT Helpdesk that performs explicit retrieve-then-answer. Both work for FAQ-style queries; CallSphere's approach gives you tunable chunking, custom retrievers (BM25 hybrid, MMR), and the ability to inspect every retrieval that influenced an answer.
If you can ship one PDF and never look back, Vapi is fine. If you need to know why the agent answered "30-day return policy" instead of "60-day," you need an inspectable RAG pipeline.
Voice agents have constraints chat does not:
These constraints push you toward smaller chunks, fewer of them, and explicit confidence thresholds.
Vapi exposes a Knowledge Base as a per-assistant resource:
{
"knowledgeBase": {
"provider": "trieve",
"topK": 5,
"fileIds": ["file_abc123", "file_def456"]
}
}
Behind the scenes: documents are chunked, embedded, indexed in their managed vector store. At call time, every user query triggers a retrieval and the top-K chunks are injected into the LLM context.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent for IT support in your browser — 60 seconds, no signup.
Strengths: zero infra, drop a PDF, done.
Weaknesses:
CallSphere ships with ChromaDB embedded in the IT Helpdesk vertical. The architecture is:
User question
↓
Orchestrator (IT Triage)
↓ hand_off if knowledge query
Lookup Specialist Agent
↓ tool: retrieve_kb(query, filters, k=8)
ChromaDB (sentence-transformers/all-MiniLM-L6-v2 embeddings)
↓ top-K chunks with metadata
Re-rank (Cohere rerank-3 optional, BM25 hybrid)
↓ top-3 chunks
LLM (gpt-4o-realtime) generates audio response
↓
Postgres call_logs.retrievals[] for audit
The IT Helpdesk ingestion script:
import chromadb
from chromadb.utils import embedding_functions
client = chromadb.PersistentClient(path="/data/chroma")
ef = embedding_functions.SentenceTransformerEmbeddingFunction(
model_name="all-MiniLM-L6-v2"
)
col = client.get_or_create_collection(
name="it_kb",
embedding_function=ef,
metadata={"hnsw:space": "cosine"},
)
def index_doc(doc_path: str, doc_meta: dict):
chunks = semantic_chunker(doc_path, target_tokens=180, overlap=30)
for i, chunk in enumerate(chunks):
col.upsert(
ids=[f"{doc_meta['id']}::{i}"],
documents=[chunk.text],
metadatas=[{
**doc_meta,
"chunk_index": i,
"section": chunk.section,
"updated_at": chunk.updated_at,
}],
)
Three deliberate choices:
{"section": "returns", "updated_at": {"$gte": "2026-01-01"}}The Lookup specialist exposes a single tool:
@tool
async def retrieve_kb(
query: str,
section_filter: str | None = None,
k: int = 8,
) -> RetrievalResult:
where = {"section": section_filter} if section_filter else {}
raw = col.query(
query_texts=[query],
n_results=k,
where=where,
)
# Hybrid: blend dense scores with BM25 from a parallel index
bm25_scores = bm25_index.get_scores(query, raw["ids"][0])
blended = blend(raw["distances"][0], bm25_scores, alpha=0.7)
# Rerank top-8 to top-3
top3 = cohere_rerank(query, raw["documents"][0], top_n=3)
return RetrievalResult(
chunks=top3,
confidence=max(blended),
retrieval_id=str(uuid.uuid4()),
)
If confidence < 0.55, the specialist tells the user "I am not sure — let me transfer you to a human agent" rather than hallucinate an answer. This is the single most important RAG pattern for voice.
Still reading? Stop comparing — try CallSphere live.
See the IT support AI agent handle a real call — complete, industry-specific, and live in your browser. No signup.
Every retrieval gets a retrieval_id written to Postgres:
SELECT
cl.call_id,
r.retrieval_id,
r.query,
r.chunks_returned,
r.confidence,
r.influenced_response_id
FROM call_logs cl
JOIN retrievals r ON r.call_id = cl.call_id
WHERE cl.created_at > NOW() - INTERVAL '24 hours'
AND r.confidence < 0.7;
This query surfaces low-confidence retrievals from the last day, which feeds the weekly content gap report — "we kept failing to answer X, write a doc."
| Dimension | Vapi Knowledge Base | CallSphere ChromaDB |
|---|---|---|
| Vector store | Managed (Trieve) | ChromaDB self-hosted |
| Embedding model | Provider default | all-MiniLM-L6-v2 (swappable) |
| Chunking | Fixed | Configurable, semantic |
| Hybrid retrieval | Not exposed | BM25 + dense blend |
| Reranking | Built-in (opaque) | Cohere rerank-3 optional |
| Metadata filter | Limited | Full where-clause |
| Confidence threshold | Implicit | Explicit, configurable |
| Inspect retrieval logs | No | Per-turn in Postgres |
| Re-indexing | Manual upload | CI/CD pipeline |
| Cost | Bundled in Vapi pricing | Compute + embedding |
graph LR
Q[User voice query] --> Orch[Orchestrator]
Orch -->|hand_off| Lookup[Lookup Specialist]
Lookup -->|retrieve_kb| Embed[Embed query<br/>MiniLM-L6-v2]
Embed --> Chroma[(ChromaDB<br/>cosine)]
Lookup --> BM25[BM25 index]
Chroma --> Blend[Blend α=0.7]
BM25 --> Blend
Blend --> Rerank[Cohere rerank-3]
Rerank --> Conf{conf > 0.55?}
Conf -->|yes| LLM[gpt-4o-realtime]
Conf -->|no| Escalate[Escalate to human]
LLM --> Audio[PCM16 response]
LLM --> Log[(retrievals log)]
Both work. ChromaDB has lighter operational overhead for the IT Helpdesk scale (50K-500K chunks). At 5M+ chunks, pgvector or a hosted vector DB wins.
Yes — the embedding function is a config knob. We have run OpenAI text-embedding-3-small and bge-large-en-v1.5 in production.
Only if you skip rerank or retrieve too many chunks. With k=8 → rerank → top-3, total retrieval round-trip is 80-150ms.
GitHub repo of source docs → CI/CD pipeline re-chunks and upserts on push. ChromaDB upsert is idempotent on chunk ID.
Yes — each chunk carries a source_title metadata field, and the system prompt asks the agent to say "according to our returns policy, ..." when relevant.
The /demo flow includes the IT Helpdesk RAG path; ask it a policy question and inspect the retrieval log. /industries/it-helpdesk has full architecture diagrams.

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
Tbilisi professional-services firms serving relocating founders and IT companies use CallSphere AI voice and chat agents to answer enquiries 24/7 in English, Georgian and Russian and book consultations.
A how-to for Colombian education and tutoring SMBs to answer parents and students instantly, book trial classes 24/7 in Spanish and English, and grow enrollment with a CallSphere AI agent.
Ethiopian coffee exporters and cooperatives lose buyer enquiries across time zones. See how a CallSphere AI voice and chat agent answers international coffee buyers 24/7 in Amharic and English.
A practical how-to for Palau eco-resorts and dive operators on capturing every high-value, multilingual enquiry with a CallSphere AI voice and chat agent, while honouring Palau’s marine-conservation commitments.
How salons, spas and wellness SMBs across the UAE, Saudi Arabia and Qatar use CallSphere AI voice and chat agents to capture every booking 24/7 in Arabic, English and expat languages, and cut no-shows.
How estate agents and property managers in Luxembourg City and across the Grand Duchy use CallSphere to capture multilingual viewing and enquiry calls 24/7, GDPR compliant.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI