Cut the graph first, then summarise it
GraphRAG answers questions by reading summaries of a knowledge graph. We make it read only the part of the graph that the question is about.
The idea
Microsoft's GraphRAG splits a whole graph into communities and has a language model write a report about each one. Questions are answered by reading those reports, which have to be written for the whole graph before anyone asks anything. We turn the order around.
The whole-graph reports are written once and shared by every question; the small ones are written again for each question.
What happens when you ask
“What is Creutzfeldt-Jakob Disease (CJD)?”A question from BioASQ, followed through the five steps.
-
Read the question
Qwen 2.5 7B lists the genes, diseases and drugs the question names, with their type and standard English name. That is all the model decides.
“Creutzfeldt-Jakob Disease (CJD)” → a disease -
Find it in the graph
Each mention is looked up in a dictionary of node names and synonyms from UMLS, DisGeNET, HGNC and MeSH. Matches are exact after normalising case, punctuation and word order, so every link can be traced back to the name that produced it.
→ the node Creutzfeldt-Jakob disease (UMLS C0022336), by its name -
Grow a subgraph
From the entity we take its direct neighbours, then let DIAMOnD and C3 add the nodes significantly connected to them, the disease module. A random walk from the whole selection adds a last handful of close nodes. No model is involved.
neighbours + DIAMOnD + C3 + random walkEach node remembers which step added it, so one selection gives four nested subgraphs: neighbours only, plus DIAMOnD, plus C3, and the full one. The demo answers with all four.
-
Communities and reports
GraphRAG splits the subgraph into communities with Leiden, and Qwen3 30B writes a short report for each one, from the nodes, their edges and the definitions PrimeKG gives for them. This index is built for this question only.
A handful of communities, each with its own report -
Answer
The question is put to every report, the useful points are scored, and the best ones are merged into one paragraph that cites the reports it relies on.
Only those reports are read · GraphRAG on the whole graph reads many more, and spends more tokens, for the same question
Under the hood
The graph and the recorded runs
PrimeKG, integrated in an earlier thesis of the lab with gene and disease associations from DisGeNET, plus a drug layer of bioactivity and chemical similarity built in the lab. It is served from Neo4j. The demo replays the questions of the BioASQ summary evaluation from the pipeline's own outputs, packed so a browser can play them back without a GPU. The thesis will be published soon.
Ezequiel González Grenat, Bioinformatics Lab, Leloir Institute. Thesis work on query-first subgraph selection for biomedical GraphRAG.
