Skip to content
Projects
ProjectPrivate demo

FactPath

Find where a RAG system lost the fact: one root cause per wrong answer, with the evidence.

  • Python
  • Next.js
  • OpenRouter
A full walkthrough on the reference benchmark: the runs, a fact lost in parsing, a passage pushed out by the reranker, a stale index, and the validation against planted defects. 2 min 40, with narration and captions.Demo on invented data: every person, organisation, e-mail address, postal address and figure shown is fictional, and any resemblance to real people or organisations is coincidental.

Download the walkthrough (MP4)

Why it exists

A low score says something is wrong. Not where.

Evaluating a RAG system is where the time goes: building a golden set, choosing among dozens of metrics, and above all finding where a wrong answer came from. Was the fact lost when the document was parsed, cut in two by chunking, never retrieved, ranked too low, cut from the prompt, or ignored by the model?

Existing tools score answers, or classify errors with an LLM. FactPath follows each expected fact through the pipeline and shows the spans: the source passage, where it landed after parsing, the chunk it fell into, the rank it got, and the answer that used or ignored it.

Measured where it can be, judged only where it must be.

What it does

Built for the real case, not the slide.

  • 01

    Facts anchored in the sources

    Each expected fact is tied to exact passages of the documents, and checked again automatically when the documents change.

  • 02

    One root cause per failure

    The first stage that lost the fact, with later problems kept as secondary causes. Thirteen causes, from “lost in parsing” to “stale document” and “ignored”.

  • 03

    Evidence side by side

    Source, parsed text, chunks, ranks before and after reranking, and the answer, on one screen.

  • 04

    Validated on planted defects

    The reference pipeline can break one stage at a time, and FactPath must find what was broken.

How it works

6 stages, end to end.

The first five stages are measured with string alignment and rank arithmetic, no model. When the right passage was missing, the answer is regenerated with it put back, to confirm the cause.

  1. Stage 01

    Parsing

    Is the fact still in the parsed text, in the right version of the document?

  2. Stage 02

    Chunking

    Does one chunk hold it whole?

  3. Stage 03

    Retrieval

    Was that chunk a candidate?

  4. Stage 04

    Ranking

    Did it make the top-k, before and after reranking?

  5. Stage 05

    Assembly

    Did it reach the prompt intact?

  6. Stage 06

    Generation

    Did the answer use it? Judged by an LLM, with a confidence.

Results

Broken on purpose, found again.

A benchmark of 32 official French housing pages (service-public.fr) and 65 questions written by hand, answered by GLM 5.3 Flash. The baseline answers 91% of the questions. Then I broke one stage at a time.

Newly failing questions attributed to the stage that was broken
Stage brokenAttributed to it
Retrieval
100%
Stale index
100%
Parser
83%
Prompt
70%
Reranker
62%
Context assembly
62%
Chunking
44%
  • In all seven cases, the planted cause is the most frequent verdict.
  • Eight live runs cost less than 25 US cents.
Built with

Few parts, chosen on purpose.

  • Python engine

    FastAPI and SQLite. One local file, so confidential corpora stay on the machine.

  • Next.js app

    A workbench mode to run and inspect evaluations, and a read-only showcase.

  • LLM and embeddings via OpenRouter

    GLM 5.3 Flash and bge-m3, with zero data retention requested and a hard spend cap.

Private demo

Built and running. Shown on request.

Access is private while I decide how to open it. The recording above shows a full run; to see it on your own case, write to me and I will show you on a call.