
How I built MoolTrace: finding the retracted trial hiding two hops under a health AI answer
I ran all 35 of Harvard's vitamin pages through a citation check and every one passed. Two of them are built on research that got retracted. So I built MoolTrace to follow the chain down and catch it, with FalkorDB making the call.
A FalkorDB graph that follows what an AI answer actually rests on, and lets the graph, not the model, decide whether it ships.
Live demo: https://mooltrace.h9g8gwz2b559t.ap-south-1.cs.amazonlightsail.com/
Demo video: https://youtu.be/XZV5lt-FuE8
Code: https://github.com/SidTheKid-dotcom/MoolTrace

A citation check said all 35 were fine
Health AI apps love to cite. Ask a nutrition chatbot about vitamin D and it will point you to a page from Harvard. That feels safe. It's Harvard.
So I took Harvard's Nutrition Source, every vitamin and mineral page, 35 of them, and ran them through the kind of citation check most teams would use. All 35 passed.
Two of them rest on research that was retracted or withdrawn.

Here's vitamin D. The Harvard page cites a 2014 Cochrane review. That review counted a 2004 trial (Ishida) as one of its included trials. In May 2025, that trial was retracted. The notice says the evidence strongly argues for scientific misconduct.
The notice sits on the trial. The trial is two hops below the page. The AI answer that cites the page looks completely clean.
That is the whole project. This post is how I built a tool that walks down those hops, how I got FalkorDB to make the call instead of the model, and the one bug that almost made the whole thing a lie.
Why a plain check misses it
A normal citation check looks at the DOIs written in the answer. Is this DOI retracted? No? Ship it.
Easy, right?
It doesn't work, because the problem is almost never in the thing you cite. It's in the thing that thing cites. A web page doesn't get retracted. A review mostly doesn't either. The trial underneath does, and nothing on top changes when it happens.
So you need to follow the chain. And a chain of "rests on" is a graph.
The graph
Everything lives in one FalkorDB graph.
(:Answer)-[:CITES]->(:Source)-[:RESTS_ON]->(:Work)-[:RESTS_ON]->(:Work)<-[:FLAGS]-(:Notice)- An Answer is what your AI is about to say.
- A Source is the web page it cites.
- A Work is a paper: a review, a trial.
- A Notice is a retraction, a withdrawal or an expression of concern.
Every RESTS_ON edge has a weight: how much one side actually leans on the other. A page that just mentions a review gets 0.55. A review that pooled a trial's data gets 0.85. And every edge keeps the sentence it came from, so each hop can show you why it exists.

Depth is the whole point
Here is the same Harvard answer at two depths.
At 1 hop, MoolTrace looks at the page and what it cites directly. Nothing is flagged. Clear.

At 2 hops, it follows the page into the Cochrane review, and the review into Ishida 2004. Don't ship.

Same answer. Same page. One extra hop, and the verdict flips. That hop is something the agent can't see on its own, and it's exactly what the graph is for.
The bug that almost made it a lie
My first version used a plain shortest path from the source to any flagged paper. It felt right. It gave me a false pass.
A short, weak path was hiding a longer, stronger one. The query found the shortest route, saw it was weak, and the answer came back clean when it wasn't. For a tool whose whole job is to catch bad answers, a false pass is the worst thing it can do.
The fix is one line of maths. I don't want the shortest chain. I want the strongest one, the chain with the highest product of weights. Shortest-path algorithms add costs, they don't multiply them. So every edge stores:
cost = -ln(weight)Adding minus-logs is the same as multiplying weights. Now the cheapest path is the strongest chain. For vitamin D: 0.55 × 0.85 = 0.47. Don't ship.
This is the real query MoolTrace runs, using FalkorDB's built-in
algo.SPpaths :MATCH (a:Answer {id: $answer_id})-[:CITES]->(s:Source)MATCH p0 = (s)-[:RESTS_ON*1..2]->(w)MATCH (n:Notice)-[:FLAGS]->(w:Work)WITH DISTINCT s, w, nCALL algo.SPpaths({sourceNode: s, targetNode: w, relTypes: ['RESTS_ON'], relDirection: 'outgoing', maxLen: 2, weightProp: 'cost'})YIELD path, pathWeightThe verdict comes straight from those rows. The model doesn't vote.
The model talks. The graph decides.
That was the one rule I didn't break.
MoolTrace has an agent, and it does act. It checks the answer, gets don't ship, explains the path, rewrites only the sentence that leaned on the retracted trial, and checks again. But it never writes Cypher. It picks from four fixed tools, and each one runs a fixed query.

I like this split for the same reason I liked it on my last project. Let the model do the part that needs language. Let boring, testable code (here, a graph query) make the decision.
Saying "not checked" out loud
Ask MoolTrace about a page it has nothing on, like the NHS page on washing your hands, and it doesn't say clear. It says not checked.

No path in the graph is not the same as safe. I expected this screen to feel like a weakness. It turned out to be the one that makes the other verdicts believable.
When the retraction lands after you ship
Papers also get retracted after your answers go out. So the same graph runs backwards. Give MoolTrace the retracted paper, and it walks up from the notice to every stored answer that rests on it, with the fix for each. For Ishida 2004 that's one cited page and five stored answers, each with a rewrite that checks clear.

Take the graph out
The fair question for any graph project: what happens without the graph?
Without it, all you can do is check the DOIs written in the answer. So I measured exactly that.
- On 52 answers I labelled by hand, a DOI check caught 43% of the bad ones. MoolTrace caught all of them, at 90% precision.
- On 40 reviews taken from a 2025 BMJ study, the DOI check flagged none. MoolTrace reached the retracted trial in 31, with one false alarm in 40 controls.
The 52 are my own labels, so treat that one with care. The BMJ set is someone else's list, and that's the number I trust more.
Where it runs
- Web app: paste an answer, pick a depth, see the path.
- MCP: any agent can call it. In the video, Claude Code connects to the remote MCP server and calls the check on its own.
- CI:
--fail-on blockexits non-zero, so a bad answer fails the build.
The whole thing runs on FalkorDBLite, so the graph runs locally and in CI with no server to babysit. The public demo is two containers (API and web) on an Amazon Lightsail container service in ap-south-1 (Mumbai).
What I'd tell you if you're building something like this
- Find the hop the agent can't see. If your graph only answers questions a single lookup could answer, it's decoration.
- Multiply trust, don't add it. If your edges are confidence or reliance, store minus-log weights and let shortest path find the strongest chain.
- Let the graph decide. Give the model fixed tools and let the verdict come from rows you can test.
- Ship the doubt. "Not checked" is a feature.
- Measure against the no-graph version. If you can't show what breaks without the graph, judges and users will assume nothing does.
What's next
More sources (every big health publisher, not just Harvard), more notice types, and a proper hand-labelled set from people who aren't me. And I want to sit with a team that actually ships a health chatbot and run it in their CI for a week.
Mool is Hindi for root. MoolTrace: check the roots before you ship.
Built by Siddhant Vishnu, Pune, for WeMakeDevs x FalkorDB Graph Hacks 2026 (Track 01: Agents That Act on Connected Data).
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article