Spaces:
Sleeping
Sleeping
Update prompts.py
Browse files- prompts.py +137 -54
prompts.py
CHANGED
|
@@ -1,34 +1,156 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
| 3 |
|
| 4 |
OBJECTIVE:
|
| 5 |
-
- Generate convincing
|
| 6 |
- Connect emotionally with the audience
|
| 7 |
- Address real desires, problems, and motivations
|
| 8 |
- Maintain natural and conversational language
|
| 9 |
-
- Orient content towards transformation and results
|
| 10 |
|
| 11 |
CRITICAL OUTPUT RULES:
|
| 12 |
-
- Output ONLY the
|
| 13 |
-
- Start directly with the
|
| 14 |
-
-
|
| 15 |
-
-
|
|
|
|
|
|
|
| 16 |
"""
|
| 17 |
|
| 18 |
-
def create_offer_instruction(avatar_description, product_name, selected_formula_name
|
| 19 |
"""
|
| 20 |
Creates instructions for generating an offer based on the selected formula.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
"""
|
| 22 |
# Get the selected formula
|
| 23 |
selected_formula = offer_formulas[selected_formula_name]
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
additional_instructions =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
FORMULA TO USE:
|
| 34 |
{selected_formula["description"]}
|
|
@@ -49,43 +171,4 @@ Create a compelling offer following the formula structure exactly.
|
|
| 49 |
examples_text = "\n\n".join([f"Example {i+1}:\n{example}" for i, example in enumerate(selected_formula["examples"][:3])])
|
| 50 |
instruction += f"\n\nGet inspired by these examples:\n{examples_text}"
|
| 51 |
|
| 52 |
-
return instruction
|
| 53 |
-
|
| 54 |
-
def create_promise_instruction(number_of_promises, target_audience, product, selected_formula, selected_angle):
|
| 55 |
-
"""
|
| 56 |
-
Creates instructions for generating promises based on the selected formula and angle.
|
| 57 |
-
"""
|
| 58 |
-
angle_instruction = ""
|
| 59 |
-
if selected_angle["description"] != "Generate the bullet without any specific angle":
|
| 60 |
-
angle_instruction = f"\nApply this angle: {selected_angle['description']}\nStyle: {selected_angle['style']}\nUse these keywords as inspiration: {', '.join(selected_angle['keywords'])}"
|
| 61 |
-
|
| 62 |
-
format_rules = """
|
| 63 |
-
FORMAT RULES:
|
| 64 |
-
- One promise per line
|
| 65 |
-
- No numbers at the beginning
|
| 66 |
-
- No explanations or categories
|
| 67 |
-
- Add a line break between each promise
|
| 68 |
-
- Never include : symbols in promises
|
| 69 |
-
- Each promise must be a complete and concise phrase
|
| 70 |
-
|
| 71 |
-
PROMISE STRUCTURE:
|
| 72 |
-
- Must be relevant to target audience
|
| 73 |
-
- Must show a specific, measurable result
|
| 74 |
-
- Must include an emotional element
|
| 75 |
-
- Must eliminate an objection or pain point
|
| 76 |
-
- Must inspire immediate action or belief
|
| 77 |
-
"""
|
| 78 |
-
|
| 79 |
-
return (
|
| 80 |
-
f"{system_prompt}\n\n"
|
| 81 |
-
f"CONTENT TYPE: PROMISES\n\n"
|
| 82 |
-
f"{format_rules}\n\n"
|
| 83 |
-
f"Your task is to create {number_of_promises} irresistible promises designed for {target_audience}. "
|
| 84 |
-
f"The goal is to show how {product} will transform the reader's life, connecting naturally and emotionally. "
|
| 85 |
-
f"Avoid using literal or repetitive mentions, and highlight concrete results, showing how the product delivers specific outcomes or satisfies real desires. "
|
| 86 |
-
f"{angle_instruction}\n"
|
| 87 |
-
f"IMPORTANT: Keep promises clear, specific and credible. "
|
| 88 |
-
f"Use the selected formula as a guide:\n\n{selected_formula['description']}\n\n"
|
| 89 |
-
f"Get inspired by these examples:\n"
|
| 90 |
-
+ '\n'.join([f"- {example}" for example in selected_formula['examples']]) + "\n\n"
|
| 91 |
-
f"Your goal is to inspire confidence and action, avoiding explanations or categories in the response."
|
|
|
|
| 1 |
+
from formulas import offer_formulas
|
| 2 |
+
|
| 3 |
+
offer_system_prompt = """You are a world-class expert copywriter, experienced in creating compelling offers that connect emotionally with the target audience.
|
| 4 |
|
| 5 |
OBJECTIVE:
|
| 6 |
+
- Generate a convincing offer in Spanish
|
| 7 |
- Connect emotionally with the audience
|
| 8 |
- Address real desires, problems, and motivations
|
| 9 |
- Maintain natural and conversational language
|
|
|
|
| 10 |
|
| 11 |
CRITICAL OUTPUT RULES:
|
| 12 |
+
- Output ONLY the offer itself with NO introductory text, explanations, or additional commentary
|
| 13 |
+
- Start directly with the attention hook or opening phrase
|
| 14 |
+
- The entire response should be ONLY the offer itself following the formula structure
|
| 15 |
+
- Do not include phrases like "Aquí tienes una oferta convincente" or "Esta es tu oferta"
|
| 16 |
+
- Do not use any special formatting, markdown, or HTML tags
|
| 17 |
+
- Do not add any characters that could trigger text box formatting
|
| 18 |
"""
|
| 19 |
|
| 20 |
+
def create_offer_instruction(avatar_description, product_name, selected_formula_name):
|
| 21 |
"""
|
| 22 |
Creates instructions for generating an offer based on the selected formula.
|
| 23 |
+
|
| 24 |
+
Args:
|
| 25 |
+
avatar_description: Description of the target audience
|
| 26 |
+
product_name: Name of the product or service
|
| 27 |
+
selected_formula_name: Name of the formula to use
|
| 28 |
+
|
| 29 |
+
Returns:
|
| 30 |
+
str: Complete instruction for generating the offer
|
| 31 |
"""
|
| 32 |
# Get the selected formula
|
| 33 |
selected_formula = offer_formulas[selected_formula_name]
|
| 34 |
|
| 35 |
+
# Add specific instructions for each formula
|
| 36 |
+
additional_instructions = ""
|
| 37 |
+
if selected_formula_name == "Fórmula Sueño-Obstáculo":
|
| 38 |
+
additional_instructions = """
|
| 39 |
+
SPECIFIC INSTRUCTIONS FOR THIS FORMULA:
|
| 40 |
+
1. PRODUCT/SERVICE NAME HANDLING:
|
| 41 |
+
- CRITICAL: If a product name is provided, YOU MUST USE THAT EXACT NAME. This is non-negotiable.
|
| 42 |
+
- If the product name is not empty, use it EXACTLY as provided with no modifications
|
| 43 |
+
- Only create a new name if no product name is provided or it contains generic placeholders
|
| 44 |
+
|
| 45 |
+
2. Analyze ALL available information:
|
| 46 |
+
- Product/service name (use the name provided)
|
| 47 |
+
- Target audience description (avatar_description)
|
| 48 |
+
- Content from uploaded files (if any)
|
| 49 |
+
|
| 50 |
+
3. Determine the most appropriate type (curso, webinar, entrenamiento, etc.) based on:
|
| 51 |
+
- Any type mentioned in product_name
|
| 52 |
+
- The nature of the solution described in avatar_description
|
| 53 |
+
- The most suitable format for the target audience's needs
|
| 54 |
+
|
| 55 |
+
4. Create a comprehensive offer by combining:
|
| 56 |
+
- The appropriate type (determined in step 3)
|
| 57 |
+
- The EXACT product name as provided (if available)
|
| 58 |
+
- A compelling dream based on avatar_description
|
| 59 |
+
- A relevant obstacle based on avatar_description
|
| 60 |
+
|
| 61 |
+
5. The dream should be ambitious but believable, incorporating:
|
| 62 |
+
- Target audience desires from avatar_description
|
| 63 |
+
- Explicit goals mentioned in uploaded content (if any)
|
| 64 |
+
|
| 65 |
+
6. The obstacle should reflect:
|
| 66 |
+
- Real problems mentioned in avatar_description
|
| 67 |
+
- Challenges that would normally prevent achieving the dream
|
| 68 |
+
|
| 69 |
+
7. IMPORTANT: Vary the way you start the phrase. Instead of always using "Se trata de un...", use different openings such as:
|
| 70 |
+
- "Presentamos un..."
|
| 71 |
+
- "Te ofrecemos un..."
|
| 72 |
+
- "Descubre nuestro..."
|
| 73 |
+
- "Conoce el..."
|
| 74 |
+
- "Hemos creado un..."
|
| 75 |
+
- "Imagina tener acceso a un..."
|
| 76 |
+
- "Por fin existe un..."
|
| 77 |
+
- "Ahora puedes acceder a un..."
|
| 78 |
+
- "Tenemos para ti un..."
|
| 79 |
+
- "Disfruta de un..."
|
| 80 |
+
"""
|
| 81 |
|
| 82 |
+
elif selected_formula_name == "Oferta Dorada":
|
| 83 |
+
additional_instructions = """
|
| 84 |
+
SPECIFIC INSTRUCTIONS FOR THIS FORMULA:
|
| 85 |
+
1. PRODUCT/SERVICE NAME HANDLING:
|
| 86 |
+
- CRITICAL: If a product name is provided, YOU MUST USE THAT EXACT NAME in one of the three lines of the offer.
|
| 87 |
+
- If a product name is provided, use it EXACTLY as provided with no modifications
|
| 88 |
+
- If no product name is provided, DO NOT create or add ANY name
|
| 89 |
+
- DO NOT invent names like "ProExpert", "Sistema Profesional", "método XYZ", etc.
|
| 90 |
+
- DO NOT add product names like "curso", "programa", etc. unless they were explicitly provided
|
| 91 |
+
- For the third line, use generic terms like "Con nuestra metodología", "Mediante este sistema",
|
| 92 |
+
"Gracias a este método", etc. when no specific name is provided
|
| 93 |
+
|
| 94 |
+
2. FOLLOW THE 6-STEP PROCESS FOR CREATING AN IRRESISTIBLE OFFER:
|
| 95 |
+
|
| 96 |
+
STEP 1: IDENTIFY THE MAIN PROBLEM (ATTENTION HOOK)
|
| 97 |
+
- Analyze the avatar_description DEEPLY to understand their specific pain points
|
| 98 |
+
- Create a powerful hook that directly addresses their biggest frustration or anxiety
|
| 99 |
+
- Use statements that make them think "this person understands my situation exactly"
|
| 100 |
+
- Focus on the emotional impact of their problem, not just the practical aspects
|
| 101 |
+
- The hook must create an immediate emotional connection
|
| 102 |
+
- IMPORTANT: Be creative and varied in your approach
|
| 103 |
+
|
| 104 |
+
STEP 2: CRAFT A QUANTIFIABLE VALUE PROMISE
|
| 105 |
+
- Write a promise COMPLETELY IN CAPITAL LETTERS that includes:
|
| 106 |
+
* Concrete numbers (money, time, results)
|
| 107 |
+
* Powerful action verbs (EARN, MULTIPLY, ACHIEVE, MASTER)
|
| 108 |
+
* Specific timeframes (EN 30 DÍAS, EN SOLO 2 SEMANAS)
|
| 109 |
+
* Clear effort indicators (CON SOLO 15 MINUTOS DIARIOS)
|
| 110 |
+
- Follow this structure: CÓMO [LOGRAR RESULTADO DESEADO] SIN [OBJECIÓN O CREENCIA LIMITANTE]
|
| 111 |
+
- NEVER use exclamation marks (!) in this section
|
| 112 |
+
- Make the promise both ambitious and believable
|
| 113 |
+
- AVOID GENERIC PHRASES like "al otro nivel", "en tiempo récord", "como nunca antes", "revolucionario"
|
| 114 |
+
- Instead, use SPECIFIC, MEASURABLE language that clearly states the exact benefit
|
| 115 |
|
| 116 |
+
STEP 3: DEMONSTRATE TRUST AND AUTHORITY
|
| 117 |
+
- Include elements that prove your system works:
|
| 118 |
+
* Personal results ("Así como he vendido más de $250,000 USD")
|
| 119 |
+
* Client results ("Mis clientes han vendido más de $5,000,000")
|
| 120 |
+
* Social proof (testimonials, case studies)
|
| 121 |
+
- Establish credibility through specific numbers and verifiable claims
|
| 122 |
+
- Connect your authority directly to the promised result
|
| 123 |
+
|
| 124 |
+
STEP 4: REDUCE DELIVERY TIME
|
| 125 |
+
- Clearly state how quickly they will see results
|
| 126 |
+
- Make the timeframe specific and believable
|
| 127 |
+
- Emphasize speed without sacrificing quality
|
| 128 |
+
- Use phrases like "en solo X días" or "desde la primera semana"
|
| 129 |
+
- IMPORTANT: This refers to when they'll see RESULTS, not how long they need to work
|
| 130 |
+
- Examples: "verás resultados en 30 días", "transformación completa en 8 semanas"
|
| 131 |
+
|
| 132 |
+
STEP 5: MINIMIZE CLIENT EFFORT
|
| 133 |
+
- Address the fear of complicated processes
|
| 134 |
+
- CLEARLY specify the exact effort required from the client:
|
| 135 |
+
* Time commitment: "con solo 15 minutos al día"
|
| 136 |
+
* Frequency: "practicando 3 veces por semana"
|
| 137 |
+
* Complexity: "siguiendo 5 pasos sencillos"
|
| 138 |
+
* Prerequisites: "sin necesidad de experiencia previa"
|
| 139 |
+
- Make the implementation process seem accessible and straightforward
|
| 140 |
+
- Emphasize the low effort-to-results ratio
|
| 141 |
+
- Examples: "dedicando solo 20 minutos diarios", "con 3 ejercicios simples"
|
| 142 |
+
|
| 143 |
+
STEP 6: COMBINE ALL ELEMENTS INTO A COHESIVE OFFER
|
| 144 |
+
- Ensure all elements address the SAME core problem
|
| 145 |
+
- Create a LOGICAL PROGRESSION from problem to solution to implementation
|
| 146 |
+
- Maintain thematic consistency throughout the entire offer
|
| 147 |
+
- Be SPECIFIC and CONCRETE - avoid generic superlatives and clichés
|
| 148 |
+
- Use PRECISE language that creates a clear mental image
|
| 149 |
+
- BANNED PHRASES: "al otro nivel", "en tiempo récord", "como nunca antes",
|
| 150 |
+
"revolucionario", "increíble", "asombroso", "el mejor", "único"
|
| 151 |
+
"""
|
| 152 |
+
# Create the instruction using the system prompt at the beginning
|
| 153 |
+
instruction = f"""{offer_system_prompt}
|
| 154 |
|
| 155 |
FORMULA TO USE:
|
| 156 |
{selected_formula["description"]}
|
|
|
|
| 171 |
examples_text = "\n\n".join([f"Example {i+1}:\n{example}" for i, example in enumerate(selected_formula["examples"][:3])])
|
| 172 |
instruction += f"\n\nGet inspired by these examples:\n{examples_text}"
|
| 173 |
|
| 174 |
+
return instruction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|