Ontology-Grounded Retrieval for Clinical LLM Question Answering: A SNOMED CT Knowledge Graph Approach
Abstract
Clinical questions often hinge on a single typed relationship: whether metformin is safe for a patient with stage 4 chronic kidney disease comes down to one contraindication edge. Dense retrieval over clinical text tends to miss that edge because contraindications appear in prescribing guidelines while query terms appear in patient notes. We address this by building a clinical knowledge graph of roughly 45,000 entities and 180,000 edges from SNOMED CT, ICD-10, de-identified clinical note templates, and public guidelines, canonicalised via UMLS CUIs. Fixing the schema at six entity types and thirteen relation types enables a parameterised Cypher template to query 1- and 2-hop subgraphs. At query time, retrieved triples are serialised with SNOMED identifiers and sources, merged with PubMedBERT/FAISS vector passages, re-ranked via a cross-encoder, and passed to the generator. On 150 questions authored and rated by two physicians and a clinical informaticist, hybrid KG-RAG with GPT-4 improves accuracy from 71.3% to 84.6%, traceability from 45.3% to 78.0%, and reduces unsupported claims from 18.7% to 12.8% over vector-only RAG. Using Llama-3-8B yields comparable gains (accuracy: 59.3% to 73.3%; traceability: 36.7% to 68.7%). Per-category gains are largest on medication management (+17.2 points) and smallest on lab interpretation (+5.8 points), suggesting that the graph supplies specific typed edges while reasoning remains in the model. Key limitations include tentative inter-rater agreement (Krippendorff's alpha of 0.78 for accuracy and 0.71 for hallucination) and a schema lacking temporal or dose-dependent relations.