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