Case studiesAI & automationVoice turnaround277ms

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.

The stack5 layers
  1. WebRTC · Opusbi-directional streamingVoice edge
  2. Streaming STT / TTSinterim transcriptsSpeech
  3. LangChain supervisorintent + guardrailsAgent
  4. n8n, self-hostedretries + audit trailTools
  5. Apache AGE + pgvectorone PostgreSQLMemory
$10K
Commercial Sprint
Fixed-price rapid delivery
2–3 Wks
Delivery Time
Blank repo to production
GraphRAG
Memory Core
Apache AGE + pgvector
Production
Delivery Status
Live GraphRAG, not a demo
One agent turn6 steps · 2 hops

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.

Agent turn1 / 2

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.

Measured
42ms
WebRTC ingress
Why the baseline failed3 findings

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
Interactive Comparison
Multi-Hop Test Query

"Can Patient #4892 be prescribed GLP-1 while currently taking Metformin and having a family history of MTC?"

Vector Search: Only grabs nearby word matches, missing connected files.
GraphRAG: Traverses multi-hop entity bridges to find the true answer.
Cosine Blindspot · Hallucinated
Traditional Vector Search

Matches text with similar keywords, but cannot connect clues that live in separate documents.

Vector Similarity Radius (Cosine > 0.70)Patient FileTakes Metformin (0.88)Drug ProtocolGLP-1 Indication (0.82)MTC Cancer RiskFamily History File (0.21)✕ NO BRIDGE TO RISK
Blindspot Analysis:File 3 (Family history of MTC tumor) was missed because its keywords had low cosine similarity to "GLP-1".
Hallucinated Response (Dangerous)

Yes, Metformin can be safely combined with GLP-1 therapy.

Multi-Hop Graph · 100% Grounded
Hybrid GraphRAG Solution

Follows explicit relationship bridges across documents to reach the verified answer.

Patient #4892PatientMetformin 500mgMedicationMTC Family HistoryGenetic RiskGLP-1 SemaglutideCandidate Drug
Patient ➔ Genetic History (MTC) ➔ Strict Contraindication with GLP-1
Grounded Graph Answer (100% Safe)

STRICTLY CONTRAINDICATED. Patient #4892 has a family history of MTC, triggering an absolute Black Box warning against GLP-1.

Latency budget277ms of 300ms

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.

Caller speakingtime →Agent replying
277ms
caller stopsagent starts
What happens inside that gap
277ms of a 300ms budget
23ms headroom
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
Tool layern8n, self-hosted

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.

agent-turn · production6 nodes · 1 conditional loop
GraphRAG MemoryRetrieval · Apache AGE · pgvector
idle
Building the graph1536-dim

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.

  1. Multimodal Chunking and Semantic Boundary Detection Diagram
    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.

  2. Named Entity & Relation Extraction (NER) Diagram
    Stage 02

    Named Entity & Relation Extraction (NER)

    Fine-tuned LLM extraction maps entities (Patients, Drugs, Guidelines) and explicit predicates (CONTRAINDICATES, ALLOCATED_TO).

  3. 1536-dimensional Vector Embedding and HNSW Index Diagram
    Stage 03

    1536-dim Vector Embedding Generation

    Chunk embeddings indexed into PostgreSQL pgvector with HNSW indexing for sub-10ms approximate nearest neighbor search.

  4. Apache AGE Relational Knowledge Graph Edge Construction Diagram
    Stage 04

    Apache AGE Relational Edge Construction

    Entities and extracted relations materialized as directed graph edges in PostgreSQL with full ACID transaction guarantees.

Measured against the baseline5 metrics

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 Accuracy
    36.2%98.6%
    +62.4%
  • Relational Hallucination Rate
    38.4%0.4%
    -98.9%
  • Voice Turnaround Latency
    1,420ms277ms
    -80.5%
  • Concurrent Voice Sessions
    45 (Crashed)1,200+ (Stable)
    26x Scale
  • Context Recall on 10+ Hops
    14.8%94.2%
    +79.4%
Outcome
$10K
Fixed-Price Phase 1 Deployment

Delivered in 2–3 weeks: production-grade GraphRAG (Apache AGE + pgvector) with n8n and LangChain orchestration, not a prototype demo.

2–3 Wks
Delivery Time
From kickoff to live production deployment.
GraphRAG
Memory Core
Apache AGE and pgvector in live production.
Production
Deployment State
Production GraphRAG platform, not a prototype.
n8n + LangChain
Agentic Pipeline
Multimodal real-time conversational workflow.

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.

Work with us

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.

What we ship
  • GraphRAG & hybrid retrieval
  • LangChain agent supervisors
  • Realtime voice pipelines
  • n8n tool orchestration
  • Evaluation & benchmark harnesses
  • Self-hosted, no vendor lock-in