From a186bb19890f981d5ea159c5879c49fecf0502d7 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 21 Feb 2026 22:20:07 +0100 Subject: [PATCH] fix(ai): prevent AI from using placeholder justification string in batch analysis --- src/app/api/ai/batch-analyze/route.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/api/ai/batch-analyze/route.ts b/src/app/api/ai/batch-analyze/route.ts index ccbf7be..9d989b4 100644 --- a/src/app/api/ai/batch-analyze/route.ts +++ b/src/app/api/ai/batch-analyze/route.ts @@ -61,11 +61,13 @@ Format: "codein": "ID", "recommandationGamme": "A|B|C|Z", "isDuplicate": boolean, - "justificationCourte": "Justification concise basée sur les données" + "justificationCourte": "..." } ] } +INTERDICTION FORMELLE : N'utilise jamais la phrase "Justification courte basée sur les données" comme réponse. Tu dois rédiger une analyse réelle. + Données : codein, nom, ca (€), ventes (unités), marge (%), gammeInit, historique, nomenclature.`; const userPrompt = `Analyse cette liste de produits :\n${JSON.stringify(products, null, 2)}`;