All posts
Perspective

Why an invoice can't be AI-generated

Hau · July 2, 2026 · 5 min read
Why an invoice can't be AI-generated

A finance team at a company you've heard of once shipped 12,000 invoices with a total that was off by a rounding cent. Not because someone fat-fingered a number, but because the tool laying out the PDF re-flowed the line-items when a product name ran long, and the subtotal box landed on a value the layout had quietly recomputed. Twelve thousand support-adjacent emails later, "make the invoice look nicer" had become a finance incident.

That is the trouble with pointing a generative model at a document. A model that draws an invoice draws a plausible one, and plausible is the wrong target. The number has to be the number.


Looks like an invoice vs. is the invoice

There are two jobs hiding under the phrase "generate an invoice," and they could not be more different.

Illustration

The first job is illustration: produce something that reads as an invoice, with headers, a table, a total, the right general shape. A diffusion model, or an LLM with a canvas, handles this well. It hands you a fresh, slightly different artifact every time, and for a mockup or a pitch slide that variety is a feature, not a risk.

Rendering

The second job is rendering: take the { invoice_number, line_items, tax, total } that already exists in your billing system and lay it out, unchanged, in a branded frame. Here variety is a defect. You do not want a creative interpretation of total. You want total, in the same place, in the same font, at the same size, whether the customer bought one item or forty.

The industry keeps selling the first job to people who need the second one. "AI-generated documents" is a category error dressed up as a feature.

🔑 The test: if a wrong pixel is unacceptable, you are not doing generation. You are doing rendering, and rendering wants to be deterministic.


What deterministic actually buys you

Deterministic rendering means one thing: same data in, same pixels out, every time. The template is designed once. Every render after that is a pure function of the data and the brand profile. No sampling, no temperature, no "regenerate and hope for a better one."

That sounds like a limitation. It is the opposite, because it is what makes the output testable.

Generative renderDeterministic render
Same input twiceTwo different outputsIdentical output
Can you unit-test it?No, output driftsYes, golden-file it
Long product nameMay re-flow unpredictablySame rule fires every time
Wrong totalPossible, and invisibleIt prints what you passed, nothing else
Who's accountableThe modelYour data

When the render is deterministic, a bad invoice can only come from bad data, and bad data is a bug you can find rather than a probability you have to babysit. You can snapshot a template against a fixed row and fail your CI build the day it shifts by a pixel. That test is impossible to write against something that samples.

A calculator and tax forms on a dark surface
A calculator and tax forms on a dark surface

*Photo by Kelly Sikkema on *Unsplash


Why documents, not posters, are the interesting problem

It is tempting to treat determinism as a niche worry for accountants. It is really the line that separates the artifacts a business can automate from the ones it has to supervise.

The cost of a wrong pixel sets the tool

A social post with an odd kerning gap is a shrug. A certificate with the wrong learner name is a re-issue and an angry email. A ticket whose QR does not scan is a person stuck at a door. A shipping label with a mangled address is a parcel that never arrives. The higher the cost of a wrong pixel, the less anyone tolerates a tool that draws a new version each time.

That cost is exactly why the stickiest visual-content jobs are operational documents: invoices, receipts, statements, payslips, packing slips, certificates, tickets, labels. They fire on every transaction. You cannot turn them off without breaking a customer-facing workflow, and you cannot hand them to something that improvises.

Determinism is what makes a render callable by a machine

Here is the part that matters if you are wiring this into a product. A deterministic endpoint is one your systems can call without a human in the loop. payment_succeeded fires, you POST the invoice data, you get the same correct PDF back, with no review step, because there is nothing to review that the data did not already decide. A generative endpoint always needs a person to glance at the output first, which means it is not really automation. It is assisted manual work wearing an API.

The moment you want a webhook, a batch job, or an AI agent to produce customer-facing artifacts unattended, "creative every time" stops being acceptable and "same data, same pixels" becomes the only thing you can build on.

A computer screen displaying lines of code
A computer screen displaying lines of code

*Photo by Jakub Żerdzicki on *Unsplash

💡 The reframe: deterministic is not the boring version of generative. It is the version you are allowed to put in a pipeline.


Where generation still belongs

None of this argues against generative tools. It argues for using them on the job they are good at. Ideation, one-off hero images, exploring a look, drafting copy: generation earns its keep when variety is the point and no downstream system depends on the exact output.

The mistake lives only at the handoff. The design gets made once, by whatever means, and then it has to run ten thousand times with different data and identical structure. That second phase is not a creative act. It is infrastructure, and it should be curated once and then boring forever.

That second phase is what Lemtika is being built for. You design a template once, and it renders off your data on every trigger, whether that trigger is a Stripe webhook, a CSV batch, or an MCP call from an agent, with the same pixels every time and on-brand by default. The invoice prints the total you passed it. For a document, that is the only promise that counts.

Lemtika is not open to the public yet. If "the artifact has to be right" is a problem you already have, subscribe for the lifetime deal and lock in early access before launch. Keep the generative tools for the things that are allowed to surprise you.

*Cover photo by Kelly Sikkema on *Unsplash

Make your next post look designed

Be first in line when we open up.

Join the waitlist