Construction and application of a medical knowledge graph based on large language models
Zhang, Hanyuan (2026)
Kandidaatintyö
Zhang, Hanyuan
2026
School of Engineering Science, Tietotekniikka
Kaikki oikeudet pidätetään.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi-fe2026060864949
https://urn.fi/URN:NBN:fi-fe2026060864949
Tiivistelmä
Medical information is vast, fragmented, and rapidly evolving, posing significant challenges for healthcare professionals and patients seeking to efficiently access, integrate, and reason over relevant knowledge. Traditional keyword-based search engines fail to capture the rich semantic relationships embedded in medical literature, while manually curated ontologies struggle to keep pace with the explosive growth of biomedical knowledge. Knowledge graphs (KGs), which represent domain knowledge as structured collections of entity-relation triples, offer a promising approach to address these limitations by enabling semantic search, multi-hop reasoning, and explainable question answering. However, constructing highquality medical KGs—particularly for Chinese clinical contexts—has historically required substantial manual annotation effort.
This thesis presents MedKG, an automated pipeline for constructing a domain-specific Medical Knowledge Graph from unstructured Chinese clinical guidelines using Large Language Models (LLMs), and deploying the resulting graph as the foundation of an intelligent Question-Answering (QA) system. The system employs Google Gemini-1.5-flash as the primary LLM for joint Named Entity Recognition (NER) and Relation Extraction (RE), guided by carefully engineered few-shot prompts that define 10 entity types and 12 relation types. Extracted structured triples are persisted in a Neo4j graph database with uniqueness constraints and full-text indexes to ensure data integrity and efficient retrieval.
A downstream GraphRAG-style QA pipeline translates natural-language user queries into Cypher graph queries using the LLM, executes them against Neo4j, and synthesises clinically grounded answers from the retrieved subgraph. Experiments conducted on a Chinese clinical guideline corpus covering three prevalent chronic diseases—hypertension, coronary heart disease, and type 2 diabetes—yielded 210 unique entities and 225 unique relations after deduplication. Qualitative QA evaluation confirms the system's ability to accurately answer clinical questions on drug contraindications, adverse effects, treatment protocols, and disease risk factors. This work demonstrates that LLM-driven knowledge graph construction is a viable, cost-effective approach for organising complex medical knowledge and enabling intelligent clinical decision support.
This thesis presents MedKG, an automated pipeline for constructing a domain-specific Medical Knowledge Graph from unstructured Chinese clinical guidelines using Large Language Models (LLMs), and deploying the resulting graph as the foundation of an intelligent Question-Answering (QA) system. The system employs Google Gemini-1.5-flash as the primary LLM for joint Named Entity Recognition (NER) and Relation Extraction (RE), guided by carefully engineered few-shot prompts that define 10 entity types and 12 relation types. Extracted structured triples are persisted in a Neo4j graph database with uniqueness constraints and full-text indexes to ensure data integrity and efficient retrieval.
A downstream GraphRAG-style QA pipeline translates natural-language user queries into Cypher graph queries using the LLM, executes them against Neo4j, and synthesises clinically grounded answers from the retrieved subgraph. Experiments conducted on a Chinese clinical guideline corpus covering three prevalent chronic diseases—hypertension, coronary heart disease, and type 2 diabetes—yielded 210 unique entities and 225 unique relations after deduplication. Qualitative QA evaluation confirms the system's ability to accurately answer clinical questions on drug contraindications, adverse effects, treatment protocols, and disease risk factors. This work demonstrates that LLM-driven knowledge graph construction is a viable, cost-effective approach for organising complex medical knowledge and enabling intelligent clinical decision support.
