# RAGQnASystem

A Chinese medical question-answering system that combines a Neo4j knowledge graph of diseases with BERT-based entity recognition and a local LLM, using structured graph retrieval instead of a vector database to reduce hallucination.

RAGQnASystem is a medical question-answering system built on knowledge-graph retrieval-augmented generation. It uses a Neo4j knowledge graph built from the DiseaseKG dataset, containing about 44,000 entities and 312,000 relations, combined with a BERT and RNN named-entity recognizer reaching 97.4% F1, to identify what a question is asking about before generating an answer.

A local LLM served through Ollama classifies the question's intent into one of 16 categories, queries the knowledge graph with Cypher, and streams a generated answer back through a Streamlit interface that also provides login, multi-window chat, model selection and an admin panel. Because retrieval comes from a structured graph rather than a vector database, the project aims to give the model more reliable domain knowledge and fewer hallucinated medical answers.

Website: https://github.com/honeyandme/RAGQnASystem
