ZOL Intelligent Search
Transforming hospital information retrieval through Retrieval Augmented Generation
Business Context
Ziekenhuis Oost-Limburg (ZOL) is one of Belgium's largest hospital networks, serving the eastern Limburg region across four campuses: Sint-Jan, André Dumont, Sint-Barbara, and Maas en Kempen. With over 100,000 monthly website visitors generating approximately 25,000 search queries per month, the hospital's digital front door is a critical touchpoint for patient care navigation.
The hospital maintains an extensive content library -- over 1,000 medical brochures, 700+ condition descriptions, and detailed information about departments, doctors, treatments, and consultation schedules. This wealth of information, paradoxically, has become part of the problem: patients struggle to find what they need.
Problem Statement
The existing search infrastructure relies on Elasticsearch keyword matching, a technology well-suited for structured catalog searches but fundamentally inadequate for the nature of medical information seeking. Consider a patient who types:
"Ik heb al weken last van mijn knie en het wordt niet beter" (I've been having trouble with my knee for weeks and it's not getting better)
A keyword search engine fragments this into individual terms -- knie, weken, beter -- and attempts lexical matching against indexed content. It cannot understand that this patient likely needs information about orthopedics, Dr. Van den Berg's consultation hours, or the sports medicine department at Campus Sint-Jan.
Keyword retrieval fails on hospital information-seeking for three structural reasons, each of which a later subsystem is designed to close:
- Vocabulary gap — patients use colloquial Dutch ("suikerziekte") while content uses clinical terminology ("Diabetes Mellitus"), so lexical matching misses the correspondence. (Addressed by SNOMED CT synonym expansion.)
- Relational reasoning — a need such as "which doctor treats this condition, and at which campus" requires traversing typed relationships (doctor → department → condition → campus) that document-level ranking cannot infer. (Addressed by the taxonomy / knowledge graph.)
- Structural authority — the system must distinguish an authoritative listing (the official doctor directory) from an incidental mention (a name in a brochure), a distinction that lexical scores do not capture. (Addressed by golden-page seeding.)
The measurable consequences of these failures are irrelevant results, increased call-centre load, delayed care navigation, and under-utilised digital content despite significant investment in its creation.
The Solution: Retrieval Augmented Generation
The ZOL Intelligent Search system replaces keyword matching with a Retrieval Augmented Generation (RAG) architecture (Lewis et al., 2020) that combines four complementary AI capabilities:
Semantic Understanding
Rather than matching keywords, the system converts both queries and content into dense vector embeddings produced by OpenAI text-embedding-3-large (see ADR-0048). These 1,536-dimensional vectors capture semantic meaning, allowing the system to understand that "pijn in mijn knie" (pain in my knee) is semantically related to "orthopedische consultatie" (orthopedic consultation) even though they share no common words. The dense bi-encoder retrieval pattern follows Karpukhin et al. 2020.
Keyword Search (BM25)
Semantic similarity alone misses exact term matches. A query for "Dr. Vanderstraeten" or "cardioversie" should return precise keyword hits. BM25 search via PostgreSQL tsvector runs in parallel with vector search, and the results are merged using Reciprocal Rank Fusion (RRF, k=60) — a score-agnostic fusion method that combines results based on rank position rather than raw scores. Each chunk is additionally enriched with canonical questions -- Dutch questions the chunk answers -- to bridge the vocabulary gap between how patients ask and how content is written. See Hybrid Search Strategy and ADR-007.
Knowledge Graph
PostgreSQL taxonomy tables capture the explicit relationships between medical entities -- which doctors work in which departments, which departments treat which conditions, which campuses offer which services. This structured knowledge enables precise entity lookups that pure vector similarity cannot achieve: "Who is the orthopedic surgeon at Sint-Jan?" requires relational lookups across taxonomy tables, not semantic similarity.
Safety-First Design
Operating in the medical domain imposes an absolute constraint: the system must never provide medical advice. A multi-layer safety architecture -- intent classification, post-generation validation, quality gates, and mandatory disclaimers -- ensures that every response remains strictly informational and navigational.
Success Metrics
| Metric | Target | Measurement Approach |
|---|---|---|
| Search relevance improvement | +20% | A/B testing against Elasticsearch baseline |
| Call center load reduction | -15% | Call volume correlation with search satisfaction |
| Medical advice incidents | ZERO | Automated safety monitoring + manual audit |
| Response latency (P95) | < 12 seconds | Prometheus metrics |
| User satisfaction | > 4.0/5.0 | In-chat feedback widget |
Academic Context
This project constitutes the graduation thesis for the AI Technology Architect program at PXL University College (Hasselt, Belgium). It demonstrates the practical application of modern AI architecture patterns -- RAG, knowledge graphs, multi-model LLM orchestration, and safety engineering -- in a real-world healthcare setting.
This documentation covers the architectural design, technical decisions, and theoretical foundations of the system. It deliberately omits implementation-level code in favor of diagrams, conceptual explanations, and architectural reasoning suitable for an academic and executive audience.
Navigation Guide
- New to RAG? Start with What is RAG? for a comprehensive introduction
- Architecture overview? See System Overview
- Voice channel? See Voice Stack Compendium for the LiveKit + Twilio voice cascade architecture
- Safety concerns? Read Safety Architecture
- Technical decisions? Browse Architecture Decision Records
- How queries work? Follow the Query Processing Pipeline
- Empirical results? Read Thesis Chapter 4 — Results for the 99.0% golden-eval pass-rate run with bootstrap CIs and latency distribution