Retrieval · Graphs and evidence

GraphRAG Visualised

See a Bristol launch question travel through a 3D graph into source passages and a cited answer. Adjust graph hops and passage budget, then press Play.

Graph hops 1
Passage budget 4
Ready · 1 / 9

Why is the Bristol launch at risk?

  1. Query
  2. Route
  3. Search
  4. Context
  5. Answer

A question enters the system

Why is the Bristol launch at risk?

Choose how far to search and how many passages to keep. Press Play to follow the question through the system.

A question enters the system. Why is the Bristol launch at risk?Bristol launchQueryContextAnswer

Gold links have been followed. Blue inputs carried earlier passages into context. Muted nodes have not been reached.

Passages in context 0

No passages have entered context yet.

Answer pending. Retrieval comes first.

Fictional UK documents, hand-authored entity matches and teaching vectors. This local GraphRAG example follows relationships in either direction and ranks candidate passages by cosine similarity. Graph hops changes the search scope; passage budget limits the evidence kept for the answer.

GraphRAG Visualised follows one question: why is the Bristol launch at risk? Press Play to see it move through a 3D graph, collect source passages and form a cited example answer. Graph hops and Passage budget are the two settings. Play resumes a paused sequence or starts it again after completion; changing either setting prepares a fresh run.

The example follows a fictional UK operations team. A Bristol launch needs a sensor delivery, engineers are shared with Leeds, and a component substitution requires assurance approval. The graph connects these entities to the documents that describe their relationships.

Local retrieval starts at the entity named in the question. Graph hops determines how far it explores the connected neighbourhood. The animation names the new entities as they join the search. Their linked passages become retrieval candidates, ranked here using toy cosine similarity.

Passage budget determines how many of those candidates enter context. More graph exploration can find more candidate evidence, but a small budget can still exclude an important passage. Try one hop with four passages, then increase the budget and watch the answer change. The graph and answer use the same selected evidence.

Source passages appear as the run progresses. A graph path points towards possible evidence; it does not prove a claim. Each authored answer point declares its required passages. The example includes it only if those sources are present in context and identifies the evidence missing from withheld points.

This is a simplified local GraphRAG example. The documents, entity matches, graph relationships, vectors and candidate answers are authored fixtures. No language model is called. Real GraphRAG systems also support community-report approaches for broader questions and need evaluation of extraction quality, retrieval relevance and whether the cited text actually supports the answer.

The maths

Toy passage ranking
sim(q,p)=qpqp\operatorname{sim}(q,p)=\frac{q\cdot p}{\lVert q\rVert\lVert p\rVert}

The local retrieval example ranks candidate passages with cosine similarity. These three-dimensional vectors are authored examples, not embeddings produced by a language model.

The provenance check
covered(c)=1[ScSavailable]\operatorname{covered}(c)=\mathbf{1}\left[S_c\subseteq S_{\mathrm{available}}\right]

Each authored claim c declares its required passages S. It passes the demonstration check only when every required passage is present in the selected context. A graph path alone cannot pass this check.

Sources and model assumptions

Follow the original mechanism behind this explainer. The interactive examples identify their toy data and simplifying assumptions above.

Related terms

More visualisations

Building with language models?

These explainers come out of the work. If you want the same thinking applied to your own system, that is what I do.

See how I can help