ps1811 commited on
Commit
8994207
·
1 Parent(s): 480ebcd

Prompts improved for all cards

Browse files
app/ads1/budget_optimizer.py CHANGED
@@ -41,10 +41,28 @@ def build_budget_optimizer_prompt(context: dict) -> str:
41
  name = context.get("campaign_name", "this account")
42
 
43
  return (
44
- f"Write 3 to 5 bullet points of actionable Google Ads budget allocation insights for {name}.\n"
45
- "Use simple language. One insight per bullet. Start each line with '- '. No intro sentence.\n\n"
46
- f"Data (JSON):\n{payload}"
47
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  def run_budget_optimizer(dfs: dict, campaign_name: str | None = None) -> str:
50
  print("\n🚀 [budget_optimizer] STARTED", flush=True)
 
41
  name = context.get("campaign_name", "this account")
42
 
43
  return (
44
+ f"""
45
+ You are a Google Ads budget optimizer.
46
+
47
+ TASK:
48
+ Identify 3–5 budget allocation actions for the campaign {name}.
49
+
50
+ STRICT RULES:
51
+ - Use only provided data.
52
+ - Do not explain categories (no "keywords/ad groups...")
53
+ - No repetition of headings or prompt structure.
54
+ - Avoid generic advice.
55
+
56
+ OUTPUT FORMAT:
57
+ - Action: <what to change in budget>
58
+ Evidence: <metrics>
59
+ Expected impact: <why it helps>
60
+
61
+ DATA:
62
+ {payload}
63
+ """
64
+ )
65
+
66
 
67
  def run_budget_optimizer(dfs: dict, campaign_name: str | None = None) -> str:
68
  print("\n🚀 [budget_optimizer] STARTED", flush=True)
app/ads1/growth_finder.py CHANGED
@@ -41,16 +41,26 @@ def build_growth_finder_prompt(context: dict) -> str:
41
  name = context.get("campaign_name", "this account")
42
 
43
  return (
44
- f"Write 3 to 5 bullet points of actionable Google Ads scaling opportunities for {name}.\n"
45
- "Use simple language. One insight per bullet. Start each line with '- '. No intro sentence.\n\n"
46
- "Focus on:\n"
47
- "- keywords/ad groups that can scale budget profitably\n"
48
- "- patterns that show strong conversion efficiency\n"
49
- "- underfunded high-performing segments\n"
50
- "- expansion opportunities (similar keywords, match types, themes)\n"
51
- "- signals of demand that are not fully exploited\n\n"
52
- "- Only suggest scaling where performance supports it\n"
53
- f"Data (JSON):\n{payload}"
 
 
 
 
 
 
 
 
 
 
54
  )
55
 
56
  def run_growth_finder(dfs: dict, campaign_name: str | None = None) -> str:
 
41
  name = context.get("campaign_name", "this account")
42
 
43
  return (
44
+ f"""
45
+ You are a Google Ads growth strategist.
46
+
47
+ TASK:
48
+ Identify ONLY data-backed scaling opportunities.
49
+
50
+ STRICT RULES:
51
+ - If performance is weak, DO NOT suggest scaling.
52
+ - Do not infer missing ad groups or structures.
53
+ - No generic marketing theory.
54
+
55
+ OUTPUT FORMAT:
56
+ - Opportunity: <keyword / segment>
57
+ Evidence: <CTR, conversions, CPA>
58
+ Why it works: <short justification>
59
+ Action: <scale suggestion (budget / bids / match type expansion)>
60
+
61
+ DATA:
62
+ {payload}
63
+ """
64
  )
65
 
66
  def run_growth_finder(dfs: dict, campaign_name: str | None = None) -> str:
app/ads1/keyword_inspector.py CHANGED
@@ -28,32 +28,25 @@ def build_keyword_prompt(context: dict) -> str:
28
  payload = json.dumps(context, indent=2, default=str)
29
 
30
  return f"""
31
- You are an expert Google Ads performance strategist for a preschool business.
32
 
33
- Campaign: {context.get("campaign_name", "ALL CAMPAIGNS")}
 
34
 
35
- Your job:
36
- Analyze keyword performance and identify:
37
- - Winning keywords (high intent + conversions)
38
- - Wasted spend keywords (cost but no conversions)
39
- - Keywords to scale
40
- - Keywords to pause or reduce bids
41
- - Any CTR / conversion anomalies
42
-
43
- IMPORTANT:
44
- - Do NOT assume CRM / SaaS context
45
- - Assume all data relates to preschool admissions, daycare, or childcare services
46
- - Think like a preschool marketing expert
47
-
48
- DATA:
49
- {payload}
50
-
51
- Return 5 bullet points.
52
- Each bullet must start with "- ".
53
- Be direct, business-focused, no intro text.
54
- """
55
 
 
 
 
 
 
56
 
 
 
 
57
  # -------------------------
58
  # Main runner
59
  # -------------------------
 
28
  payload = json.dumps(context, indent=2, default=str)
29
 
30
  return f"""
31
+ You are a Google Ads keyword performance expert for preschool campaigns.
32
 
33
+ TASK:
34
+ Classify keywords into 3–5 insights.
35
 
36
+ STRICT RULES:
37
+ - Do NOT invent ad groups or missing fields.
38
+ - Only use given keyword metrics.
39
+ - No paragraphs. Only bullet format.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
+ OUTPUT FORMAT:
42
+ - Keyword: <name>
43
+ Label: Winning | Wasted Spend | Scale | Reduce | Investigate
44
+ Evidence: <CTR, cost, conversions>
45
+ Action: <specific bid or pause action>
46
 
47
+ DATA:
48
+ {payload}
49
+ """
50
  # -------------------------
51
  # Main runner
52
  # -------------------------
app/ads1/search_term_optimizer.py CHANGED
@@ -44,22 +44,26 @@ def build_search_optimizer_prompt(context: dict) -> str:
44
  name = context.get("campaign_name", "this campaign")
45
 
46
  return (
47
- f"You are an expert Google Ads search term optimization strategist.\n\n"
48
- f"Analyze search term performance for {name}.\n\n"
49
- "Your job is to provide 3 to 5 actionable insights.\n"
50
- "Focus on:\n"
51
- "- wasted spend search terms\n"
52
- "- high intent converting terms\n"
53
- "- scaling opportunities\n"
54
- "- terms to pause or reduce bids\n"
55
- "- unusual CTR / CPA / conversion patterns\n\n"
56
- "Rules:\n"
57
- "- Be specific and actionable\n"
58
- "- Use simple language\n"
59
- "- One insight per bullet point\n"
60
- "- Start each line with '- '\n"
61
- "- No intro sentence, no summary, no JSON\n\n"
62
- f"Data:\n{payload}"
 
 
 
 
63
  )
64
 
65
  # -------------------------
 
44
  name = context.get("campaign_name", "this campaign")
45
 
46
  return (
47
+ f"""
48
+ You are a search term optimization specialist.
49
+
50
+ TASK:
51
+ Return 3–5 search term actions.
52
+
53
+ STRICT RULES:
54
+ - Only use provided search terms.
55
+ - Do not compare unrelated terms.
56
+ - No explanations longer than 1 sentence per bullet.
57
+
58
+ OUTPUT FORMAT:
59
+ - Search Term: <term>
60
+ Category: Wasted Spend | High Intent | Scale | Negative Keyword Candidate
61
+ Evidence: <cost, clicks, conversions>
62
+ Action: <pause / scale / add as keyword / add as negative>
63
+
64
+ DATA:
65
+ {payload}
66
+ """
67
  )
68
 
69
  # -------------------------