← all repositories
honeyandme/RAGQnASystem

Medical RAG that ditches vectors for a Neo4j graph

It forces a local Chinese LLM to cite a Neo4j medical graph instead of freelancing clinical advice.

1.3k stars Jupyter Notebook RAG · SearchDomain AppsLanguage Models
RAGQnASystem
Not currently ranked — collecting fresh signals.
star history

What it does A Chinese medical Q&A stack that grounds large language model answers in a Neo4j knowledge graph. It extracts entities from user questions with a fine-tuned BERT+RNN model, classifies intent into one of 16 categories via a local ollama-hosted LLM, retrieves precise subgraphs with Cypher queries, and streams back a synthesized answer through a Streamlit interface.

The interesting bit Instead of dumping medical documents into a vector database, the project keeps roughly 44,656 entities and 312,159 relations in a structured graph, forcing the generative model to cite actual nodes and edges rather than hallucinate clinical advice. The intent router is table-driven, which keeps the 16-class taxonomy out of nested if-else hell.

Key highlights

  • Graph-native RAG: Retrieves from a Neo4j medical graph (diseases, drugs, symptoms, foods, etc.) rather than using embedding similarity search.
  • Local-only operation: Runs on ollama with Qwen (32B by default, 7B fallback) and a local Neo4j instance—no external API calls required.
  • High reported NER accuracy: The BERT+RNN entity recognizer claims 97.40% F1 after data augmentation.
  • Bootstrapped training pipeline: NER training data is generated via AC automaton using entity lists auto-extracted during the graph build.
  • Full-featured Streamlit UI: Includes user login, multi-window sessions, LLM switching, and an admin panel.

Caveats

  • The README explicitly warns that the system collapses if any of its three heavy dependencies—Neo4j, NER model weights, or ollama—are missing; there is no graceful degradation.
  • Default setup demands serious hardware: the recommended Qwen 32B model needs approximately 20 GB of VRAM, though a 7B fallback exists with unspecified accuracy trade-offs.
  • Pre-trained NER weights are distributed through Baidu Netdisk, which may complicate access for users outside mainland China.

Verdict Worth a look if you are building domain-specific Chinese Q&A systems and want to trade vector-database fuzziness for graph precision. Skip it if you need a lightweight, plug-and-play medical chatbot—this is a thesis-scale stack with infrastructure appetite.

Frequently asked

What is honeyandme/RAGQnASystem?
It forces a local Chinese LLM to cite a Neo4j medical graph instead of freelancing clinical advice.
Is RAGQnASystem open source?
Yes — honeyandme/RAGQnASystem is an open-source project tracked on heatdrop.
What language is RAGQnASystem written in?
honeyandme/RAGQnASystem is primarily written in Jupyter Notebook.
How popular is RAGQnASystem?
honeyandme/RAGQnASystem has 1.3k stars on GitHub.
Where can I find RAGQnASystem?
honeyandme/RAGQnASystem is on GitHub at https://github.com/honeyandme/RAGQnASystem.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.