Skip to content

tatinango

Back to the blog
agentsproductionméthode

The human in the loop, concretely: one invoice, one doubt, one decision

Published on October 23, 2026

·

10 min read

Acme Industrie does not exist. It is our reference example: a fictional small manufacturer we use to design our agents and to teach, not a client. What follows is an ordinary morning of work, written to show where the human steps into an automated loop, and why there and nowhere else.

A Tuesday morning in accounts payable

It is twenty past eight. An invoice lands in Acme Industrie's billing inbox, attached to a three-line email. The supplier is known. The invoice is for 12,480 euros before tax. Nobody has opened it yet.

The agent, meaning the program that watches this inbox, picks it up. It reads the PDF. It pulls out the header, the number, the date, the total, then the lines one by one. It looks for the purchase order quoted on the invoice and finds BC-2291 in the purchasing tool. It compares line by line: reference, quantity, unit price. Thirteen lines match exactly. It moves to the next.

Line 7: three units invoiced. The goods receipt note counts two. The agent does not decide. It does not correct the invoice, does not reject it, does not write to the supplier. It opens a validation request and places it in the queue of Sophie, who runs accounts payable.

Sophie arrives at nine. The request is in her queue. On a single screen she sees the invoice line, the purchase order line and the goods receipt line, side by side. She sees the gap highlighted: one unit. She sees the action the agent proposes, ask the supplier for a credit note for one unit, and the alternative, book the invoice as is and sort out the gap later. She also sees the history with this supplier: no discrepancies in recent months.

She opens the goods receipt to check that the warehouse did not forget to scan a box. She calls the receiving dock. Two units, confirmed. She picks the credit note. The agent takes over again: it books the invoice in the accounting tool with a note that records the gap and the credit note request, drafts the message to the supplier, which Sophie reads and sends, then closes the request.

It is twenty past nine. Sophie spent twenty minutes on this invoice, most of it on the phone. The decision was hers. The rest of her morning is her own.

What the scene shows

The agent did everything mechanical: open, read, extract, search, compare, write. It stopped at the exact point where a decision had consequences: claiming money from a third party, or agreeing to pay for a unit nobody received.

That boundary is not an accident. It did not appear because the model "was not sure". It was drawn before the first invoice, with Sophie and her manager, by answering one plain question: which decisions in this flow do we want a human to make, even if the agent is rarely wrong?

This is what we mean by the human in the loop. Not a person watching a screen all day. Not a person re-checking everything the machine did. A person placed at precise points, chosen in advance, with what they need in front of them to decide quickly and well.

Where to put the human

The rule we apply fits in one sentence: automate the reading and the comparing, escalate the deciding when the agent's confidence is low or the stakes are high.

High stakes show two signs. The consequence is hard to undo, or it commits the company towards a third party. In a small or mid-sized company the list is short and almost always the same:

  • paying, or refusing to pay;
  • promising a delivery date to a customer;
  • answering a customer in the company's name;
  • turning down a candidate;
  • sending a quote or a response to a tender.

Everything that comes before those moments can be automated widely: reading an email, extracting fields, finding the right file, matching two documents, preparing a draft. Everything that makes up those moments goes through a named person.

For Sophie this gives three cases, written down in the flow's documentation. The agent books on its own any invoice whose lines all match the purchase order and the goods receipt. It stops as soon as one line diverges. It also stops when it cannot find the purchase order, or when reading the PDF leaves it in doubt.

What an agent's confidence means

When we say the agent "doubts", we need to be precise. A language model does not know when it is wrong. But the system around it can measure a few simple things.

First, legibility: is the PDF clean or scanned at an angle, does the extracted total actually equal the sum of the lines? Second, consistency: does the supplier exist in the database, does the quoted purchase order belong to that supplier, are the unit prices the ones in the contract? Third, agreement between several readings: if you ask for the same extraction twice and the result differs, that is a signal.

Confidence is the aggregation of these checks into a score. The threshold is the score below which the request goes up to a human.

That threshold is a business setting, not a technical one. Choosing it means answering a management question: which mistake do we prefer? One invoice booked with one unit too many, or ten correct invoices waiting for Sophie for nothing? Nobody on the technical team can settle that on behalf of accounting.

