AboutProjectsSkillsEducationGet in Touch
Back to projects

Reconciliation Copilot

Two end-of-day position files - one from a custodian, one from an internal book of record - should match exactly. When they don't, operations analysts spend hours finding and explaining breaks. This tool runs the comparison in rule-based code (reproducible and auditable) and uses Claude only to explain each break in plain English, with a concrete next step for the analyst.

Comparison: rule-based, field-by-fieldExplanations: Claude Haiku 4.5Output: schema-validatedRuntime: Next.js · Vercel
Custodian feed
End-of-day position file from third-party custodian
10 rows
SymbolSideQtyPriceSettle
AAPL
037833100
BUY5,000184.322026-04-17
MSFT
594918104
BUY12,000421.052026-04-17
NVDA
67066G104
BUY3,500882.402026-04-17
GOOGL
02079K305
SELL2,200161.782026-04-17
AMZN
023135106
BUY1,800178.942026-04-17
META
30303M102
BUY900504.202026-04-17
JPM
46625H100
BUY4,200198.652026-04-17
AVGO
11135F101
BUY6001,345.102026-04-17
BRK.B
084670702
BUY800412.552026-04-17
ORCL
68389X105
SELL3,000124.182026-04-17
IBOR positions
Internal Investment Book of Record
11 rows
SymbolSideQtyPriceSettle
AAPL
037833100
BUY5,000184.322026-04-17
MSFT
594918104
BUY12,500421.052026-04-17
NVDA
67066G104
BUY3,500882.042026-04-17
GOOGL
02079K305
SELL2,200161.782026-04-18
AMZN
023135106
BUY1,800178.942026-04-17
META
30303M102
BUY900504.202026-04-17
JPM
46625H100
BUY4,200198.652026-04-17
AVGO
11135F101
BUY6001,345.102026-04-17
BRK.B
084670702
BUY800412.552026-04-17
ORCL
68389X105
SELL3,000124.182026-04-17
TSLA
88160R101
BUY1,500248.302026-04-17
Trade date 2026-04-15

How it works

  1. 01
    Parse and normalise
    Both files arrive as structured records. In production these would be SWIFT MT940, CSV, or SFTP file drops; here they are synthetic records so the underlying logic is visible end to end.
  2. 02
    Match by trade identifier
    Records are matched on symbol and trade date. Anything that exists on only one side is flagged immediately as missing. Anything on both sides moves to a field-by-field comparison.
  3. 03
    Field-by-field comparison
    Quantity, price, and settlement date are compared. Prices use a tolerance band to avoid flagging rounding differences. Every break records the field, both values, and the source rows - everything an auditor would need to verify the finding.
  4. 04
    Explain with structured output
    Only the breaks are sent to Claude, alongside a strict response schema. The model must return a rationale, a suggested action, and a severity for each break - no free-form text. Cost scales with the number of breaks, not the size of the input files.

How the tool could be extended