Limited offerBuild your MVP in 3 days for just USD 1,799

See how it works
Back to portfolio
Cogntix product logoOur own product

LLM Integration in Production - BILL9 Document AI

This is our flagship LLM integration case study. Inside BILL9, our own expense platform, we shipped a production language-model layer that extracts structured fields from receipts, invoices and PDFs and lets business owners query their records in plain English. It is live at getbill9.com on web, iOS and Android, and used by 10+ companies and small businesses.

LLM IntegrationAI EngineeringProduct StrategyFull-stack Development
Get LLM Integration in Production
LLM Integration in Production - BILL9 Document AI
Industry
Fintech · Expense & Document Management
Location
Sri Lanka · Global
Client
Cogntix
Duration
2 weeks
10+
Businesses in production
2 weeks
Time to production
Web, iOS, Android
Available on
LLM Integration in Production - BILL9 Document AI cover
Background

Most teams that ask for "AI" actually need one thing: unstructured documents turned into reliable, structured data they can trust in their books. Small businesses run on paper receipts, WhatsApp photos and inbox PDFs, and month-end becomes a retyping exercise.

BILL9 was our chance to solve that in our own product first, with real users and real accountability, before bringing the same LLM integration approach to client work.

Objective

Put a language model into a real financial workflow where the output has to be correct, cheap and fast - not a chatbot bolted onto a dashboard.

  • Extract vendor, amount, date, tax and line items from any bill format
  • Return typed, schema-validated output instead of free-form text
  • Let owners query their records in plain language, grounded in their own data
  • Keep per-document cost and latency low enough for everyday use
  • Flag low-confidence extractions for human review rather than guessing
  • Ship the same experience to web, iOS and Android
Solution

The integration follows four steps - upload, extract, structure, ask. A document goes in, the model pulls out every important field into a validated schema, and the result lands in a table the business controls.

Structured output is the core design decision. Rather than asking the model for prose and parsing it, every extraction returns typed fields that are validated before persistence, which is what makes the feature usable for accounting rather than just impressive in a demo.

On top of those records sits a retrieval-grounded chat layer: questions are answered from the organisation's own indexed data, with monitoring on cost and latency per request so the economics hold as document volume grows.

Timeline
  1. Days 1-2

    Scope the LLM job, not the model

    We started from the business outcome - clean, searchable bill records - and defined exactly which fields the model must return and what the fallback is when it cannot. Document samples were collected from real messy inputs: photos, scans and email PDFs.

  2. Days 3-5

    Extraction pipeline

    Upload, pre-processing and a structured-output extraction step that returns typed fields rather than free text. Every response is schema-validated before it touches the database, so a bad generation fails loudly instead of corrupting records.

  3. Days 6-9

    Retrieval and natural-language querying

    Extracted records are indexed so the chat layer answers questions grounded in the business's own data. Answers are scoped to the organisation's records, so the model summarises what exists instead of inventing figures.

  4. Days 10-12

    Evaluation and guardrails

    We ran the pipeline against a held-out set of real documents, measured field-level accuracy, tightened prompts and validation, and added human review for low-confidence extractions.

  5. Days 13-14

    Ship to production

    Rollout across web, iOS and Android with cost and latency monitoring per request, so the feature stays economical as volume grows.

Outcomes
Fully automated
Manual data entry

Vendor, amount, date, tax and line items are extracted by the model instead of retyped by a person.

Plain language
How teams query data

Owners ask questions like "what did we spend with this vendor last quarter" instead of building exports.

10+ businesses
Running on it today

The LLM layer runs in production for real bills and petty cash, not in a demo environment.

Any format
Documents supported

JPG, PNG, PDF and WEBP uploads flow through the same extraction pipeline.

Want this in your product?

LLM integration, shipped to production

We do this for client products too - document extraction, retrieval-grounded chat, agents and evaluation harnesses, built into your existing stack and shipped, not prototyped.

Thamili logo
Recipe Lab logo
2 days
from idea to shipped VOW app
Maison d'etre logo

"Delivered within both the deadline and the budget."

Gobiraj Karunananthan, CEO at MILTA
Read the MILTA case study
MILTA logo
100+
people using our own product, VOW
BeReload logo
Avana logo

"They genuinely understand the vision and feel like part of our team."

Kevin Bobroske, Lighthouse Integrations
See how we work with founders
20+
AI products & platforms shipped
Identiq logo
Lighthouse logo
1 year+
average client relationship

"From idea to a live product our users actually stick with."

Team behind VOW
Read the VOW case study
Exambank logo
Massive logo
Oli's logo
3 in-house
products built and running

"Hiring got faster the week we switched. The team just shipped."

Early Unblit customer
Read the Unblit case study
Thamili logo
Recipe Lab logo
2 days
from idea to shipped VOW app
Maison d'etre logo

"Delivered within both the deadline and the budget."

Gobiraj Karunananthan, CEO at MILTA
Read the MILTA case study
MILTA logo
100+
people using our own product, VOW
BeReload logo
Avana logo

"They genuinely understand the vision and feel like part of our team."

Kevin Bobroske, Lighthouse Integrations
See how we work with founders
20+
AI products & platforms shipped
Identiq logo
Lighthouse logo
1 year+
average client relationship

"From idea to a live product our users actually stick with."

Team behind VOW
Read the VOW case study
Exambank logo
Massive logo
Oli's logo
3 in-house
products built and running

"Hiring got faster the week we switched. The team just shipped."

Early Unblit customer
Read the Unblit case study