Query-first GraphRAG from a question to an answer over a biomedical knowledge graph
Bioinformatics Lab, Leloir Institute
How it works Code

Answer from a small part of the graph, not the whole graph.

A question names genes, diseases or drugs. The pipeline keeps only the part of a biomedical knowledge graph around them and has a language model answer from summaries of that part. On the 100 BioASQ questions shown here, keeping only the neighbours of those entities spends about 7 times fewer tokens than GraphRAG on the whole graph (median, detection and index included). The full subgraph spends about the same, and more in 43 of the 100. What it saves in tokens it pays in time: writing its own reports takes longer than reading the ones the whole graph already has.

Type a question, or replay one already answered.

Pick a question on the left to see how it was answered.

Each step of the pipeline appears here, one below the other: the entities found in the question, the subgraph grown around them, the community reports written over it, and the final answer with its sources.