Caesar's Rome
Ask about the people, alliances and rivalries of Rome. Answers come only from the graph, as the world stood at the end of 45 BCE.
Small dots are relationships linking everyone they touch. Hover for details, scroll to zoom, drag to move.
Inspiration
From Local to Global: A Graph RAG Approach to Query-Focused Summarization
Read the paper ↗What the paper does
Ordinary retrieval-augmented generation (RAG) fetches the text chunks that look most like the question. That works for specific lookups, but it struggles with complex and deep lookups. The paper's GraphRAG has an LLM read the documents and build a knowledge graph of entities and their relationships, then prepares summaries of groups of closely related entities. To answer, each summary contributes a partial answer and the partial answers are combined. On datasets of around a million tokens, the authors report answers that were more comprehensive and more diverse than those from conventional RAG.
What this project takes from it, and where it differs
- The shared idea:Then answer come from the graph instead of from raw chunks. Thus, the answer can be traced back to the evidence in the source documents Avoiding halucination. Here, an LLM reads each chunk of the source files and fits what it finds into a fixed graph schema. The checked results are saved as
- Relationships with more than two sides: an alliance or a rivalry can link several people at once (a hypergraph), with each person's role.
- Evidence you can check: every fact carries a source quote, and code verifies that the quote appears word for word in the source.
- A fixed moment in time: nothing dated after 45 BCE is allowed in, so the world can be explored without knowing how the story ends.
- An agent that walks the graph: instead of pre-written community summaries, an agent follows links with tools to trace chains of reactions.
graph.json, and HyperNetX builds the hypergraph structure from that file.
This project is inspired by that paper. It is not affiliated with, or endorsed by, the authors.
Future prospects
Dry-running policy before it is made
A graph of who wants what, and who is tied to whom, can be used to rehearse a decision: change something in the world, then trace who it touches and how the reaction spreads. Every step points back to the evidence behind it.
Trace the chain of reactions
A policy touches certain goals and values. The agent follows them to the groups affected, then to who reacts to those groups. Ask a "what if" question on this page and the graph shows what the answer used.
Stakeholder maps for real policy
Swap in documents about a modern issue, such as a bill, a regulator or industry groups. The same pipeline gives a map of who gains, who loses, and the evidence trail behind each claim.
Compare two versions of a policy
Run both and see which relationships and motives each one disturbs, side by side.
Stakeholders that speak for themselves
Let each group answer in its own voice from its own part of the graph. It would cost more and needs strict controls on what each one may know.
Big-picture questions
Add community summaries, as in the GraphRAG paper, to answer questions such as "what are the main fault lines overall?"
Worlds that change over time
Keep snapshots by date to watch alliances and rivalries shift, and to test a decision at different moments.
What this is not. It is a rehearsal tool, not a forecast. When the graph does not record a reaction, the agent is inferring it and says so. The results are only as good as the source documents, and people, not the tool, should make the decision.