GraphRAG-Causal
My final-year research. A framework that turns news headlines into causal knowledge graphs, then uses the nearest graphs to teach an LLM what causes and effects look like. Published on arXiv.
The idea
The problem
News is full of causes and effects, and many are never stated outright. Classic NLP struggles with these implicit links, especially when there is very little labelled data.
The answer
Skip the fine-tuning. Turn labelled headlines into a graph, find the past events most like a new sentence, and show them to an LLM as examples. The model learns from its neighbours.
The three-stage pipeline
Annotate, retrieve, infer. The same three stages the paper describes.
Headlines are labelled with cause, trigger, and effect, written as XML tags, and converted into causal graphs.
Graphs and their embeddings are stored in Neo4j. A hybrid Cypher query finds events that are close in meaning and in graph shape, using multi-hop traversal.
The top K retrieved graphs (5, 10, 15 or 20) go into a few-shot prompt written in XML. The LLM classifies and tags the causal relationship.
An agentic extension in CrewAI Flows plugs in the graph database and web search, for controllable causal inference.
What a causal graph looks like
An illustration of the idea, not a line from the dataset. Every labelled sentence becomes a small graph like this, and the graphs link up into a bigger one.
Multi-hop traversal follows paths like this one, so a new sentence can match an old event that shares its structure and not only its words.
The numbers
Measured on CausalNewsCorpus, with the examples retrieved from the graph.
82.88% F1 and 80% accuracy, on par with fine-tuned BERT-Large
reports an F1 of 82.1% on causal classification with just 20 few-shot examples
1,023 news sentences labelled with cause, trigger, and effect
Top K of 5, 10, 15, and 20
DeepSeek distill Llama 70B and Llama 4 (Maverick)
News reliability, misinformation checks, and policy analysis
Why it works
Four choices that carry the result.
Graph retrieval replaces fine-tuning, so the method works in low-data settings.
Embeddings match what a sentence says. Graph structure matches how its causes and effects connect. The hybrid query uses both.
XML prompts give the model a fixed shape to follow, so the output is easy to check and parse.
A GUI shows the causal graph, and the CrewAI Flows extension lets an agent query the graph and search the web.
Built with
| Framework | CrewAI Flows, FastAPI |
|---|---|
| Graph | Neo4j with Cypher, plus embeddings |
| Models | DeepSeek distill Llama 70B, Llama 4 (Maverick) |
| Tooling | Docker, notebooks for loading data and embeddings, a GUI to explore results |