Skip to main content

Voice Stack Compendium

A Transferable Architecture for Regulated-Domain Voice Agents

Status and scope of this page

This is documentation of a PXL University College graduation project, authored by SOFT4U BV, describing the voice channel of a pilot built for Ziekenhuis Oost-Limburg (ZOL). It is not an official ZOL publication and is not endorsed by ZOL. The page was written in May 2026, before the June 2026 safety incident described in the Safety overview. Where this text describes safety layers, read them as design intentions that the project tests itself, not as guarantees. Source-code names, file paths, call identifiers, hosts and telephony identifiers have been removed for the public edition.

This document describes the voice stack of the ZOL hospital intelligent-search pilot at the level of architecture and design reasoning. It is written for a reader who has not worked on the project. Detail for individual features lives on the per-feature pages cross-linked throughout. The companion bibliography lists the cited works.

1. Mission and scope​

The pilot was built for Ziekenhuis Oost-Limburg (ZOL), a Belgian acute-care hospital. According to the January 2026 project brief, the hospital's website receives 100,000+ monthly visitors and about 25,000 search queries per month, served by an Elasticsearch keyword search. Patients and visitors phrase questions as natural sentences, and lexical search under-serves that phrasing. The voice channel exists for the same reason: callers reach for the phone rather than the keyboard, especially in the demographic that overlaps most heavily with hospital traffic, and the call centre handles many questions that already have public answers in published brochures.

The class of problem is voice-first AI agents in regulated domains. Voice differs from chat in ways that matter:

  • Voice removes the visual disclaimer surface. A spoken caveat is single-shot, and an elderly caller who mishears it cannot scroll back.
  • Voice removes the citation-audit surface. There is no link to click, so claims must be grounded by retrieval rather than by display.
  • Voice constrains the time budget per turn by the human tolerance for telephone silence, which empirical work puts at about one second for seamless flow and ten seconds for loss of attention (Nielsen 1993).
  • Voice adds speech-recognition mishearing, which can invert intent at the sound level. The Dutch questions "Hoe wordt migraine behandeld?" (informational) and "Behandel ik migraine?" (advice-seeking) differ by a few sounds, and the architecture must not let such a mishearing silently route an advice request through to the answering core.

The system is not a clinical decision support tool, and the architecture is shaped by that negative scope. It is not designed to give diagnoses, recommend dosages or treatments, bill, schedule, or transcribe consultations. A system honestly bounded to "we help you find which department you need and what the visiting hours are" can defend that boundary; a system loosely scoped as "a hospital AI" cannot.

Four metrics were chosen to govern the stack:

  1. Medical-advice incidents. The target is zero. This is a target, not an achievement: on 1 June 2026 the pilot gave a specific dose in a live demonstration (see the Safety overview).
  2. First-audio latency at the 95th percentile, measured from the end of the caller's utterance. Tail latency matters because the worst one-in-twenty experience is what operators care about (Beyer et al. 2016).
  3. Category-mismatch rate: the fraction of turns where the answer's content category drifts from the caller's intent category (for example, a parking question answered with a reimbursement explanation).
  4. Citation-grounding rate: the fraction of substantive answer turns that trace to at least one retrieved chunk.

The architectural lineage of the answering core is retrieval-augmented generation (Lewis et al. 2020) with two adaptations for voice: the orchestrator is an agentic language model that calls retrieval as a tool rather than a pipeline that hands context over unconditionally, and it runs inside a real-time media stack (LiveKit Agents), so the budget is a live phone-call latency.

2. The seven-layer stack​

The stack composes seven layers, each with a single responsibility. Each was chosen against named alternatives. The per-turn path is shown below.

Figure 2.1 — Per-turn path through the seven layers.

Layer 0 — Telephony​

The hospital owns a Belgian landline number in the international E.164 format. The telephony provider is a Twilio Elastic SIP Trunk that forwards incoming calls over an encrypted SIP connection to the pilot server. Twilio was chosen over other carriers because its Belgian number coverage and emergency-routing compliance were mature; the alternatives would have required hand-built emergency routing with no offsetting advantage at this scale. Managed call-flow products were not considered because they tie the logic to the vendor's scripting language, foreclosing the agent-runtime pattern the rest of the stack depends on.

