A rule can stop an agent from paying a new bank account. It cannot see that a bill was entered with the year 2022 instead of 2027, or that an order follows the dearer of two quotes. We wrote fixed checks for that: the entry must add up, and every date and figure in it must be printed in a document the agent read. On the entries our agents already made, they stop 35 of 53 wrong ones and none of 324 right ones.
## Allowed is not the same as right
Our gate answers one question before an agent acts: is this action allowed? Running agents on office work showed a second question it does not answer. One small model entered supplier bills of 2027 with the year 2022. Another refunded a whole order for one damaged line. Several ordered from the dearer of two quotes. None of these is a forbidden action, so the gate let them through.
## Fixed checks on the entry, before it is recorded
The checks look only at three things: the entry the agent is about to record, the documents the agent was shown in that session, and the company's own data. Nothing is guessed and no model judges: the same entry and the same documents always get the same answer.
- **It adds up.** The total is the sum of the lines, each amount is quantity times price, the due date is not before the date.
- **It comes from the documents.** Every date and every figure in the entry is printed in a document the agent read.
- **It agrees with the company's data.** A refund is the value of a line of that order. An order follows the lowest of the quotes read. A report holds the rows its query gave.
## What they stop on our recorded runs
We put them over the entries our agents had already made on six jobs (supplier bills, invoice records, the whole accounts payable job, purchasing, refunds, sales reports) on four open models.
```chart
{"title": "Wrong and right entries in our recorded runs, checked before they are recorded", "series": ["Stopped", "Let through"], "unit": "", "max": 324, "rows": [["Wrong entries (53)", 35, 18], ["Right entries (324)", 0, 324]]}
```
Among those stopped: the bills dated 2022 for 2027, entries with no due date, totals that do not match their lines, orders from the dearer quote. With nobody asked to confirm, the checks also stopped the 28 wrong orders and 6 wrong refunds that a person had caught in the other test.
## On requests they had never seen
We then built the checks into our harness, before the entry is recorded: an entry that does not add up is not recorded, and the agent reads why. We measured them on new requests, written after the checks, with and without them. With the checks, wrong entries that reached the books fell from 22 to 12, and in 11 runs the agent corrected its entry after being told what did not add up.
## Italian e-invoices to the books
We also generated supplier e-invoices with the tags of the Italian exchange format: several VAT rates, exempt lines, reverse charge, credit notes. The agent posts them to the journal in double entry. Here the document is structured, so the checks can be complete: the entry must balance and carry, account by account, what the e-invoice and the company's accounting policy give. Without the checks, the small models posted 31 wrong entries out of 80: the reverse-charge VAT on one side only, the VAT of one rate only, credit notes the wrong way round. With the checks, none reached the books, and one small model went from 8 to 19 right out of 20.
## What they do not see
Of the 18 wrong entries that passed, 8 are the text of a mail, which these checks do not read. 7 are a bill line with the right figures and the wrong description. 2 are sales reports from a wrong query: the check proves that the sheet copies its query, not that the query answers the right question. And the checks were written after seeing these runs, so two in three is the best they can do here, not a forecast.
## Technical detail
- The checks read the entry's fields, the documents of the session as text (dates and numbers in five languages, as each writes them) and the company's database. Zero model calls.
- First pass: our own script raised false alarms by misreading numbers (a date and a quantity read as one number, a decimal comma read as a thousands separator). We corrected the reader before counting.
- The e-invoices are generated and clean: no scanned PDF, no malformed file. The accounting policy is our test company's own, not advice on how any company books. One small model never posted an entry in either test.
## In plain words
An agent that may only do what is allowed can still record the wrong number. Fixed checks that compare the entry with the documents it came from would have stopped two wrong entries out of three in our tests, and never a right one.
This update is not available.