Baptiste BouaultAI engineer, CTOFR Français

The bay at dusk: the case study's instrument on its float.

S4AI startup, CTO role

Purchasing agent for restaurants

The purchasing agent of a restaurant group, in production since October 2026. The chefs write their orders in free text; for each line, the agent picks the item, the supplier and the price, and the purchasing team corrects. Each correction becomes a rule the agent then applies.

In production since October 2026 (as of 17 November 2026).

At a glance

What it is
The agent that turns the messages of a restaurant group's chefs into priced orders: for each line, a product, a supplier and a price.
For whom
A restaurant group with several restaurants, and its purchasing team.
What it changes
The purchasing team corrects, and its correction becomes a rule: from week 45 to week 46 of 2026, the lines to correct per order went from 2.67 to 0.92.
My role
I designed the operating rule (the agent decides, the person corrects) and built the system, with coding agents as tools. Every production release goes through me.
InterfacesThe model proposesThe code decidesClient systems
The machine layers this system touches are drawn in heavy line.

Problem and stakes

Chefs write freely, mixing items, quantities and delivery instructions. Several suppliers send a price list every week, and its labels change.

Without the agent, the buyer re-keys every line, compares the lists and picks the supplier. What is at stake: fewer lines to correct, the right supplier, no line lost, and never a human decision overwritten.

Context and constraints

Status
In production since October 2026 (as of 17 November 2026). Order pricing in production since October 2026; order module delivered at the end of July 2026.
Setting
AI startup, CTO role
Layers
Interfaces, The model proposes, The code decides, Client systems

Constraints

Architecture

The crates: a raft carrying three strapped crates and their tags, a paper strip, a blue plate on a post.

FigureThe crates

The team's correction becomes a rule

The five steps

  1. The chef writes the order freely.
  2. For each line, the code picks the item, the supplier and the price.
  3. The purchasing team corrects.
  4. Its correction becomes a rule.
  5. On the next order, the rule applies.

Principle figure: it shows the role of each part, not the client's rules.

DiagramWho does what in an order

InterfacesThe model proposesThe code decidesClient systems
  1. Interfaces

    The chefs' messages; price lists received by e-mail; the purchasing team's screen.

  2. The model proposes

    A language model steps in as support; it is the smallest model that is enough.

  3. The code decides

    The code picks the item, the supplier and the price, keeps the source of each price, and never changes a line a person has touched.

  4. Client systems

    The catalogue of the group's management software, read-only.

  5. Where a person decides

    The purchasing team corrects and approves; its corrections become rules.

How to read From top to bottom, the four layers of the machine. The chef's message comes in, the agent prices each line, the purchasing team corrects; the bottom line says where the person prevails.

Legend

  • Interfaces
  • The model proposes
  • The code decides
  • Client systems
  • human decision
  • layer not touched

Diagram of principle: the layers and their responsibilities. The real rules, thresholds, instructions and sequences stay with the client.

Technologies

Python, PostgreSQL, web interface, language model, automated tests and screen checks in a browser

My role

The doctrine "the agent decides, the person corrects" is mine, set down in writing in October 2026. I designed the architecture and built the system under that rule, with coding agents as tools. Production releases go through a tool I control, and the rule's red lines require my approval.

What I contributed

Decisions

  1. ChosenThe agent decides each line; the person corrects, and their correction always wins.

    RejectedHaving the purchasing team approve every price.

    EvidenceMeasured in production by replay: the lines to correct per order fell in November 2026, for 1.60 on average since the start.

  2. ChosenThe language model stays in a supporting role, and it is the smallest model that is enough.

    RejectedA model call on every line, with a large model.

    EvidenceIn November 2026, only the smallest model was called in production.

  3. ChosenAll orders are regularly replayed by the production code and compared with the purchasing team's corrections.

    RejectedJudging a change on a handful of test cases.

    EvidenceIn the replay of 17 November 2026, the agent reproduces the large majority of the purchasing team's supplier choices.

What this shows

Give the decision to the agent where it can be measured, and keep the person in charge: every correction wins and becomes a rule.

Measurements

measurements and counts, with how they were measured

2.67 → 0.92

lines to correct per order, week 45 then week 46 of 2026

measured in production

1.60

lines to correct per order on average, since the replay began

measured in production

56 / 60

of the purchasing team's supplier choices reproduced in the replay, on 17 November 2026

measured in production

Measurement modes

Limits

What stays private

What this case study does not show, and will not show: