All projects
Knowledge GraphsActive

EHR-Clinical-Assistant

Does graph retrieval beat SQL for clinical Q&A?

EHR-Clinical-Assistant

About

A thesis experiment rigorously comparing graph-based retrieval against SQL and LLM-only baselines for clinical question answering. Synthetic dataset of 2000+ patients (Synthea, seed 42) with 7 node types and 12 relationships in Kuzu, mirrored in Postgres. 80-question evaluation harness covering simple lookup, multi-hop, temporal, cohort, and reasoning questions. A unified provider abstraction routes the same harness through Claude (via MCP) and Ollama, plus a doctor-facing chat UI with streaming responses, an interactive Sigma.js patient graph, and document generation (referral letters, SOAP notes).

Status

Currently the thesis-in-progress. Evaluation harness, retrieval strategies, and clinical chat UI all run end-to-end. Preliminary results on simple-lookup questions favor graph retrieval (around 81% accuracy versus 76% for the SQL baseline).

Next steps

  • Finish the comparison write-up across graph, SQL, and LLM-only retrieval
  • Run remaining ablations on open-source models (qwen2.5:32b, mistral-small)
  • Extend the evaluation to multi-hop, temporal, cohort, and reasoning question types
  • Polish the doctor-facing UI for the thesis defense demo

Stack

TypeScriptKuzuPostgreSQLClaude CLIOllamaMCPFastifyReactSigma.jsSynthea

Links

More in Knowledge Graphs