Our recommendation is always the same: start conservative. In the first weeks the agent escalates a lot. As the evaluation set grows and the correction history fills up, you loosen the threshold, one category of discrepancy at a time, watching what changes each time.

The validation screen

The human in the loop succeeds or fails on a screen. If Sophie has to open three tools to understand what she is being asked, she will stop looking within a week.

What the screen must show to allow a decision in under a minute:

  • the evidence, side by side: the invoice line, the purchase order line, the goods receipt line, with the gap highlighted;
  • the proposed action, in one sentence you could read aloud: "ask the supplier for a credit note for one unit";
  • one alternative, only one: "book as is";
  • the useful history: recent exchanges with this supplier, previous discrepancies, who validated last time.

What must not be there: the raw text produced by the model, intermediate scores, the ten buttons that cover every imaginable case. If a third outcome is sometimes needed, it lives in a free text field, not a menu.

Two buttons are almost always enough. When they are not, it is usually a sign that the decision point is badly cut and should be split in two.

The escalation rate, the one figure to watch every week

One indicator sums up the health of the loop: the escalation rate, meaning the share of processed documents the agent sent up to a human. We give no target value here. It depends on the flow, the suppliers, the quality of the documents. But its trajectory is easy to read.

Too high, and the agent moves work instead of removing it. Sophie gets a queue instead of an inbox. She has gained nothing.

Too low too soon, and nobody is really checking anymore. The agent books on its own invoices it should not book on its own, and you only find out at closing.

In a six-week pilot, the expected movement looks like this. In the first days the rate is high, which is normal and intended. It comes down in steps, each time a category of discrepancy is understood and a threshold is loosened. It then settles at a level Sophie finds sustainable within her day. If it jumps back up, something changed upstream: a supplier altered its invoice layout, a new site sends different receipt notes. That is information, not failure.

Every correction becomes an evaluation case

When Sophie picks the credit note over booking as is, she is not just handling one invoice. She is setting a rule: for this supplier, for this kind of gap, this is what Acme Industrie does.

That decision is recorded with the request, the evidence and the choice. It joins the evaluation set, meaning the collection of real cases the agent is tested against every time it is changed. The next time this supplier invoices one unit too many, the agent can propose the credit note with more assurance. And if one day the team changes its policy, the evaluation set shows it immediately.

One thing needs to be clear: the agent does not improve on its own. The language model remembers nothing from one invoice to the next. What improves is the system around it, because the team's judgement is captured, organised and reused. It is Sophie's knowledge that accumulates, not the machine's.

Two ways to get the loop wrong

The first is rubber-stamping. The agent is right most of the time, Sophie knows it, and one morning she clicks "credit note" without opening the goods receipt. The loop exists on paper, not in practice.

The second is alert fatigue. The agent escalates too much, the queue grows, clearing it becomes a chore pushed to Friday. The supplier waits, and Sophie ends up processing requests in a batch, which brings us back to the first problem.

You protect against both through design, not vigilance:

  • a sample of automatic decisions, the ones the agent made without escalating, is drawn at random every week and reviewed by a human; if the sample reveals errors, the threshold goes back up;
  • a weekly review of a handful of cases, no more, where the head of accounting looks at what was escalated and what was validated, and adjusts the rules;
  • a cap on the queue: beyond a certain number of pending requests, the agent stops producing them and raises a flag, rather than piling up.

These three mechanisms are part of the pilot from the moment the validation interface is built. They are not added afterwards.

Why this is also a compliance answer

A well-designed loop produces, with no extra effort, what a compliance file asks for. Every decision is traced, with the evidence seen and the person who settled it. Consequential decisions carry a human's name. Users of the tool know that an agent prepares the work and know what it does not do. We offer no legal reading here; each company does that with its own counsel. But a team that drew its decision points in advance answers these questions by showing its screen, not by writing a document after the fact.

Where to start

If you have a Sophie in your company, a flow of documents arriving every morning and a question about where to place the human, the simplest thing is to talk about it on a real case. We offer an AI Scan: a 45-minute conversation about your flows, then a memo with three costed use cases within 48 hours. You leave with a view on what deserves an agent, where the validation belongs and what it would change for the person involved. Requests go through the AI page.