liuhuanyong/qasystemonmedicalkg — explained in plain English
Analysis updated 2026-06-24
Build a question-answering system that looks up which drugs treat a disease or which symptoms might indicate a condition.
Study how to connect a Neo4j graph database to a natural-language question classifier for structured medical queries.
Use the knowledge graph as a dataset for Chinese medical NLP research or as a foundation for a medical chatbot.
| liuhuanyong/qasystemonmedicalkg | python-trio/trio | francescopace/espectre | |
|---|---|---|---|
| Stars | 7,267 | 7,261 | 7,260 |
| Language | Python | Python | Python |
| Setup difficulty | hard | easy | moderate |
| Complexity | 4/5 | 3/5 | 3/5 |
| Audience | researcher | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Requires a locally running Neo4j instance and a multi-hour data loading step before the chatbot is ready to use.
This project builds a medical knowledge graph focused on diseases, then uses that graph to power a question-and-answer chatbot. The entire pipeline, from collecting raw data to answering user questions, is built from scratch in Python. The source data comes from Chinese medical websites, and the project is documented primarily in Chinese. The knowledge graph contains roughly 44,000 medical entities organized into seven categories: diseases, symptoms, drugs, foods, diagnostic checks, hospital departments, and commercially available drug products. These entities are connected by about 300,000 relationships, capturing things like which drugs are commonly prescribed for a given disease, which foods are recommended or should be avoided, which tests are needed for diagnosis, which diseases frequently appear together, and which department a disease belongs to. All of this is stored in a Neo4j graph database, which is a type of database designed specifically for representing connections between things. The question-answering system sits on top of the graph. When a user types a question in natural language, the system classifies what type of question it is, then translates it into a graph database query to look up the answer. The supported question types cover most practical medical lookup needs: what are the symptoms of a disease, what might cause a given symptom, what should a patient eat or avoid, what drugs treat a condition, what tests diagnose a condition, how long does treatment typically take, and what is the cure rate. To run the project, you need a Neo4j database running locally, the appropriate Python dependencies installed, and then run the graph-building script to load all the data, which takes several hours due to the volume. After that, a chat script starts the question-answering interface. This is a tutorial and research project, not a production medical service. It demonstrates how knowledge graphs can be combined with natural-language question classification to answer structured queries without requiring a large language model.
A Python project that builds a Chinese medical knowledge graph of 44,000 entities and 300,000 relationships in Neo4j, then uses it to answer natural-language health questions without a large AI model.
Mainly Python. The stack also includes Python, Neo4j.
Setup difficulty is rated hard, with roughly 1day+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.