Design and Implementation of a Knowledge Graph Enhanced Medical RAG System with Smart Routing

Generic Large Language Models (LLMs) often suffer from hallucinations and resource inefficiency when applied to the vertical medical domain. This technical report presents the implementation of AI-Medical-Chatbot, an open-source question-answering system that integrates a deterministic Knowledge Graph (KG) with Retrieval-Augmented Generation (RAG). We constructed a specialized graph database containing 22,462 medical entities (including Diseases, Drugs, and Symptoms) and 196,232 relationships. To balance accuracy and cost, the system features a "Smart Routing" agent that dynamically dispatches user queries to three distinct handlers: Graph Retrieval (for precise medical facts), Vector Search (for unstructured documents), or General LLM (for chitchat). Experimental deployment demonstrates that this architecture enhances factual grounding and reduces token consumption by approximately 70% compared to full-context LLM reliance.

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-12-17
DOI
https://doi.org/10.5281/zenodo.17959854
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Design and Implementation of a Knowledge Graph Enhanced Medical RAG System with Smart Routing

Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
article

Design and Implementation of a Knowledge Graph Enhanced Medical RAG System with Smart Routing

article en

Abstract

Generic Large Language Models (LLMs) often suffer from hallucinations and resource inefficiency when applied to the vertical medical domain. This technical report presents the implementation of AI-Medical-Chatbot, an open-source question-answering system that integrates a deterministic Knowledge Graph (KG) with Retrieval-Augmented Generation (RAG). We constructed a specialized graph database containing 22,462 medical entities (including Diseases, Drugs, and Symptoms) and 196,232 relationships. To balance accuracy and cost, the system features a "Smart Routing" agent that dynamically dispatches user queries to three distinct handlers: Graph Retrieval (for precise medical facts), Vector Search (for unstructured documents), or General LLM (for chitchat). Experimental deployment demonstrates that this architecture enhances factual grounding and reduces token consumption by approximately 70% compared to full-context LLM reliance.

Zenodo (CERN European Organization for Nuclear Research)
Decent work and economic growth
Openalex Percentile: Top 19%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.