Round 2 of the TigerGraph Agentic GraphRAG Hackathon. Repo, answers, logs and
every number below are linked at the end — all of it recomputes from the
answer files with one command.
Round 2 handed over a 3,530-document corpus and a hundred questions, fifty
with published answers and fifty held back. Build an agentic GraphRAG system.
Report accuracy, tokens and latency — and report them for plain RAG and for
GraphRAG too, on the same questions, with the same model.
That last requirement is the one that made this interesting, because it is the
requirement that can embarrass you. Here is what I got:
| pipeline | accuracy | fully correct | status correct | tokens/q | latency avg |
|---|---|---|---|---|---|
| basic RAG | 61.2% | 22/50 | 33/50 | 9,252 | 4.7s |
| GraphRAG | 63.3% | 23/50 | 38/50 | 12,774 | 4.7s |
| agentic GraphRAG | 93.9% | 44/50 | 49/50 | 10,506 | 18.2s |
Adding a knowledge graph to retrieval bought 2.1 points. Putting an agent
on top of that graph bought 30.6. If you have read a GraphRAG post before,
that first number is probably not the one you were expecting, so let me be
precise about how it was measured before I argue about what it means.
The baselines got my best prompt
A comparison is worth exactly as much as its fairness, and the easiest way to
win one is to hand the baseline a worse prompt than you gave yourself. So the
baselines import from the agent rather than reimplementing it: the same
answering model, the same 200-line composer prompt, the same structured output
schema, the same tracing code that counted tokens and latency for my own
submission, and the same judge. The only thing that differs between the rows
is what goes into the evidence block.
- basic RAG — vector search over 16,377 chunk embeddings, read the text.
- GraphRAG — the same search, resolve the hits to the entities those documents describe, take one hop out, and add the graph facts and claims to the same twelve chunks. Its evidence is a strict superset of basic RAG's.
- agentic — plan the retrieval, route to 32 installed TigerGraph queries, and do the arithmetic in Python.
The wrong conclusion I had ready
The first GraphRAG run scored 53.5% — below plain RAG. Worse on 15
questions, better on 3. And I had a tidy explanation waiting, because it was
my own project's thesis: one-hop facts hand the model an argmax to perform,
the model performs it badly, and the agent wins because the arithmetic leaves
the model.
Two questions seemed to prove it. Asked which shooting event at the 2024
Olympics had the fewest nations, plain RAG scored 1.0 and GraphRAG scored 0.0
— with every event's nation count sitting in front of it, it answered "Mixed
skeet team, 13 nations", and both halves were wrong.
That story was wrong, and the giveaway was not in the data. It was in my
config. Plain RAG was retrieving 12 chunks and GraphRAG was retrieving 8,
because the graph facts had been eating the rest of the budget. The graph had
not misled the model. The graph had displaced the text.
Re-run at 12 chunks, GraphRAG scores 63.3%, and both of my star examples go
from 0.0 to 1.0. The honest finding is the boring one: at equal budget, graph
facts help slightly. I published the failed 8-chunk configuration next to the
good one anyway, because a comparison that shows only the friendlier of two
runs is not a comparison.
Worth noting what that near-miss cost in a different currency: moving GraphRAG
from 8 chunks to 12 moved it 9.8 points, almost five times what adding the
knowledge graph was worth. Evidence budget was a bigger lever on my baselines
than architecture was.
So what is the agent actually doing?
Not retrieving better. Look at where the gap is widest: status. Every
question carries a verdict — the corpus answers it, answers part of it, or
does not contain it. Plain RAG gets 33 of 50 right, GraphRAG 38, the agent
49.
Knowing when to stop is not a retrieval problem. You cannot fix it by
retrieving more, which is precisely why the baselines cannot climb out of the
low 60s no matter what you feed them.
The other half is arithmetic. The model never counts anything in my system. It
decides what to retrieve; thirty-two installed GSQL queries fetch it; and
Python does every count, every argmax and every tie. The result is written
into the submitted answer file under a computed key, so the arithmetic is
auditable without trusting me or the model. A question like "which event had
the fewest nations" stops being a reasoning task and becomes a min().
The part I expected to lose
I assumed the agent would be the expensive row. It is not:
10,506 tokens per question against GraphRAG's 12,774. $0.00114 against
$0.00134. More accurate and cheaper, because retrieving precisely costs
fewer tokens than stuffing twelve chunks into a prompt and hoping.
What it really pays is latency: 18.2 seconds against 4.7, for 2.42 model
calls and 8.88 graph queries instead of one and three. That is the trade, and
it is a real one. If you need sub-second answers, none of this helps you.
The number I will not round up
My headline accuracy is 93.9%. It is also the top of two different ranges, and
saying so is cheaper than being caught.
Fifteen independent re-runs of the same code on the same questions average
92.0%, sd 1.69. Re-grading the one submitted file four times gives 93.9,
93.3, 93.9, 93.5 — a 0.6-point spread. For a while this repo claimed that
re-grading reproduced the figure "to within 0.1", which was measured on one of
the re-run drafts and never on the file it described. I caught it two days
before the deadline by running it on the actual artifact, and the correction is
in the repo next to the claim it replaced.
The deeper habit behind that: five separate times this month, a published
figure turned out to be an extrapolation nobody had executed against the thing
it described. The README's own first command had never been run end to end —
when I finally ran it, it failed in both directions, and a first build
installed none of the queries. Everything in this post is a number I ran, on
the artifact it is about.
What I would tell someone starting this
- Give your baseline your best prompt. If your architecture only wins against a handicapped comparison, you have measured your prompt.
- Equalise the evidence budget before concluding anything. Mine was off by four chunks and it produced a confident, wrong, publishable story.
- The graph is not the win. Taking work away from the model is the win. The graph is what makes that possible — you cannot compute an argmax over prose — but the points come from the code doing the computing.
- Measure your own variance before a judge does. One run is a draw from a distribution, and if you do not say so, the second run says it for you.
Repo: https://github.com/antcybersec/graph_rag
Live demo: https://graphrag-2.streamlit.app/
Answers, metrics, query logs, graph counts and comparison.json are all in
data/results/r2/. The baseline code is in baselines/. Every figure in this
post recomputes from the answer files — python -m baselines.compare prints
the table.