AI & architecture case study
Agentic statement spreading for commercial lending
Business problem
Lenders receive large document packages: financial statements, tax returns, and supporting files. Analysts historically re-keyed figures into spreading tools by hand.
Statement periods had to balance; when they did not, teams traced line items to the right chart-of-accounts entries through slow, manual research. The work consumed skilled analyst time and invited transcription and mapping errors.
Role
Major individual contributor to the agentic architecture: how the system reasons like an experienced analyst, reading narrative context, matching and verifying figures, explaining decisions, and producing an audit trail that shows its work. Also defined engineering practices for non-deterministic AI in this domain and built test tooling and frameworks for shift-left detection and regression prevention.
Stack & approach
C# on Microsoft Azure AI Foundry. The agent framework is model-agnostic; production tuning uses GPT-5.6-Sol.
The pipeline loads a structured spread definition as the target shape, combines it with source documents, and asks the agent to emit JSON that conforms to a defined schema. A deterministic math-verification step validates balances; failures return as feedback so the agent can correct itself. A final engine loads verified data into the database and confirms the load succeeded.
Pipeline
Tradeoffs
LLM steps are non-deterministic, so the design pairs the agent with schema-bound output, deterministic math verification, and a correction loop instead of trusting a single pass. Analysts still review results, but the heavy lifting moves from manual entry to verification. Engineering standards and test frameworks account for regression and drift in model behavior over time.
Outcome
Document packages that once drove hours of manual spreading and reconciliation can load in minutes with balanced statements and math already verified. The analyst role shifts to brief verification: confirming results, refining a few line names or placements, instead of building the spread from scratch.