IA Générative

Building a recommendation engine that doesn't trust the LLM

This is the engineering companion to the production architecture piece. Instead of re-arguing why open-ended agents are risky in commerce, it walks through the actual implementation choices in `ai-florist`: FastAPI boundaries, LangGraph orchestration, pgvector retrieval, learned scoring weights, deterministic fallbacks, and runtime observability.

12 avril 2026
Partager
11 min de lecture

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

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.

Newsletter

Articles techniques sur la prévision, le pricing et les systèmes de décision. Aucune fréquence imposée.

Enter your email
Subscribe