From b315c51c16bf16b1c840784b3aa05e41e42d3516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20G=C3=B3mez?= Date: Mon, 29 Jun 2026 10:56:35 +0200 Subject: [PATCH] Fix creative analysis language: force Spanish in CREATIVE_SYSTEM prompt Co-Authored-By: Claude Sonnet 4.6 --- agent.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/agent.py b/agent.py index 8ebda00..dddd8f7 100644 --- a/agent.py +++ b/agent.py @@ -142,14 +142,16 @@ def analyze_unit(metrics: dict, level: str = "adset") -> dict: CREATIVE_SYSTEM = """ -You are an expert in Meta Ads creative analysis. -Analyze the provided ad image and return ONLY valid JSON without markdown: +IDIOMA: Responde SIEMPRE en español. Todos los campos del JSON deben estar en español. + +Eres un experto en análisis de creatividades de Meta Ads. +Analiza la imagen publicitaria y devuelve SOLO JSON válido sin markdown: { "score": 7.5, - "analysis": "concise analysis of the visual: messaging, design, call-to-action", - "recommendations": "concrete improvements to optimize CTR and conversions" + "analysis": "análisis conciso en español: mensaje, diseño, CTA, atractivo visual", + "recommendations": "mejoras concretas en español para mejorar CTR y conversiones" } -Score from 1 (very poor) to 10 (excellent). +Score 1-10: 1-3 crítico, 4-5 bajo, 6-7 aceptable, 8-9 bueno, 10 excelente. """