Vector search retrieves things that sound similar. It cannot answer a question that depends on a relationship two or three hops away, and it will confidently invent one. We replaced it with a graph the model traverses — and put the whole thing behind a voice loop that answers in under 300 milliseconds.
- WebRTC · Opusbi-directional streamingVoice edge
- Streaming STT / TTSinterim transcriptsSpeech
- LangChain supervisorintent + guardrailsAgent
- n8n, self-hostedretries + audit trailTools
- Apache AGE + pgvectorone PostgreSQLMemory
Retrieve, reason, act, then decide whether the context is actually sufficient. If it is not, control returns to retrieval with the graph frontier widened. Run it, or step through it.
Listen
Opus frames arrive over a bi-directional WebSocket in 20ms buffers and stream straight into transcription — the turn begins before the speaker has finished it.
Every failure below has the same root: cosine similarity knows what resembles what, and nothing about what relates to what.
- Finding 01
Multi-Hop Relationship Blindness
Vector search matches similar words, but cannot connect clues scattered across different files (e.g. Patient ➔ Genetic History ➔ Drug Risk).
Impact: 38% hallucinations on multi-file queries - Finding 02
Voice Turnaround Latency Spikes
Sequential speech-to-text, retrieval, and audio synthesis caused 1.5s of dead air between turns, breaking conversational immersion.
Impact: 62% call abandonment on live sessions - Finding 03
Brittle Scripts Under Concurrency
Hardcoded agent scripts lacked visual tracing and auto-retries, exhausting thread pools and dropping streams during traffic peaks.
Impact: Silent voice drop-offs during peak hours
"Can Patient #4892 be prescribed GLP-1 while currently taking Metformin and having a family history of MTC?"
Matches text with similar keywords, but cannot connect clues that live in separate documents.
Yes, Metformin can be safely combined with GLP-1 therapy.
Follows explicit relationship bridges across documents to reach the verified answer.
STRICTLY CONTRAINDICATED. Patient #4892 has a family history of MTC, triggering an absolute Black Box warning against GLP-1.
Past about 300ms a reply stops sounding like conversation and starts sounding like a system thinking. So the budget is fixed first and the architecture is built to fit inside it — every stage streams into the next instead of waiting for it to finish.
- Audio Ingest (WebRTC / Opus)
- Buffered in 20ms frames
- 42ms
- Deepgram Nova-2 Streaming STT
- Real-time interim transcripts
- 78ms
- GraphRAG Context Traversal
- pgvector ANN + Cypher hops
- 64ms
- LLM First Token TTFT
- Streaming token generation
- 58ms
- Cartesia Sonic Streaming TTS
- Instant audio buffer playback
- 35ms
Reasoning decides what to do; n8n is what does it. Each tool the agent can call is a workflow with its own retries and its own audit trail, so an agent action is inspectable after the fact.
A graph is only as good as its edges. Transcripts, PDFs and CRM logs are chunked on semantic boundaries, entities and predicates are extracted, then materialised as directed edges with full ACID guarantees.
- Stage 01
Multimodal Chunking & Semantic Boundary Detection
Raw audio transcripts, clinical PDFs, and CRM logs are parsed into structurally semantic units preserving tables and hierarchies.
- Stage 02
Named Entity & Relation Extraction (NER)
Fine-tuned LLM extraction maps entities (Patients, Drugs, Guidelines) and explicit predicates (CONTRAINDICATES, ALLOCATED_TO).
- Stage 03
1536-dim Vector Embedding Generation
Chunk embeddings indexed into PostgreSQL pgvector with HNSW indexing for sub-10ms approximate nearest neighbor search.
- Stage 04
Apache AGE Relational Edge Construction
Entities and extracted relations materialized as directed graph edges in PostgreSQL with full ACID transaction guarantees.
The same evaluation set run against vector-only retrieval and against the hybrid graph. Units differ across rows, so these are paired readings rather than one chart — nothing here shares an axis it has no right to.
- Multi-Hop Query Accuracy36.2%98.6%+62.4%
- Relational Hallucination Rate38.4%0.4%-98.9%
- Voice Turnaround Latency1,420ms277ms-80.5%
- Concurrent Voice Sessions45 (Crashed)1,200+ (Stable)26x Scale
- Context Recall on 10+ Hops14.8%94.2%+79.4%
Delivered in 2–3 weeks: production-grade GraphRAG (Apache AGE + pgvector) with n8n and LangChain orchestration, not a prototype demo.
This venture is described by sector rather than by name, so publishing never waits on a client's sign-off. The figures are unchanged either way — our delivery record is independently verifiable on Upwork.
Most retrieval works until someone asks a question that spans two documents. If yours is confidently wrong on relationships, that is a graph problem, and it is fixable.
- GraphRAG & hybrid retrieval
- LangChain agent supervisors
- Realtime voice pipelines
- n8n tool orchestration
- Evaluation & benchmark harnesses
- Self-hosted, no vendor lock-in

