Abstract
This thesis is published as submitted in spring 2026 (chapters first drafted in February 2026 and revised through May 2026, before the 1 June 2026 demonstration to the jury). Security-sensitive implementation detail has been redacted for this public edition. Events after submission, namely the June 2026 dose incident and the policy change that followed, are documented at Safety overview. Where a statement was later contradicted by events, an editor's note marks it.
Ziekenhuis Oost-Limburg (ZOL), a hospital in Belgian Limburg, receives, according to the January 2026 project brief, over 100 000 monthly web visitors generating approximately 25 000 search queries per month. The existing Elasticsearch keyword search fails because patients pose natural-language questions in colloquial Dutch while content is indexed in clinical terminology. This thesis presents the design, implementation, and evaluation of a Retrieval-Augmented Generation (RAG) system with conditional knowledge-graph enrichment as a replacement.
The system employs an eleven-stage query pipeline combining hybrid retrieval (dense vectors + BM25 via Reciprocal Rank Fusion), cross-encoder reranking, conditional PostgreSQL-based taxonomy enrichment (1 564 entities at time of evaluation; 2 663 post-deduplication), SNOMED CT Belgian Edition integration for Dutch medical-synonym resolution, and a five-layer defence-in-depth safety architecture enforcing a zero-medical-advice posture. (Editor's note, October 2026: on 1 June 2026 the pilot gave dosing advice; see Safety overview.) Eight languages are supported over Dutch-language hospital content (Editor's note, October 2026: the project's code today handles twelve languages in the web chat and four on voice calls; see the EU AI Act position); the architecture is Modular RAG in the typology of Gao et al. 2024.
Evaluation uses 302 golden questions spanning 21 categories. A fractional-factorial ablation isolates CRAG, FILCO, and Guardrails contributions, with 10 000-resample bootstrap confidence intervals and McNemar's test. The system achieves 99.0 % pass rate (Editor's note, October 2026: self-reported, on the project's own golden-question set; for runs from mid-May 2026 the score measures entity recall and must-refuse behaviour only, not answer correctness) (296/299, 95 % CI [0.977, 1.000]) and entity recall 0.932 [0.916, 0.965], with zero medical-advice incidents across all evaluation configurations. (Editor's note, October 2026: on 1 June 2026 the pilot gave dosing advice; see Safety overview.) Individual features each improve quality (CRAG +2.5 pp; FILCO +2.5 pp; Guardrails +3.7 pp), but combined activation regresses to 96.3 % — a feature-interaction effect that is itself a contribution. (Editor's note, October 2026: a later analysis in the Evaluation overview found the guardrails feature to be neutral, and the guardrails classifier was never enabled in production and was removed in July 2026.) FILCO reduces median latency by 29 %.
The work contributes: (1) a production-grade hospital-search RAG system deployed to a pre-production pilot; (2) the conditional-graph-injection finding not previously reported in the GraphRAG/HybridRAG literature; (3) a five-layer safety architecture with sub-five-millisecond statistical detector against gradient-based adversarial-suffix attacks (Zou et al. 2023); (4) a reusable golden-standard evaluation framework; and (5) a three-phase SNOMED CT integration. The system has not been evaluated with real visitors; a real-user study is identified as the highest-priority future work.