Skip to content
Automation

How a trucking company automated its quarterly IFTA filing

Deterministic code does the arithmetic, AI reviews the result, a human approves the filing. Why that order matters, and what happened when the output was checked against a real state return.

Evgenii Menshikov7 min read

Every quarter, an interstate trucking carrier has to file an IFTA return: miles driven in each state, fuel bought in each state, and the tax owed or refunded once the two are reconciled. It is unglamorous, it is deadline-bound, and it has an unusual property that makes it an excellent automation target — the state can recompute every number you submit. An error is not embarrassing, it is assessable.

This is an account of automating that filing for a real, paying client, and of the design decisions that mattered. The point is not the tax form. It is that a great many business processes have the same shape, and the same approach works on all of them.

What made this a good automation target

Most workflows that look automatable are not, and most that are automatable share four traits. This one had all four:

  • It repeats on a schedule — every quarter, without exception, forever.
  • The rules are written down. Tax rates and surcharges are published; the arithmetic is defined, not negotiated.
  • The inputs are structured files rather than conversations — mileage reports and fuel purchase records.
  • Mistakes are expensive and detectable, which means correctness can actually be measured instead of assumed.

If a process fails any of those tests, automation usually costs more than it saves. A workflow that runs twice a year, or whose rules live in one experienced person's judgement, is a bad first project regardless of how tedious it feels.

The architecture: AI does not do arithmetic

The single most important decision was where the language model is allowed to operate. Deterministic Python computes the return from the raw fuel and mileage records. The model never performs a calculation, because a model that is right 99% of the time is wrong on a tax return.

What the model does is review. Once the return is computed, an agent reads it and flags what a careful human reviewer would flag: a missing surcharge, an MPG figure that has drifted implausibly, a pattern that tends to attract audit attention. It produces a review note, not a filing. A person then approves and submits.

How it was verified

The system ships with 429 automated tests. More convincing than the count is one specific test: a backtest against a prior real filing from a Kentucky carrier, where the pipeline's output is compared against what was actually submitted and accepted. It matches to the penny.

That is the difference between a demo and a system. A demo shows you a plausible-looking output. A backtest against a known-correct historical result tells you the thing is right, and a regression suite tells you it stayed right after the last change.

What this pattern is worth outside trucking

The tax form is incidental. The reusable shape is: a recurring, rule-bound, document-driven process where the output has to be defensible. That describes an enormous amount of ordinary business work — regulatory filings, invoice and statement reconciliation, recurring operational reports, claims and application intake, compliance checks.

In each case the same division applies. Code computes what must be exact. The model handles classification, summary, and language. A human keeps authority over anything that cannot be undone. And the whole thing runs alongside the existing manual process until the two agree, rather than replacing it on a promise.

If you have a process that repeats every week or every quarter and involves documents, spreadsheets, or a report someone rebuilds by hand, it is probably a candidate.

See how AI automation projects run

The full engineering write-up — architecture, test strategy, and what the AI reviewer actually checks — is in the IFTA case study.

Got a project like this?

Describe what you're dealing with and you'll get an honest read on whether it's worth doing — including when the answer is no.