The easiest way to build an AI recommendation system is to let the model browse the catalog, reason in a loop, and pick products.
When I built ai-florist, I wanted the opposite property: if a recommendation is wrong, I want to know which layer was wrong. Was intent parsing bad? Did delivery filtering remove too much? Did vector retrieval miss the right candidates? Were the scoring weights off? Did the rationale overstate the fit?
That requirement leads to a very different design from the usual "agent with tools" pattern. The LLM is still there, but it is treated like a narrow component with typed inputs and typed outputs. The engine that decides what to show is deterministic, observable, and debuggable.
This article is the engineering companion to What agentic commerce actually requires in production. That piece makes the architectural argument. This one walks through the implementation.
À propos de l'auteur

Cyril Noirot
Lead Data Scientist
Data scientist freelance. Je conçois et déploie des systèmes de décision — prévision, pricing, marketing measurement, optimisation.
En pratique
Études de cas anonymisées où ces idées ont été appliquées à de vrais problèmes de décision.