FS Preparation Agent

financial statements engine

FS Preparation Agent — Financial Statement Engine

Financial statements where the LLM points at cells and arithmetic decides every link.

closed source
role
AI engineer
status
private
scale
1,828 tests
stack
Python · FastAPI · PostgreSQL · Azure OpenAI
type
commercial · closed source

FIG.01 // FS-PREP-AGENT · EDGE LIFECYCLE

The LLM points at cells. Arithmetic decides the link.

Every link reaches the same tie-out gate, whether a resolver or the LLM rescue proposed it.

The LLM points at cells. Arithmetic decides the link.01 · LINKS TO EARNStatement linepresented figureNotebreakdownTB accounttrial balance02 · RESOLVERdeterministic03 · TIE-OUT GATEarithmeticNO EDGE BYPASSES ITPASSEDLLM → LLM_RECONCILEDFAILEDnot reconciledNEEDS_REVIEWnot a false FAILEDON MISSLLM rescueextracts figuresPROVENANCELLM_CANDIDATEnot yet confirmedCELL REMAPreal Cellfigure → cellhitmissscale-aware tolerance:unknown scale →NEEDS_REVIEWthe LLM only points at cellsthe pass/fail verdict comes from thesame deterministic arithmetic
01

The LLM only points at cells

A Cross-Reference Graph links every statement line to its note and ledger account. Links are made by deterministic resolvers and confirmed by arithmetic tie-out, never by all-pairs LLM guessing.

Where a resolver misses, the LLM rescue layer only extracts and points at cells. Its figures are remapped to the real cell, and the edge stays LLM_CANDIDATE until the same deterministic arithmetic passes it; only then does it become LLM_RECONCILED. No reconciliation passes without a verified tie-out.

02

An unknown scale is NEEDS_REVIEW, not FAILED

Tie-out tolerance is scale-aware. When the scale of a figure is unknown, the check returns NEEDS_REVIEW rather than a false FAILED.

NEEDS_REVIEW is one of five tie-out statuses, alongside PASSED, FAILED, NOT_APPLICABLE and PENDING.

03

A three-tier page router that works as a cost gate

Every page enters at A_textlayer, which reads the embedded text layer for free. B_docintel runs Azure Document Intelligence's prebuilt-layout model, and C_vlm, a gpt-4o vision tier, is reserved for scanned, rotated or ambiguous pages.

A page only escalates to the next tier when the cheaper one cannot read it.

FIG.02 // FS-PREP-AGENT · PAGE ROUTER

Three tiers, and a page climbs only when it must

Each page is extracted by the cheapest tier that can read it.

Three tiers, and a page climbs only when it must01 · INPUTdocument pageTIER AA_textlayerembedded text layer · freeTIER BB_docintelprebuilt-layoutTIER CC_vlmscanned / rotated / ambiguous02 · OUTPUTextracted pagesame shape, any tierread OK → extractread OK → extractread OK → extractunreadable → next tierunreadable → next tieran explicit cost gatea page escalates only when the cheaper tier cannot read it