InvoiceAI
Reads Indian GST invoices — digital PDFs, scans and phone photos — checks its own work, and marks anything doubtful for a person to review.
- AI model
- Deterministic rule
- A person reviews
- Not working yet
- inputPDF, scan or photo
- AI modelLocal LLM reads it
- ruleRules check GSTIN, totals, tax
- personDoubts go to a person
- storageSaved · Excel export
- 83% field accuracy, 0 invented values (11 sample docs)
- 136 automated tests
- Accuracy gate in CI
- Commercially licensed models only
The problem
Accounting teams in India type GST invoice details — GSTINs, dates, tax splits and totals — into Tally by hand, hundreds of times a month. AI can read invoices, but small local models make mistakes, and a wrong value that looks complete is worse than no value at all.
Approach
The AI reads; deterministic rules check the result; every doubt is shown. Text PDFs go through a text model, scans and photos through a vision model, both running locally via Ollama. A verification layer then checks what the model returned before anything is saved.
Architecture
FastAPI service with SQLite storage. Verification layer: GSTIN check-digit validation with OCR repair (a repaired GSTIN is accepted only when its checksum passes), totals and CGST/SGST cross-checks, item amount checks (quantity × rate), PAN checks, and seller/buyer correction from text positions in the PDF. A labelled golden set is evaluated in GitHub Actions, so a model or prompt change that lowers accuracy cannot be merged. Shipped as an offline Docker package with Windows and Linux installers; the dashboard is designed for non-technical and older users.
Results and limits
On 11 synthetic and public sample documents (digital PDFs, scans, a photo; CPU only): 83% field accuracy and 0 invented values — up from 67% with 2 invented values in the first measured version. Only commercially licensed AI models are used, enforced by a test. The sample set is too small to quote to clients — measurement on 20–30 real invoices is next. Coming next: a review screen for flagged fields and Tally / Zoho Books export. Private commercial product — demo on request.


