BRAG Principle 05 of 06
Principle 05
05

Make every decision logged.

When someone asks “why did the system do that?” you should be able to show them, step by step.

Why it matters

When something goes wrong with your AI — and it will — the worst possible position is “we don’t know why it said that.” An audit trail that captures every retrieval, every model verdict, every degradation decision, and every tool call lets you replay any user’s session and explain it. It’s not optional in healthcare, finance, legal, or government. It’s invaluable everywhere else.

The cost of not doing it

Scenario

A customer reports that your AI gave them wrong information. You can’t reproduce the issue because the system is stochastic. You can’t tell them why it answered the way it did. They escalate to compliance. Compliance asks for the audit log. There isn’t one. The incident becomes a company‑wide policy review.

How BRAG does it

Every BRAG run produces a MemoryLedger — a complete record of every retrieval pass (candidate IDs, scores, filters used), every Verifier verdict (with rubric scores and contradictions), every Refutation Agent hypothesis (with strategy, target, evidence, verdict), every coverage progression, and every degradation decision. The ledger is rendered into per‑query trace HTML — the same data the system used. You can replay any query and show your work step by step.

Apply it in your own system

Build the ledger from day one. Retrofitting one later is painful.

  1. Decide upfront: every decision your agent makes goes in a ledger.
  2. Use a single structured format (JSON, protobuf, whatever) — not log lines.
  3. Capture the evidence the model saw, not just the model’s output. Token usage, retrieved IDs, intermediate prompts.
  4. Build a replay UI early, even if it’s ugly. You’ll use it constantly.
  5. Make the ledger user‑visible when the user asks. Trust comes from being able to show your work.

This is one of six principles abstracted from BRAG — a retrieval‑augmented generation system with two LLM skeptics gating every confident answer. Tested on ten years of Netflix’s public financial reporting.