Skip to content

Repository files navigation

Proofline

CI

Razorpay AI Buildathon 2026 · Track 04 — AI Finance Controller

Proofline constructs financial evidence for payment-gateway GST.

Proofline traces gateway fees and GST across transaction records, settlements, bank evidence, gateway tax invoices and GSTR-2B. It marks money evidence-complete only when the required chain is intact — and tells the operator the exact missing evidence when it is not.

Proofline doesn't just match financial records. It constructs the evidence behind the answer.

The track bar is "throughput, measured accuracy, and an honest exception list — one cherry-picked match proves nothing." This repo reports all three on 3,009 held-out subjects with a hidden-truth evaluator, and publishes the machine-readable results (eval/reports/latest.json) behind every number in this README.


The problem

At month close, a payments operations team must decide which gateway GST amounts are supported by evidence and safe to treat as claim-supporting. Records exist in seven systems that never fully agree: orders, recon, settlements, bank statements, gateway tax invoices, and GSTR-2B. A number that "matches" in one place can still be unsupported one hop downstream.

Why this isn't another reconciliation agent

Razorpay already has broad reconciliation — matching payments to settlements to bank credits. Proofline is not another matcher. It builds a proof graph per subject: every rupee of gateway GST carries an explicit evidence chain, each edge is PASS / FAIL / MISSING, and money is only marked evidence-complete when the whole chain holds. When it doesn't, Proofline reports the Minimum Missing Evidence — the exact blocking edge and the next investigation action.

The idea

Payment → Recon → Fee/GST arithmetic → Settlement → Bank UTR
        → Gateway tax invoice → GSTR-2B

Each arrow is a deterministic proof edge computed from source records in integer paise. No heuristic scoring, no fuzzy thresholds on money.

The key feature: Minimum Missing Evidence

When a subject is held, Proofline doesn't say "mismatch found". It says which proof edge is broken, what document is missing, and what to do next. The golden case:

₹842.40 → HELD
  Payment identity ✓  Recon identity ✓  Fee ✓  GST ✓  Settlement ✓
  Bank UTR ✓  Gateway tax invoice ✓  GSTR-2B ✕ MISSING
  blocking_edge = INVOICE_TO_GSTR2B      next_action = WAIT_FOR_2B

The product

Month close dashboard — live engine output over a 1,000-subject synthetic dataset:

Proofline dashboard: month close summary with evidence-complete and held GST

The golden case inspector — ₹842.40 held because the required GSTR-2B document is missing. The proof chain shows exactly where the evidence breaks, the Minimum Missing Evidence panel names the blocking edge, and the next action tells the operator what to do:

Golden case inspector: 842.40 held, GSTR-2B missing in the proof chain

Exception queue — every held subject with its blocking control and next action. This is the honest exception list:

Exception queue with blocking controls and next actions

Actual evaluation results

Measured by the hidden-truth evaluator (eval/) on held-out synthetic datasets (seeds 101, 202, 303 — 3,009 subjects), never seen by development:

Metric Value
False evidence-complete 0
False evidence-complete GST ₹0.00
Deterministic resolution 98.40%
Human review rate 1.60%
Evidence-complete GST coverage ₹21,160.64 of ₹21,420.38 (98.79%)
Missing-edge localization 100.0%
Next-action accuracy 100.0%
Throughput ~13,000 subjects/sec (10k-subject run: 0.86 s)

Every injected defect class is detected with 100% recall; clean subjects are never flagged. Compare the naive permissive-arithmetic baseline, which clears 0.4% more GST but does so by falsely marking 30 subjects / ₹175.36 of unsupported GST as evidence-complete. Proofline's position: that ₹175.36 is the entire product.

Golden adversarial case

generator/golden.py emits one subject with a perfect cash chain and a missing GSTR-2B document. The system holds ₹842.40 (tax_evidence_status = BROKEN, resolution_status = HELD, blocking_edge = INVOICE_TO_GSTR2B, next_action = WAIT_FOR_2B) — enforced in backend tests, through the API, in the evaluator, and in the UI. No AI path can override it.

Architecture

generator/ ──▶ provable/core (ingest → normalize → proof graph → engine)
                    │                    │
                    │             provable/controls (policy, explanations, invariants)
                    │                    │
                    ├──── provable/ledger (SQLite audit trail)
                    ├──── provable/api (FastAPI)
                    └──── ui/ (React dashboard, reads API or committed replay data)

eval/ ── reads run_result.json + private truth (ISOLATED from runtime)

Deterministic logic owns all money decisions. AI is advisory-only on the residual: any model proposal is schema-validated, its assertion is re-verified against the evidence bundle, and policy gates the outcome. A verified-but-policy-invalid proposal changes nothing; financial_state_changed = false always.

AI judgment

  • Deterministic verification first — every subject, every run, offline.
  • Residual AI: held subjects may get model hypotheses, but a proposal is audit data only.
  • Verifier returns PASS / FAIL / UNVERIFIABLE against actual evidence; hallucinated references → UNVERIFIABLE.
  • Policy layer rejects assertions that are not permitted for that exception class, even after verifier PASS.
  • The benchmark runs with zero LLM calls — AI is optional and never required for correctness.

Quick start

make setup   # venv + editable install + ui npm ci
make test    # 44 backend/eval tests + ui tests/lint/build
make seed    # deterministic 1,000-subject dataset + golden case
make recon   # run Proofline over generated data
make eval    # hidden-truth evaluation, multi-seed
make demo    # end-to-end: recon + eval + printed report
make serve   # FastAPI on 127.0.0.1:8000
make ui      # React dashboard on 127.0.0.1:5173

No API keys required. The full demo, benchmark and golden case run offline and deterministically.

Repository structure

generator/   deterministic synthetic benchmark + private truth + golden case
provable/    core engine, proof graph, controls, verifier, investigator, ledger, API
eval/        truth-aware evaluator, baselines, multi-seed benchmark (isolated)
tests/       backend, generator, evaluator, API, verifier, investigator tests
ui/          React + Vite dashboard (real API or committed replay data)
PROOFLINE.md canonical product/domain specification

Product name = Proofline; legacy/internal Python package = provable (kept for stability).

Limitations

  • Synthetic benchmark only; no claim that benchmark accuracy equals production accuracy.
  • No live Razorpay write operations; read-only evidence construction.
  • Simplified tax-eligibility policy; GSTR-2B represented via synthetic files.
  • No production auth/security model — this is a demo/benchmark system.
  • Proofline demonstrates evidence controls on synthetic data and does not provide tax or legal advice.

Deep docs

About

Constructs financial evidence for payment-gateway GST — every rupee evidence-complete or held with the exact missing proof. Razorpay AI Buildathon 2026 · Track 04.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages