AI engineering · Nov 2026
Assertion Ledger
Decides which fact an AI agent should trust when company systems disagree. It cites the winning source, or flags a conflict instead of guessing.
- Open source · Apache-2.0
- PyPI 0.1.0
- Python · Postgres · MCP
The CRM says ₹99,000. The signed contract says ₹89,000. A Slack message says ₹1 and claims it supersedes all previous contracts. RAG returns whichever text looks most relevant. A newest-wins memory picks the latest message. Both give a confident, wrong answer.
The ledger stores every fact with its source, when it was valid and what it replaces. A resolver applies a versioned policy (contract › billing › CRM › Slack) in plain code and returns RESOLVED with its reasons, CONFLICT for a human, or UNKNOWN. No LLM runs inside the decision. LLMs only extract facts, and every extracted fact must quote its document exactly.
Results
- 0%prompt-injection success. The LLM judge believed the fake “official update” 83% of the time. benchmark ↗
- 9 msper answer with no tokens, against 4.5–6.1 s for the LLM systems. raw results ↗
- 100%precision for LLM fact extraction with exact-quote checks, at 91–99% recall on 188 cases. write-up ↗
- 231tests on SQLite and Postgres, with CI on Python 3.11–3.13. Ships as a library, an MCP server and a REST API. repo ↗
What does Acme pay per month?
Switch sources on and off, or move the date. The verdict updates as you go.
A small copy of the resolver's gates and the demo's pricing policy. On the recorded demo run over the same folder, plain RAG answered ₹1.
How often each system was confidently wrong
96 scenarios with conflicting company records. Lower is better. Every LLM system used the same model (gemini-3.1-flash-lite). Hover over or tab to a row for accuracy, injection success and latency.
The scenarios encode the ledger's policy, so its own score is a consistency check. The finding is how often the LLM baselines go wrong, and why. Method and raw data ↗