--- title: Reconciliation Workbench emoji: ๐Ÿงพ colorFrom: indigo colorTo: green sdk: gradio sdk_version: 6.16.0 app_file: space_app.py pinned: false short_description: Small model reads financials; engine catches OCR errors tags: - build-small-hackathon - gradio - track:backyard - sponsor:openbmb - achievement:offbrand - achievement:fieldnotes - backyard-ai - tiny-titan - best-demo - bonus-quest-champion - off-brand - field-notes - minicpm - small-models - ocr - document-understanding - finance --- # Reconciliation Workbench **An audit "tie-out" desk on a live statement.** A small model (MiniCPM-V 4.6, ~1.3B) *reads* the financial report; a **deterministic engine does every piece of arithmetic** to catch the numeric errors OCR introduces โ€” leading-digit insertions, trailing truncations, column misalignment, garbled characters. Every number traces back to its place in the source PDF, explains its reconciliation relationship, and (in the full version) can be hand-corrected and re-checked, leaving an exportable audit trail. > **Backyard AI track.** The unglamorous, real-world problem an auditor faces every day: a > 300-page Chinese annual report or prospectus is OCR'd, and a single misread digit silently > breaks a balance sheet. This catches those โ€” and **never "helpfully" rewrites the source.** ## Why "small" (Build Small Hackathon ยท โ‰ค 32B) **You do not need a giant LLM to audit a financial statement.** Reading is for a small model (MiniCPM-V 4.6, **~1.3B**, well under the Tiny Titan โ‰ค 4B bar). Arithmetic is for code: every add, subtotal and cross-foot happens in a pure-function deterministic engine. Moving the error-prone math *out* of the model is exactly why it **catches OCR errors instead of inventing new ones** โ€” a model that "reads and computes" would hallucinate a plausible-but-wrong total. ## Try it (two bundled samples, zero keys) 1. **Sanmu Group 2024 Annual Report** โ€” real PDF with per-digit pixel highlighting; tri-state overlay (green = reconciled ยท red = suspected OCR error ยท grey = not covered by rules). 2. **A Prospectus** โ€” the engine catches subtotal reconciliation errors on the consolidated balance sheet; a verification queue you can step through. Pick a sample on the top-right; open each finding; click a flagged number to see it light up in the PDF, the live sheet and the focus card at once. > โ„น๏ธ **This is a read-only public demo.** Live PDF upload and the human-correction โ†’ recompute โ†’ > audit-trail loop run the deterministic engine, which is **proprietary and not shipped in this > public demo**. See the **demo video** below for those in action. ## How it works ``` A single custom gr.HTML island (pdf.js + live sheet + verification panel + all interaction) โ””โ”€ payload: small model reads + structures โ†’ deterministic engine reconciles โ†’ tri-state findings ``` - **Off-Brand UI:** not a stack of default Gradio components โ€” one custom `gr.HTML` island with `server_functions`, a real `pdf.js` viewer, tri-state bbox overlays, a keyboard-driven review queue. - **Iron rule:** extraction and arithmetic are separated; the raw OCR value is immutable; a human correction is a new, traceable transaction โ€” the original is always kept as a reference column. - **Fail-loud:** "N tables dropped during location ยท 0 findings โ‰  error-free" โ€” never disguises "couldn't extract" as "nothing wrong." ## Demo video ๐Ÿ“น **[Watch the 3-minute demo](https://huggingface.co/spaces/build-small-hackathon/reconciliation-workbench/resolve/main/demo.mp4)** โ€” also bundled in this Space as `demo.mp4`. A 1.3B model reads a real annual-report PDF โ†’ the deterministic engine flags a balance-sheet subtotal that doesn't tie โ†’ apply the engine-inferred correction โ†’ it recomputes and re-ties (**โœ“ Closed**), with a full, tamper-proof audit trail. ๐Ÿ“ฃ **Social post:** https://x.com/kl8lk0111/status/2066478477570883983 ## What this submission targets - **Track โ€” Backyard AI** (`track:backyard`): a real document/bill-parsing tool for a real job. - **Best MiniCPM Build** (`sponsor:openbmb`): MiniCPM-V 4.6 is the reading engine. - **Tiny Titan** (`tiny-titan`): the only model is ~1.3B โ€” biggest impact from the smallest weights. - **Off Brand** (`achievement:offbrand`): a fully custom island UI via `gr.HTML` + server functions. - **Best Demo / Field Notes**: see the demo video and this write-up. --- *Source note: this public demo ships the frontend + pre-computed sample results only. The deterministic reconciliation engine and the extraction pipeline are proprietary and not included.*