Reservoir: fund reconciliation you can audit
The AI reads messy fund reports; plain code does all the math. Every number traces back to the exact cell it came from. Passed all 43 audit checks on a synthetic quarter of fund data.
- Role
- Lead AI & Financial Systems Architect
- Built with
- Python 3.12, FastAPI, PostgreSQL, Alembic, Anthropic Messages API & Agent SDK, Hybrid Retrieval, React, Docker
Results
- 28-DigitDecimal PrecisionBinary floats rejected across all financial contracts
- 43 / 43Live Audit Checks23 lineage/invariance + 20 numerical checks passed
- 49 FilesSynthetic Q4 CorpusMulti-channel deliveries across simulated clock cutoffs
- 100%Cell/BBox ProvenanceEvery scalar traced to sheet/cell, line/col, or page/bbox
Separating ingestion workers from opt-in agent workers and caching immutable content-hashed analysis snapshots ensures deterministic financial re-runs incur $0.00 in LLM spend, while active agent runs are strictly bounded by per-run turn, tool-call, and USD cost ceilings.
The problem
Evergreen-fund operations teams (interval funds, tender-offer funds, non-traded BDCs) manually reconcile fragmented multi-channel deliveries (transfer agent registers, custodian cash books, credit facility borrowing bases) under strict SEC business-day deadlines. Standard LLM workflows hallucinate floating-point math, leak post-cutoff file revisions into historical analyses, or bury missing covenant inputs inside prose notes.
In more detail
Agent-powered analytical workspace for evergreen-fund operations that decouples probabilistic LLM source interpretation from a deterministic 28-digit Decimal financial engine, enforcing bitemporal knowledge cutoffs, cell-level lineage, and append-only evidence-gap recovery.
How it works
┌──────────────────────────────────────────────────────────────────────────────┐
│ MULTI-CHANNEL INTAKE (Uploads, TA Registers, Facility Certs, Email Deliveries)│
│ Content-Addressed Write-Once Store ──► Isolated Parser & Cell/BBox Locator │
└──────────────────────────────────────┬───────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────────────────┐
│ BITEMPORAL KNOWLEDGE STORE (PostgreSQL + Alembic • Fixed as_known_at Cutoff) │
│ • Logical Records & Version Lineage • Evidence Profiles & Supersession DAG │
└───────────────────┬──────────────────────────────────────┬───────────────────┘
│ │
▼ ▼
┌───────────────────────────────────────┐ ┌───────────────────────────────────┐
│ DURABLE CASE AGENT HARNESS │ │ DETERMINISTIC FINANCIAL ENGINE │
│ • Skill: analyze_repurchase_funding │ │ • 28-Digit Decimal Arithmetic │
│ • Append-Only Evidence Gaps │─►│ • Cash/Equity Accounting Bridge │
│ • Linked Clarification State Machine │ │ • Borrowing Base & Leverage Caps │
│ • Fixed Turn/Tool/USD Cost Budgets │ │ • 0.001-Share Tie-Broken Proration│
└───────────────────────────────────────┘ └─────────────────┬─────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────────────────┐
│ IMMUTABLE ANALYSIS SNAPSHOT (/v1/analyses/{id}/inputs • Content-Hashed) │
└──────────────────────────────────────────────────────────────────────────────┘Key decisions
Probabilistic Evidence Interpretation vs. Deterministic Decimal Engine
The model-backed case agent ('analyze_repurchase_funding') discovers sources, cites exact locators (e.g., sheet:'SOAL'/cell:B6), and assembles a typed AnalysisRequest draft. All request-book reconciliations, cash/equity bridges (1 + investments_factor + receivables_factor - liabilities_factor - equity_factor = 0), facility headroom, and 0.001-share proration run deterministically without LLM calls.
Bitemporal Knowledge-Cutoff (as_known_at) & Supersession Guard
Every case freezes an offset-aware as_known_at timestamp. File availability, logical record versions, and supersession DAGs are resolved strictly as known at that cutoff—preventing future deliveries from contaminating retrospective audits and blocking any attempt to select an older file that hides a known correction ('superseded_selection').
Append-Only Evidence-Gap Protocol & Attempt-Fenced Recovery
Prose notes acknowledging missing data cannot complete a case. The harness enforces explicit record_evidence_gap, ask_clarification, and resolve_evidence_gap state transitions, idempotency keys, and attempt-fenced worker crash recovery with fixed turn/tool/cost budgets (RESERVOIR_AGENT_MAX_*).