Layer 1 — SIP gateway​

The SIP gateway is the open-source LiveKit SIP component, self-hosted on the pilot server. It terminates the inbound call, converts the carrier's narrow-band audio to wide-band, creates one room per call and bridges the audio. The protocol is the standard SIP specification (RFC 3261).

Three deployment shapes were compared: the managed LiveKit Cloud SIP service, Twilio's managed conversation product, and the self-hosted gateway. The decisive factor was cost per participant-hour: the managed service was estimated at several hundred euros per month at the projected volume, while self-hosting costs engineering time but no marginal fee, and keeps caller audio on the server except for the speech vendors that are already sub-processors under GDPR Article 28. The decision is recorded in ADR-0050 and the operational documentation is Twilio + LiveKit SIP.

Layer 2 — Real-time media​

LiveKit Server, a WebRTC media relay, creates a room per call, lets the SIP side and the agent side join it and routes audio between them. The same server hosts the LiveKit Agents worker that runs the voice agent, which removes a network hop. LiveKit Agents was chosen over alternatives (a chatbot framework's voice extensions, or a hand-built socket layer) for its integration surface: streaming integrations for speech recognition and synthesis, room-aware lifecycle and audio buffering that make turn-taking feel natural. Re-implementing these was judged a months-long project.

Layer 3 — Speech recognition​

Caller audio is streamed to Deepgram Nova-3 (announcement). It was preferred over OpenAI Whisper for three reasons, according to the project's trials: a Flemish-tuned acoustic model that handled regional Dutch better, native streaming, and a ready-made LiveKit plugin.

The notable design decision is language locking at the first utterance (ADR-0052; Language Locking). The agent uses multi-language recognition for the first utterance only, detects the caller's language, then locks recognition to that language for the rest of the call. Two pilot calls forced this: in one, the agent spent most of a minute in a nonsense loop before a fast path caught a language mismatch; in the other, recognition in Dutch mode produced no transcripts at all when the caller spoke English, leaving no signal for downstream detectors. Multi-language recognition throughout would have solved the silence problem but degraded Flemish accuracy in the project's earlier measurements. The lock-and-stay policy gives up mid-call language switching, which the project judged rare in its population, in exchange for Flemish accuracy on the other calls.

Layer 4 — Cognition​

The voice agent forwards each transcript to the backend, which dispatches it to the voice orchestrator. The orchestrator runs a regex pre-filter, an agentic language model with a small set of tools (section 3), a regex post-filter, an answer shaper that converts text formatting into speakable prose, and a medical-content disclaimer step. It is the only voice path: an earlier eight-stage orchestrator, a dialogue manager and a speculative-recognition cache (roughly seven thousand lines in total) were deleted in May 2026 (ADR-0049, ADR-0051). The orchestrator's only direct dependency on the rest of the system is the same retrieval pipeline the chat channel uses (Lewis et al. 2020; Gao et al. 2024).

Layer 5 — Speech synthesis​

Outbound audio is produced by ElevenLabs Multilingual v2 (model documentation), which synthesises Dutch, English, French and Italian. In the project's listening comparisons for its Flemish-Dutch-primary population it was preferred over two large cloud providers. Neural synthesis follows the lineage of Tacotron: prosody emerges from the model's attention over the input text rather than from markup. The model does not honour SSML break tags, so the project controls pacing by rewriting the text with punctuation (Prosody Injection). An adaptive speed feature combines an explicit request to slow down, distress detection and the caller's own speaking rate into one speed setting, clamped to a range. Elderly callers often speak slowly, and matching their pace slightly reads as attuned (Adaptive TTS Speed).

Layer 6 — Conversation memory and telemetry​

Every turn of every call is written to the database in structured form: the human-readable record (utterance, answer, timestamp, language, conversational intent, citations), the operational signal (per-stage latency, retrieval counts, intent class, primary content category) and the Value Framework's per-turn category-mismatch measurement. Two readers consume this: the operations dashboard, with per-hospital trend charts for category mismatch and diagnostic accuracy, and a diagnostic endpoint that scores individual calls on five dimensions (correctness, safety, memory, tool use, latency) during evaluation. Latency objectives are framed at the tail (Beyer et al. 2016).

Layer trade-offs at a glance​

LayerChosenAlternative consideredReason given
L0 TelephonyTwilio Elastic SIPOther carriers or direct terminationMature Belgian coverage and emergency-routing compliance
L1 SIPSelf-hosted LiveKit SIPLiveKit Cloud SIPEstimated several hundred euros per month at scale; data-sovereignty preference
L2 MediaLiveKit Server + AgentsChatbot-framework voice extensions, hand-built socketsRe-implementing audio buffering and lifecycle is months of work
L3 RecognitionDeepgram Nova-3 (language locked)Whisper; multi-language recognitionWhisper degraded on Flemish in trials; multi-language mode degraded Flemish accuracy
L4 CognitionAgentic model with a few toolsEight-stage deterministic pipeline; thin pipeline without an agentThe old pipeline accumulated dead state; the thin pipeline could not handle compound queries
L5 SynthesisElevenLabs Multilingual v2Other cloud synthesis; ElevenLabs v3Stronger Dutch, French and Italian voices; markup support traded for voice quality
L6 TelemetryDatabase tables + dashboardDedicated time-series databasePilot scale does not justify one

Cascade versus voice-native (speech-to-speech)​

The biggest architectural fork is whether to run a cascade (the pipeline above: recognition, then model plus retrieval, then deterministic post-processing, then synthesis, taking turns) or a voice-native speech-to-speech model (audio in, audio out through one model, full-duplex). The choice trades control against latency and naturalness.

Latency favours voice-native. The project cites published figures (Twilio's 2025 latency guide; the tau-Voice and FLEXI papers, arXiv 2603.13686 and 2509.22243) suggesting that a generic cascade has a mouth-to-ear budget around 1.1 seconds, while voice-native models reach about 0.9 to 1.15 seconds under realistic audio, and natural full-duplex conversation wants well under 400 ms. The pilot is slower than the generic cascade: in the project's own measurements (self-reported, from the pilot's telemetry) time to first audio was about 5.9 seconds at the median and 16.4 seconds at the 95th percentile, because the pilot adds an agentic tool-decision call and retrieval with reranking. Cached or deterministic turns return in one to two seconds.

Control favours the cascade. The cascade assembles and screens the exact output text before any audio is produced. Voice-native guardrails cannot do this: in OpenAI's Agents SDK, realtime agents support output guardrails only, they run on a debounced transcript, and they fire after audio may already be playing. At the time of writing, realtime output guardrails were available in the JavaScript SDK but not the Python one, and the pilot is a Python stack.

Reliability of voice-native models was not yet sufficient for a hard bar. Published benchmarks cited in the project's notes reported low instruction-following scores for speech models, lower task completion than text agents on multi-step tasks, and weaker refusal of malicious prompts in speech than in text (VoiceBench, arXiv 2410.17196). These are third-party results that were current in early 2026 and are changing quickly.

Decision framework. Stay with a cascade when the spoken output carries a hard, non-negotiable constraint (medical-advice refusal, mandatory citations, auditability), as on a hospital line. Consider voice-native when the output constraint is soft and latency dominates, for example an appointment-booking line, where control can be concentrated at the tool boundary. The project would re-evaluate when a duplex model can show, on a Dutch hospital benchmark, guardrails that gate audio before playback and closure of the multi-step task gap.

Fast-moving — re-benchmark before any decision

These figures describe models from 2025 and early 2026. Successors are improving, so treat the numbers as a snapshot.

A third option is the full-duplex cascade: keep the cascade's deterministic text checkpoint but add voice-activity-based barge-in (the caller can speak over the agent), streaming recognition and synthesis (the agent speaks sentence by sentence), and latency masking through a warm cache and short fillers. It improves the interruption and turn-taking naturalness callers notice without giving up the pre-speech gate, but it cannot close the raw first-turn latency gap. The author considers it the recommended roadmap option for a regulated line.

3. Cognition deep-dive​

The architecture is agentic-only (ADR-0051). One language-model agent with a few tools is the cognitive layer, fronted by a deterministic pre-filter and followed by a deterministic post-filter and answer shaper. There is no dialogue manager and no fallback to a non-agentic pipeline; if the model fails, the orchestrator escalates and the caller is transferred to the hospital helpdesk.

Figure 3.1 — Per-turn cognitive flow.

Stage 1 — The pre-filter​

Every caller utterance, after recognition and after personal-data redaction, is run through a deterministic classifier before the language model is invoked. It recognises seven classes: a safety-refusal request (dosage and prescription asks), a request for a human, a request to repeat, personal off-topic talk, a farewell, a greeting, and everything else. The first six end the turn with a fixed templated response and no model call; the seventh passes the utterance to the agent.

Precedence matters. A caller who says "Thank you for the information, could you connect me after all?" must be treated as a handoff, not a farewell, so handoff and safety checks fire before social closers. The safety patterns catch dosage and prescription phrasings in Dutch, English, French and Italian; a patient population that speaks French needs French coverage from the first day. Phrase patterns are deliberately bounded so that a navigational question such as "how much time do you take for a first consultation?" is not mistaken for a dosage question. The turn-taking framing follows Sacks, Schegloff and Jefferson 1974.

The pre-filter is a deterministic first line of defence: a recognised dosage ask is intended to be intercepted before the model runs and answered with a fixed refusal and a helpdesk offer. Like any pattern list, it can miss novel paraphrases, which is why further layers exist. The project's July 2026 adversarial audit of its own safety architecture is summarised in the Safety overview.

Stage 2 — The agentic model and its tools​

When the pre-filter passes an utterance on, the orchestrator invokes the language model with a system prompt and a small tool set:

ToolPurposeSafety role
Knowledge-base searchRuns the retrieval pipeline for the voice channel and returns a voice-shaped answer, citations and a "found" flagAims to ground claims in retrieved chunks rather than training data
Transfer to helpdeskEscalates to a humanLets the agent bail out when it cannot answer safely
End callCloses the call after an explicit goodbyePrevents hanging up on intermediate utterances

Three controls keep the model constrained. First, system-prompt invariants: never answer hospital-specific facts from training data, never give medical advice, keep responses short. In the OWASP LLM Top 10 taxonomy this is a mitigation for LLM01 (prompt injection), restating the invariants every turn. Second, tool-grounded retrieval: the prompt requires the search tool for any factual claim, and two consecutive failed searches in one turn force a transfer to the helpdesk, which defends against a rephrasing loop seen in pilot traffic in May 2026. Third, an iteration cap on the tool loop, after which the orchestrator emits a fixed transfer text.

Structured output at every model call site is enforced by a shared structured-call helper, which validates the model's output against a schema, retries on invalid output and raises a typed error when retries are exhausted. It replaced raw JSON parsing scattered across eight call sites and removed a class of silent failures in which malformed output reached downstream code. An agent-framework version of the same idea was trialed on 2026-05-09 and removed on 2026-05-12 after telemetry showed it added about 720 ms per call.

The Value Framework​

The Value Framework addresses a class of cross-category contamination that vector similarity alone cannot detect. The motivating case: a caller asking about wheelchair accessibility at the entrance received a confused reimbursement explanation, because a chunk about wheelchair-prescription reimbursement scored highly on the word "rolstoel" and outranked the parking and accessibility chunk. Adding keyword search made this worse, rank fusion (Cormack et al. 2009) preserved it, and a cross-encoder reranker (Nogueira and Cho 2019) would add latency and still has no notion that "parking" and "reimbursement" are different categories of fact.

The framework is a categorical-affinity multiplier applied to the existing similarity score, in the modular-RAG taxonomy of Gao et al. 2024. It performs three operations per turn:

  • Affinity reranking. Each retrieved chunk is classified into one of six categories (practical, clinical information, regulatory, appointments, legal-administrative, general) using multi-language keyword sets, which are linguistic rather than hospital-specific. The chunk's score is multiplied by an entry from an intent-by-category matrix, with a bounded boost and a bounded penalty.
  • Primary-category election. The dominant category among the top-ranked chunks is identified and passed to the model as an instruction not to fuse across categories.
  • Unit-mismatch admission. If the query asks about one unit (a parking tariff per minute) but the top chunks discuss another (an electric-vehicle charger per kWh), a note instructs the model to say so rather than silently transposing units.

Each turn writes a mismatch measurement to telemetry. A sustained spike indicates an emerging query class that the matrix does not cover. The overhead is a few milliseconds per turn on development hardware. A regression test suite pins the original wheelchair scenario and the unit-mismatch detector.

The citation pipeline​

Voice answers contain no inline [1] markers, because speech synthesis would read them aloud. This design created a silent cascade failure that affected voice turns until April 2026: the chat channel's citation extractor, which looks for markers, returned an empty list; the cache stored the empty list; later cache hits returned no citations; and the diagnostic scorer silently fell back to its older rendering. No function raised an error; the failure was architectural, since a chat-path assumption had leaked into the voice path. The fix derives voice citations directly from the retrieved chunks, skips deduplication that assumed markers, and logs the citation count before the cache write so a zero is visible. After any change to the citation pipeline the semantic cache must be flushed. See Citation Pipeline.

Stage 3 — The post-LLM safety filter​

After the model produces its response, a regex filter checks it for three classes of medical-advice slip in all four languages: committed diagnoses, numeric dosages and drug recommendations, and first-aid imperatives. On a match, the output is replaced with a language-matched refusal template. The pre-filter catches caller asks before the model runs; the post-filter catches model slips after it runs. Their failure modes differ, and neither is a complete defence on its own.

Stage 4 — The medical-content disclaimer​

A shaping step prepends a per-language disclaimer (the Dutch form is "Ter informatie, dit is geen medisch advies — …"). Until early May 2026 this step was accidentally disabled, because a wire was left dangling when an older intent classifier was deleted. It was re-activated by inspecting the final answer text, rather than guessing the caller's intent beforehand: the logic is intentionally medical-dominant, so any medical vocabulary hit triggers the disclaimer, since the regulatory cost of under-disclaiming (AI Act Article 50) outweighs the user-experience cost of over-disclaiming.

4. Reliability and observability​

The reliability approach rests on three rules adopted after a voice-history regression on 7 May 2026. They describe how to make a system that fails quietly fail loudly.

  • R1 — Observability for collection-returning functions. A function that returns a list, dictionary or generator logs its size just before returning. The regression shipped because a function returned an empty list on a permission mismatch and nothing recorded the zero.
  • R2 — Regression tests for silent-failure branches. Any code path that fails quietly needs a test that asserts the user-visible outcome, added together with the fix. The voice-history bug was a filter that excluded the rows needed; the fix came with a test pinning the correct behaviour.
  • R3 — Contract tests for shared state across components. When two components share protocol state (for example the language the voice agent detected and the language the backend reads), a test simulates the exchange and asserts both sides agree.

R1 makes silent failures discoverable, R2 catches them before they ship, and R3 catches them at component boundaries.

Operators consume per-turn telemetry through the operations dashboard (per-hospital trend charts of category mismatch and diagnostic accuracy). The structured logs are designed so that a search over them can answer per-turn questions without querying the database, for example whether a turn shipped without citations or whether the disclaimer fired.

The diagnostic endpoint scores each turn on correctness, safety, memory, tool use and latency using a language model as judge (with the bias controls of Zheng et al. 2023). It also runs an adversarial counter-evidence pass: given an answer, it searches the corpus for chunks that contradict the claim and flags them to the operator. And it decomposes an answer into atomic claims labelled grounded, inferred or speculation, as a quality signal. These are the project's own tools; they have not been independently validated.

5. Safety and compliance​

Safety on the voice channel is a two-stage filter around a tool-grounded model plus a disclaimer step. An earlier "triple-defense" description referred to two modules that were deleted in May 2026; this section matches the current design.

Figure 5.1 — Voice-channel safety stages.

The safety-refusal reply offers a helpdesk transfer, plus a pointer to the caller's general practitioner, the out-of-hours service or the Belgian emergency number 112. Per the OWASP LLM Top 10, the design addresses LLM01 (prompt injection, through prompt invariants), LLM03-style misinformation (tool-grounded retrieval forces claims through the curated corpus) and LLM06 (sensitive information disclosure; the corpus is curated and contains no patient data). These are design mappings, not assurances.

Refusal is checked by the project's own automated tests and by a probe after each deployment (self-reported; these checks have had gaps, described on the Safety page). No independent audit has been carried out.

Speech-mishearing awareness​

Dutch first-person forms such as "Behandel ik migraine?" are a few sounds away from "Hoe wordt migraine behandeld?", and a Flemish-tuned model can err either way. The project observed this in both directions, and the only complete defence is to treat the inversion as in scope for the Stage 1 pattern set regardless of which phrasing arrived in the transcript. The pattern packs for all four languages include the inverted forms.

GDPR mapping​

Processing of caller data falls under Regulation (EU) 2016/679. The mapping below is the project's design intention; the full analysis is in the DPIA.

  • Article 4(5), pseudonymisation. Caller identifiers, phone numbers, names and other inline personal data are replaced with structural tokens before structured-log emission.
  • Article 5, principles. Purpose limitation (calls are processed only for the information service) and storage limitation (see the Data Retention Policy).
  • Article 6, lawful basis. The analysis relies on legitimate interest and public interest rather than consent.
  • Article 9, special-category data. The corpus is general-public hospital information, not patient records. Health details a caller volunteers are treated as special-category data in the analysis.
  • Article 25, data protection by design. Redaction at ingest, minimal logging and purpose-bound retention are design-time choices.
  • Article 28, processors. Twilio, OpenAI, Deepgram and ElevenLabs are treated as sub-processors; see the DPIA for the status of the processing agreements.
  • Articles 30 and 32. Audit logging is described in Security; the alignment target is ISO/IEC 27001:2022. The project is not certified.
  • Article 35, DPIA. A DPIA was written proactively because of the healthcare context (DPIA).

AI Act mapping​

The system falls within the scope of Regulation (EU) 2024/1689. The project's own classification analysis (AI Act compliance) is:

  • Limited risk under Article 50. The system interacts with natural persons, so users must be informed they are dealing with AI unless that is obvious. The voice channel states this at the greeting and per turn through the disclaimer on medical-content answers.
  • Not high risk under Article 6 and Annex III, because the system is informational and navigational only.
  • Not a medical device under the Medical Device Regulation, on the analysis that a hospital wayfinding tool does not match the medical-device definition. This negative classification is the load-bearing legal posture: if the safety stages failed and the system produced literal medical advice, the classification could change. That is why the safety stages are anchored at the deterministic layer and not at the model alone.
  • The HLEG 2019 guidelines informed the ethics framing.

This is the project's own analysis, not legal advice, and the project does not claim legal compliance.

Adversarial input hardening​

Two attack classes from the literature are considered: adversarial suffixes (Zou et al. 2023) and their generative extension (AmpleGCG), which indicates that defences must assume a stream of new patterns. The defence is surface-signature detection of high-entropy character sequences and character-level perturbations at the pre-filter, routed to the refusal branch. This is deliberately incomplete against a sophisticated attacker. The author judged the realistic threat to a public hospital wayfinding tool to be lower than a researcher with white-box access, but that is a judgement, not a measurement. See Adversarial Hardening.

6. Adapting the design to other domains​

The seven layers and the cognitive design are domain-shaped at four points: the safety pattern packs, the corpus, the tool set and the affinity matrix. The remainder is intended to be portable. The sketches below are the author's thinking, not tested products, and the effort estimates are rough.

  • Phone support. The medical-advice layer would be replaced with a legal-advice layer (no warranty interpretation, no refund promises); the hospital taxonomy with a product hierarchy; the tools with product search, human transfer, account lookup and ticket creation; and the six content categories with product-support categories. The author estimated four to six engineering weeks for a rough replica. Risks: a larger personal-data surface (order numbers, billing addresses) and tighter latency expectations.
  • Appointment booking. The retrieval tool becomes an availability query plus slot locking and confirmation, and a new component is needed to turn spoken dates ("next Tuesday at three") into timestamps. Time-zone correctness and race conditions on slot reservation are the main risks. This is the one adjacent domain where a voice-native model is genuinely viable: there is no hard no-medical-advice constraint, and the only consequential output is a structured action. The lesson from the hospital build is to separate conversation from transaction: let the duplex model own the dialogue, and route the booking through a strictly validated, confirmed, idempotent tool call with a spoken read-back before the write.
  • Telemedicine triage. This would be substantially more sensitive. The system would likely be classifiable as software as a medical device under the Medical Device Regulation, requiring CE marking, clinical evaluation and post-market surveillance before serving a single triage call. Citation grounding becomes safety-critical, and the disclaimer becomes mandatory on every turn. The regulatory work would dominate the engineering work.

7. Operating the design​

Per-hospital configuration​

The voice channel is designed for multiple hospitals, each with its own name, campuses, doctors and speech-recognition quirks. Voice configuration has three parts:

  1. Generic patterns and language rules live in the code and are linguistic, not hospital-specific.
  2. Hospital-specific phonetic recovery (for example, a hospital name that is routinely misheard as another word) lives in a per-hospital configuration overlay.
  3. Hospital data (addresses, names, hours) lives in the database and is read at request time, so adding a campus is reflected on the next request without a code change or deployment.

See the Tenant Overlay System. This follows the shared-schema multi-tenant approach of Bezemer and Zaidman 2010. Only one hospital has been onboarded so far.

The Value Framework matrix​

The default intent-by-category matrix multiplies a chunk's similarity score by a value between about 0.55 and 1.30. For example, a practical-information question boosts practical chunks and penalises regulatory ones; a billing question does the reverse. Intents not in the matrix are neutral, so the framework is designed never to make ranking worse than the unfiltered result. The matrix can be overridden per hospital.

Indicative infrastructure​

The pilot runs a media server, a SIP gateway, one or more voice-agent workers (the elastic scale unit), the backend, a PostgreSQL database with a vector extension, a cache and an identity service. The author's rough estimate of the total running cost at the volume in the January 2026 project brief is in the order of several hundred euros per month, dominated by vendor pass-throughs (telephony, language model, speech recognition and synthesis). This is an estimate from the project's own cost tracking, not an invoice. Provisioning steps (domain and certificates, carrier configuration, vendor accounts, identity realm, database bootstrap, per-hospital overlay, smoke test, monitoring and a calibration pass of about a hundred calls) are in the internal runbook, which is not part of the public edition.

What an operator can see without code access​

A non-engineer operator can answer from the dashboard alone: call volume by hour and day, first-audio latency at the median and the tail, category-mismatch rate over time, the safety-refusal rate, the disclaimer rate and the call-disposition mix (answered, escalated, farewelled), and can replay individual calls with citations. Engineers are needed for per-stage latency breakdowns, retry counts, the pattern packs themselves and the affinity entries. The operator cares about outcomes; the engineer about levers.

8. Bibliography​

The full bibliography is on the References page. The most-cited sources, by theme:

Retrieval-augmented generation. Lewis et al. 2020 (original RAG), Gao et al. 2024 (modular RAG), Sarmah et al. 2024 (knowledge graph plus vector hybrid), Cormack et al. 2009 (RRF), Robertson and Zaragoza 2009 (BM25), Nogueira and Cho 2019 (passage reranking).

Embeddings and storage. OpenAI 2024 embeddings, pgvector.

Voice stack. LiveKit Agents, Deepgram Nova-3, ElevenLabs Multilingual v2, Tacotron, Whisper.

Telephony standards. RFC 3261, ITU-T E.164.

Cascade versus voice-native (third-party sources, verified 2026-05-30). Twilio, Core latency for AI voice agents (Nov 2025); OpenAI, Introducing gpt-realtime and the Agents SDK realtime guide; tau-Voice, arXiv:2603.13686; FLEXI, arXiv:2509.22243; VoiceBench, arXiv:2410.17196; VoiceAgentRAG, arXiv:2603.02206.

Conversation analysis and UX. Sacks, Schegloff and Jefferson 1974, Nielsen 1993, Lin et al. 2026.

Safety and compliance. OWASP LLM Top 10, GDPR, AI Act, MDR, HLEG 2019, Zou et al. 2023, Liao and Sun 2024.

Operational practice. Beyer et al. 2016, Bezemer and Zaidman 2010, ISO/IEC 27001:2022.

For depth on any component, see the per-feature pages; this compendium is the orientation document, not the reference manual.