Entry 09

The day my AI wrote "I was wrong"

A payroll kilometre audit flagged nine drivers for over-claiming. My way of measuring cleared all nine and found kilometres missing from the record instead. How to audit claims against a tracker without accusing the wrong people.

Covers September 20265 min read

The first run of the audit flagged nine trips as over-claimed. Nine drivers, by the look of it, paid for kilometres they had not driven.

Not one of them had.

Whose distance is right?

Our drivers are paid partly per kilometre. Before the September payroll closed, I wanted to check the kilometres claimed on each trip against what the tracking system recorded. Claude built the audit, using the distances from the tracker. That produced the nine.

I suggested a different method: use the tracker only to see which route the truck took, then measure that route on Google Maps. Claude argued against it. The odometer measures real distance, it said, and a map only estimates.

My reason was simple. You cannot use a tracker to check the tracker. Measured against the road distances, ours turned out to under-read by about 3.5%. With that correction, and an allowance for days when one driver handed a truck over to another, every one of the nine over-claims disappeared.

Claude saved the result to its memory. The title ends with my name and five more words: “was right, I was wrong.” Two days later it saved another note: corrected twice, both times right. In the same notes it left itself an instruction in capitals: do not raise any of these with a driver.

I am not telling this to score a point against the software. The AI is very good at counting. I have watched our trucks on that tracking screen for years and know where it can mislead. The audit needed both of us.

The kilometres that belonged to no trip

The real finding went the other way. A small share of the kilometres our refrigerated trucks drove that month was attached to no trip.

The cause: when a truck drove empty from the yard to a loading point, the trip’s opening odometer reading was taken at the load, not at the yard. The empty leg vanished from the record. The diesel was burned and the engine hours were added against no job, which skews cost per kilometre and fuel consumption, the two figures we price from.

Because the audit ran before payroll closed, the affected trips were corrected and went through the normal pay run in full. We added a new load type for empty positioning runs, so those kilometres get recorded where they happen, and the audit became a skill that runs every month before the payroll cutoff.

The fuel slip that said 670

The same week, two trucks showed fuel consumption that was physically impossible. The cause was data entry. The last fill of each trip, at the home depot, was being booked at the authorised litres on the diesel order (150 or 180) instead of the 500 to 670 litres printed on the slip.

Claude offered to “fix the fuel figures”. I asked what fixing meant. The answer became one of my favourite rules: correct a number only when it disagrees with the paper slip, never to make a ratio look right. If the slip says 670, the system says 670, even if the consumption then looks strange.

The database now recalculates each trip’s fuel from its closed slips. (It already accepted sums in the litres box, like 363.64+349.61, because some pumps cut out halfway through a fill and print two slips.) The entry screen also catches the common slips of the finger, like a slip number typed into the odometer box, or a fridge unit’s hour reading typed in as truck kilometres.

A day later one got through anyway, with the price per litre typed into the slip-number field. The screen had shown a warning and someone clicked past it. Lesson: a soft warning gets clicked through. If the system can prove an entry is wrong, it has to block it. Claude also wrote the clerk a worklist explaining the four mistakes we kept seeing, in her terms rather than ours.

It goes both ways

Two weeks later the roles reversed. I traced a road by hand on a map, and Claude followed my sketch instead of the line its own GPS data suggested. The GPS line was right. Mine was about 250 metres off.

Nobody wins these. When the data and experience disagree, stop and work out why. Most of the time one side has misunderstood something real, and finding it makes the system better.

Build it yourself: audit claims without accusing anyone

Use the tracker for the route, a map for the distance. Pull each trip’s GPS points, list the towns the truck passed closest to, in order, and measure that route on a map. Compare with the claimed kilometres. This also tells you how far off your tracker reads; ours under-read by about 3.5%.

Allow for real life before flagging anyone. Handover days between drivers, detours you approved, depot moves. Build a tolerance in, and look at anything outside it by hand first.

Look for the opposite error too. Check for kilometres that belong to no trip at all: empty runs to a loading point, repositioning, moves between depots. They distort your cost per kilometre and your fuel figures.

Audit before the cutoff. Corrections that go through in the normal pay run are routine. Corrections after payday are arguments.

Keep findings private until a person has checked them. Write it into the procedure: no finding goes to a driver until a manager has reviewed it.

For fuel, split your checks into two kinds:

Block it Warn about it
slip number in the odometer box consumption outside the usual range for the route
litres more than the tank can hold a fill much bigger than authorised
a trip closed with no closing kilometres an odometer lower than the last reading
price per litre in the slip-number field a station the truck rarely uses

If the system can prove it is wrong, block it. If it only looks odd, warn and let a person decide. And fix numbers against the paper, never to make a ratio look right.

Next: a database two days from going read-only, and the question every small business should ask before a free plan asks it for them.

Written from my build notes. I keep a running memory of every session with the AI, and each entry is drafted from those notes with Claude's help, then checked and edited by me.

A question about this entry? Ask it here →