arrow
Return

Knowledge Graphs vs. SQL over Structured EHR Data

delete2026-07-17
delete0
delete
OA
AI
L
Leonidas Anagnou
A
Andreas Vezakis
I
Ioannis Vezakis
I
Iοannis Kakkos
Ο
Ουρανία Πετροπούλου
G
George K. Matsopoulos *
DOI:10.3390/fi18070365delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Clinical question answering over electronic health records (EHRs) increasingly relies on large language model (LLM) agents that retrieve structured patient data through external tools. Published benchmarks, however, evaluate these systems at a single patient-population size, and rarely measure the effect of backend representation from that of the retrieval interface design. This paper compares six retrieval configurations that vary along two axes: backend (a property graph database, a relational database and a dense vector index) and interface design (curated domain-specific tool calls, model-generated queries, full-text search, and single-shot dense retrieval). The evaluation covers a 334-question bank spanning six categories (simple lookup, multi-hop, temporal, cohort, reasoning, and unanswerable), instantiated at three nested population scales: 200, 2000, and 20,000 alive patients from a single Synthea cohort. Four models are compared: Claude Haiku 4.5, Qwen 2.5 72B, Llama 3.1 8B, and Llama 3.3 70B, spanning closed-frontier and open-source alternatives. Curated tool-calling configurations improve accuracy over retrieval-augmented baselines for capable models, but reduce accuracy for a small open-source model due to function-calling protocol failures. We report how accuracy, latency, and cost evolve with each approach, model size, and cohort size, supported by paired statistical tests and confidence intervals. All benchmark components, databases, and evaluation code are publicly available.
Keywords:
large language models
LLM
SQL
knowledge graphs
structured data
EHR data
question answering

Journal

Future Internet cover
Future Internet
IF:
3.6
Papers:
1.2K
Citations:
6.5K

Organization

N
National Technical University of Athens
Scholars:
9.6K
Papers: 9.5K
Citations: 8.2K