JeCabrera commited on
Commit
febe020
·
verified ·
1 Parent(s): 29fa256

Update bullets/generator.py

Browse files
Files changed (1) hide show
  1. bullets/generator.py +452 -452
bullets/generator.py CHANGED
@@ -1,453 +1,453 @@
1
- import random
2
-
3
- def create_bullet_instruction(avatar_description=None, product_name=None, uploaded_content=None):
4
- """
5
- Creates the instruction for generating benefit bullets.
6
- The model will randomly choose between different bullet formulas.
7
-
8
- Args:
9
- avatar_description: Description of the target audience
10
- product_name: Name of the product or service
11
- uploaded_content: Content from uploaded files (if any)
12
-
13
- Returns:
14
- str: The complete instruction for generating bullets
15
- """
16
- # Base instruction that applies to all formulas
17
- base_instruction = """
18
- IMPORTANT: After creating the main offer, add a section with 5 powerful benefit bullets that reinforce the promise.
19
-
20
- Start the bullets section with an introduction like:
21
- "Además, al aprovechar esta oferta también obtendrás:" or "Y eso no es todo, también disfrutarás de estos beneficios adicionales:" or "Con esta solución también conseguirás:"
22
-
23
- For the benefit bullets section:
24
-
25
- You are a world-class expert copywriter, experienced in creating benefits that emotionally connect and address the desires, problems, and motivations of the target audience.
26
-
27
- OBJECTIVE:
28
- - Generate 5 convincing and specific benefit bullets in Spanish
29
- - Connect emotionally with the audience
30
- - Address real desires, problems, and motivations
31
- - Maintain natural and conversational language
32
- - Orient each benefit towards action
33
-
34
- FORMAT RULES:
35
- - Each benefit must start with "• "
36
- - One benefit per line
37
- - No explanations or categories
38
- - Add a line break between each benefit
39
- - Never include : symbols in bullets
40
- - Never use exclamation marks (!) in any bullet
41
- - Each benefit must be a complete and concise phrase
42
- - Do not use any emojis in the bullets
43
- - Use natural, conversational language (avoid formal or technical jargon)
44
-
45
- IMPORTANT:
46
- - Each benefit must be ultra-specific with concrete, measurable outcomes
47
- - NEVER use generic phrases like "mejorar tu vida" or "aumentar tu productividad"
48
- - Always include specific numbers, percentages, or exact timeframes
49
- - Each bullet must solve a very specific problem with a detailed solution
50
- - Include at least one bullet that directly counters a common objection with evidence
51
- - Each bullet should contain a clear call to action with a specific next step
52
- - Avoid all generalizations - be precise about exactly what the user will get
53
- - Maintain a persuasive but honest tone with verifiable claims
54
- - Focus on tangible and measurable results that can be verified
55
- - Ensure each bullet addresses a different aspect of the offer
56
- - Write in a natural, conversational tone as if speaking directly to the reader
57
- - Never use exclamation marks in the bullets
58
- """
59
-
60
- # Add guidance based on available information
61
- guidance = ""
62
-
63
- # Check different combinations of available information
64
- if not avatar_description and not product_name and not uploaded_content:
65
- return """
66
- ADVERTENCIA: No se ha proporcionado ninguna información para generar los bullets.
67
-
68
- Para obtener bullets más efectivos y personalizados, por favor proporciona al menos uno de los siguientes:
69
- - Descripción del público objetivo (avatar)
70
- - Nombre del producto o servicio
71
- - Contenido adicional relevante
72
-
73
- Sin esta información, los bullets generados serán genéricos y posiblemente menos efectivos para tu oferta específica.
74
- """
75
- elif not avatar_description and not product_name and uploaded_content:
76
- # Only uploaded content provided
77
- guidance = """
78
- NOTA IMPORTANTE: Solo se ha proporcionado contenido adicional sin detalles específicos del público objetivo o producto.
79
- Analiza cuidadosamente el contenido subido para:
80
- - Identificar el público objetivo probable a partir del contexto
81
- - Determinar el producto/servicio que probablemente se está ofreciendo
82
- - Extraer puntos de dolor, objeciones y necesidades mencionadas en el contenido
83
- - Crear beneficios que aborden específicamente los problemas identificados en el contenido
84
- """
85
- elif avatar_description and not product_name and not uploaded_content:
86
- # Only avatar description provided
87
- guidance = """
88
- NOTA IMPORTANTE: Solo se ha proporcionado información del público objetivo, sin detalles del producto ni contenido adicional.
89
- Enfócate en crear beneficios que:
90
- - Aborden los puntos de dolor específicos mencionados en la descripción del avatar
91
- - Resuelvan las objeciones comunes que este público suele tener
92
- - Proporcionen soluciones a los problemas específicos de este público
93
- - Conecten emocionalmente con las motivaciones de este avatar
94
- """
95
- elif product_name and not avatar_description and not uploaded_content:
96
- # Only product name provided
97
- guidance = """
98
- NOTA IMPORTANTE: Solo se ha proporcionado información del producto, sin detalles del público objetivo ni contenido adicional.
99
- Enfócate en crear beneficios que:
100
- - Destaquen las características únicas de este producto específico
101
- - Aborden objeciones comunes relacionadas con este tipo de producto
102
- - Muestren resultados medibles que este producto puede proporcionar
103
- - Diferencien este producto de alternativas genéricas
104
- """
105
- elif avatar_description and product_name and not uploaded_content:
106
- # Avatar and product provided, no uploaded content
107
- guidance = """
108
- NOTA IMPORTANTE: Se ha proporcionado información tanto del público objetivo como del producto, pero no hay contenido adicional.
109
- Crea beneficios altamente dirigidos que:
110
- - Conecten las características específicas del producto con las necesidades del avatar
111
- - Aborden las objeciones más probables que este público tendría sobre este producto
112
- - Muestren cómo este producto específico resuelve los problemas concretos de este avatar
113
- - Destaquen los resultados medibles que este público específico obtendrá con este producto
114
- """
115
- elif avatar_description and uploaded_content and not product_name:
116
- # Avatar and uploaded content provided, no product
117
- guidance = """
118
- NOTA IMPORTANTE: Se ha proporcionado información del público objetivo y contenido adicional, pero no hay detalles específicos del producto.
119
- Analiza ambas fuentes para:
120
- - Inferir el producto/servicio probable del contexto
121
- - Identificar puntos de dolor específicos mencionados tanto en la descripción del avatar como en el contenido subido
122
- - Crear beneficios que aborden las necesidades y objeciones más prominentes
123
- - Asegurar que los beneficios sean relevantes tanto para el avatar como para el contexto del contenido
124
- """
125
- elif product_name and uploaded_content and not avatar_description:
126
- # Product and uploaded content provided, no avatar
127
- guidance = """
128
- NOTA IMPORTANTE: Se ha proporcionado información del producto y contenido adicional, pero no hay detalles del público objetivo.
129
- Analiza ambas fuentes para:
130
- - Inferir el público objetivo probable del contexto
131
- - Identificar cómo el producto aborda las necesidades mencionadas en el contenido subido
132
- - Crear beneficios que destaquen cómo el producto resuelve problemas específicos mencionados en el contenido
133
- - Enfocarte en resultados medibles que el producto puede proporcionar según el contexto
134
- """
135
- elif avatar_description and product_name and uploaded_content:
136
- # All information provided
137
- guidance = """
138
- NOTA IMPORTANTE: Se ha proporcionado información completa sobre el público objetivo, producto y contenido adicional.
139
- Utiliza todas las fuentes para:
140
- - Crear beneficios ultra-específicos que conecten perfectamente el producto con las necesidades del avatar
141
- - Extraer detalles concretos del contenido subido para hacer los beneficios más relevantes y personalizados
142
- - Abordar objeciones específicas mencionadas en cualquiera de las fuentes
143
- - Crear beneficios que destaquen exactamente cómo este producto resuelve los problemas concretos de este avatar
144
- """
145
-
146
- # Add information about available inputs
147
- input_information = f"""
148
-
149
- AVAILABLE INFORMATION FOR ANALYSIS:
150
-
151
- 1. TARGET AUDIENCE DESCRIPTION:
152
- {avatar_description if avatar_description else "No specific avatar description provided."}
153
-
154
- 2. PRODUCT/SERVICE NAME:
155
- {product_name if product_name else "No specific product name provided."}
156
-
157
- 3. UPLOADED CONTENT:
158
- {uploaded_content if uploaded_content else "No additional content uploaded."}
159
-
160
- {guidance}
161
-
162
- IMPORTANT: Analyze ALL available information above to create bullets that specifically address the needs, desires, and objections of this audience for this specific product/service.
163
- """
164
-
165
- # Rest of the function remains the same...
166
- # Multiple formula instructions (unchanged)
167
- formula_instructions = """
168
- IMPORTANT: Choose ONE of the following bullet formulas at random and use it consistently for ALL 5 bullets:
169
-
170
- FORMULA 1 - STANDARD BENEFIT:
171
- - Must be relevant to a specific segment of your target audience
172
- - Must show a specific result with exact numbers or percentages
173
- - Must include a precise emotional element tied to a specific desire
174
- - Must eliminate a specific objection with evidence
175
- - Must inspire immediate action with a clear next step
176
-
177
- EXAMPLE FORMAT FOR FORMULA 1:
178
- •Transforma tu estrategia de email marketing con plantillas que aumentan la tasa de apertura un 37% en 14 días, incluso si nunca has escrito una campaña exitosa.
179
-
180
- FORMULA 2 - 3 EN 1 (FEATURE + BENEFIT + MEANING):
181
- Formula: [Feature + Benefit + Meaning]
182
-
183
- This formula creates an instant connection by linking three key elements:
184
- 1. Feature: A specific, tangible characteristic of your offer
185
- 2. Benefit: The exact, measurable result it delivers
186
- 3. Meaning: The precise transformation in their life
187
-
188
- Instructions for Creating Connection Bullets:
189
- 1. Identify Your Core Feature:
190
- - What specific component makes your offer unique?
191
- - What exact characteristic can be measured?
192
- - What concrete element can they use immediately?
193
-
194
- 2. Transform into Benefits:
195
- - What specific metric will improve?
196
- - What exact problem will it solve?
197
- - What measurable outcome will they achieve?
198
-
199
- 3. Add Deeper Meaning:
200
- - How exactly will it transform their specific situation?
201
- - What precise emotional impact will they experience?
202
- - What concrete identity shift will occur?
203
-
204
- Structure Formats:
205
- 1. "[Specific Feature] para que puedas [Measurable Benefit] con lo que [Concrete Meaning]"
206
- 2. "Con [Specific Feature] podrás [Measurable Benefit] permitiéndote [Concrete Meaning]"
207
- 3. "Gracias a [Specific Feature] lograrás [Measurable Benefit] haciendo que [Concrete Meaning]"
208
- 4. "Mediante [Specific Feature] conseguirás [Measurable Benefit] lo que significa [Concrete Meaning]"
209
- 5. "Usando [Specific Feature] alcanzarás [Measurable Benefit] transformando [Concrete Meaning]"
210
-
211
- EXAMPLES FOR FORMULA 2:
212
- • El Sistema de inmersión bilingüe de 21 días para que puedas mantener conversaciones de 15 minutos en inglés con lo que por fin dejarás de depender de traductores en tus reuniones internacionales.
213
-
214
- • Con nuestro algoritmo de enfoque profundo de 3 pasos podrás completar proyectos en 4 horas en lugar de 8 permitiéndote disfrutar 20 horas adicionales semanales con tu familia.
215
-
216
- • Gracias a nuestra tecnología de reprogramación mental de 28 días lograrás superar el miedo a hablar en público haciendo que te sientas seguro al presentar ante audiencias de hasta 500 personas.
217
-
218
- • Mediante nuestro framework de creatividad de 5 fases conseguirás generar 10 ideas innovadoras por sesión lo que significa que nunca más perderás oportunidades de negocio por falta de propuestas.
219
-
220
- • Usando nuestro sistema de automatización de tareas alcanzarás una reducción del 68% en tiempo administrativo transformando 15 horas semanales de trabajo tedioso en tiempo productivo para hacer crecer tu negocio.
221
-
222
- FORMULA 3 - ANTI-PROCRASTINACIÓN (ACTION + RESULT + TIME):
223
- Formula: [Action + Result + Time]
224
-
225
- This formula uses a clear action followed by a direct result and the time in which that result will be achieved. You can modify the order of elements as needed.
226
-
227
- Instructions:
228
- 1. Establish the clear action that the user must take (specific action with details)
229
- 2. Define the exact result with numbers/percentages that the user will obtain
230
- 3. Indicate the precise time period with exact days/weeks/months
231
-
232
- Response Format (choose one for each bullet):
233
- 1. Action + Result + Time
234
- 2. Action + Time + Result
235
- 3. Result + Action + Time
236
- 4. Result + Time + Action
237
- 5. Time + Action + Result
238
- 6. Time + Result + Action
239
- 7. Result + Time + Action
240
-
241
- EXAMPLES FOR FORMULA 3:
242
- • Implementa nuestra estrategia de email marketing y aumenta tus ventas un 27% en los próximos 30 días, incluso si tu lista tiene menos de 500 suscriptores.
243
-
244
- • Aplica las 3 técnicas de copywriting en tus próximos 5 posts y en 14 días verás un incremento del 42% en engagement, eliminando por completo los comentarios negativos.
245
-
246
- • Tu tasa de conversión aumentará del 2% al 5.7% cuando implementes nuestro sistema de embudos en los próximos 21 días, sin necesidad de aumentar tu presupuesto publicitario.
247
-
248
- • En 28 días exactos dominarás las 7 habilidades fundamentales de negociación aplicando nuestro método paso a paso, incluso si actualmente cedes en cada discusión.
249
-
250
- • 8 semanas es todo lo que necesitas para transformar tu cuerpo con nuestro programa de 15 minutos diarios, reduciendo hasta 8 kg de grasa y aumentando tu energía un 65% desde la primera semana.
251
-
252
- FORMULA 4 - NÚMERICA SUPREMA:
253
- La Fórmula Suprema de Istvanova combina 5 elementos clave más artículos plurales para crear bullets persuasivos e interesantes:
254
-
255
- 1. Artículos Plurales (Art):
256
- - Los (para masculino plural)
257
- - Las (para femenino plural)
258
- - Dan naturalidad y autoridad al texto
259
-
260
- 2. Números (N):
261
- - Específicos y creíbles (3, 5, 7, 10...)
262
- - Crean estructura y expectativas claras
263
- - Se combinan con artículos: "Los 5...", "Las 3..."
264
-
265
- 3. Adjetivo (A):
266
- - Emocionales y descriptivos
267
- - Conectan con deseos/miedos específicos
268
- - Ejemplos: comprobados, científicos, revolucionarios
269
-
270
- 4. Palabra Clave (P):
271
- - Término central del beneficio en plural
272
- - Fácil de entender y recordar
273
- - Ejemplos: métodos, estrategias, técnicas, secretos
274
-
275
- 5. Razón (R):
276
- - Justifica el beneficio con datos concretos
277
- - Añade credibilidad con evidencia específica
278
- - Conecta con la motivación específica del lector
279
-
280
- 6. Promesa (P):
281
- - Resultado específico y medible con números
282
- - Timeframe realista con días/semanas exactas
283
- - Beneficio final atractivo y verificable
284
-
285
- EXAMPLES FOR FORMULA 4:
286
- • Los 3 rituales científicamente probados para reducir tu estrés un 47% en 14 días, validados por la Universidad de Stanford.
287
-
288
- • Las 5 rutinas efectivas para fortalecer tu core en solo 12 minutos diarios, eliminando el dolor lumbar en el 89% de los casos.
289
-
290
- • Los 7 hábitos esenciales para aumentar tu productividad un 63%, permitiéndote completar en 4 horas lo que antes hacías en 8.
291
-
292
- • Las 3 técnicas comprobadas para dormir 7 horas ininterrumpidas basadas en neurociencia, que han ayudado a 1,243 personas con insomnio crónico.
293
-
294
- • Los 5 movimientos efectivos para fortalecer tu core sin equipamiento, que activan un 78% más de fibras musculares que los ejercicios tradicionales.
295
-
296
- FORMULA 5 - EL TRIÁNGULO DE ORO:
297
- Formula: [Benefit 1 + Benefit 2 + Great Promise]
298
-
299
- This formula creates high-impact bullets by combining three key benefits persuasively:
300
- 1. Benefit 1: The first benefit that addresses an immediate client need
301
- 2. Benefit 2: An additional benefit that generates more value
302
- 3. Great Promise: The main or most impactful promise that closes the proposal
303
-
304
- Instructions for Creating Powerful Bullets:
305
- 1. Identify Your Audience's Great Dream:
306
- - What's their ultimate aspiration?
307
- - What keeps them awake at night?
308
- - What's their ideal scenario?
309
- - What transformation do they deeply desire?
310
-
311
- 2. Structure Your Benefits:
312
- - Write in a natural, conversational tone (like talking to a friend)
313
- - Flow elements together without forced pauses or commas
314
- - Make transitions smooth and invisible
315
- - Keep the rhythm flowing from start to finish
316
-
317
- 3. Craft Your Benefits:
318
- - Benefit 1: Hook them with their biggest pain point using casual language
319
- - Benefit 2: Build momentum with an exciting complementary gain
320
- - Great Promise: Deliver the knockout punch that makes them say "I need this!"
321
-
322
- 4. Tips for Maximum Impact:
323
- - Write like you speak (but better)
324
- - Avoid formal language or stiff transitions
325
- - Make each element flow naturally into the next
326
- - Create a rhythm that pulls the reader through
327
- - Use conversational connectors instead of commas
328
- - Read it aloud - if you stumble, rewrite it
329
- - Make it so engaging they can't stop reading
330
- - Keep the energy high from start to finish
331
-
332
- Structure Formats:
333
- 1. "[benefit 1] [benefit 2] [great promise]"
334
- 2. "[benefit 2] [benefit 1] [great promise]"
335
- 3. "[great promise] [benefit 2] [benefit 1]"
336
- 4. "[great promise] [benefit 1] [benefit 2]"
337
- 5. "[benefit 1] [benefit 2] [great promise]"
338
- 6. "[benefit 1] + question + [benefit 2] + [great promise]"
339
- 7. "question + [benefit 1] + [benefit 2] + [great promise]"
340
- 8. "[benefit 1] + while + [benefit 2] + and also + [great promise]"
341
- 9. "Not only + [benefit 1] + but also + [benefit 2] + and best of all + [great promise]"
342
- 10. "Imagine + [benefit 1] + at the same time as + [benefit 2] + and finally + [great promise]"
343
- 11. "From + [benefit 1] + going through + [benefit 2] + until + [great promise]"
344
- 12. "First + [benefit 1] + then + [benefit 2] + and at the end + [great promise]"
345
- 13. "Start with + [benefit 1] + transform with + [benefit 2] + culminate with + [great promise]"
346
- 14. "Tired of the opposite of [benefit 1]? + Discover + [benefit 2] + and achieve + [great promise]"
347
- 15. "Finally + [benefit 1] + plus + [benefit 2] + and as a bonus + [great promise]"
348
-
349
- EXAMPLES FOR FORMULA 5:
350
- • Reduce tu estrés laboral en un 42% mientras aumentas tu productividad un 37% y transforma tu carrera profesional con nuestro sistema de gestión del tiempo basado en neurociencia aplicada.
351
-
352
- • Domina 5 idiomas extranjeros mientras duermes 8 horas ininterrumpidas y activa el 89% de tu potencial cerebral con nuestro revolucionario programa de aprendizaje durante el sueño profundo.
353
-
354
- • No solo eliminarás el dolor de espalda crónico en 14 días sino que también fortalecerás tu core un 78% y lo mejor de todo es que recuperarás la capacidad de disfrutar actividades que creías imposibles.
355
-
356
- • ¿Cansado de perder tiempo en reuniones improductivas? Descubre cómo reducir tu jornada laboral 3 horas diarias y consigue resultados un 65% superiores con nuestro framework de productividad cuántica.
357
-
358
- • Imagina generar 10 ideas innovadoras por día al mismo tiempo que reduces tu estrés un 47% y finalmente te conviertes en el referente creativo de tu industria con nuestro método de pensamiento lateral estructurado.
359
-
360
- Remember to choose just ONE formula and apply it consistently to all 5 bullets.
361
- """
362
-
363
- # Combine base instruction with formula instructions
364
- complete_instruction = base_instruction + input_information + formula_instructions
365
-
366
- return complete_instruction
367
-
368
-
369
- def get_random_bullet_formula():
370
- """
371
- Randomly selects a bullet formula type to ensure variety in generated bullets.
372
- Extracts formula names automatically from the instruction text.
373
-
374
- Returns:
375
- str: The name of the randomly selected formula
376
- """
377
- # Get the full instruction text
378
- full_instruction = create_bullet_instruction()
379
-
380
- # Extract formula names using regex pattern matching
381
- import re
382
-
383
- # Pattern to find formula names (looks for "FORMULA X - NAME:")
384
- formula_pattern = r"FORMULA\s+\d+\s+-\s+([^:]+):"
385
-
386
- # Find all matches in the instruction text
387
- formula_matches = re.findall(formula_pattern, full_instruction)
388
-
389
- # If no formulas found, fallback to manual list
390
- if not formula_matches:
391
- formulas = [
392
- "STANDARD BENEFIT",
393
- "3 EN 1 (FEATURE + BENEFIT + MEANING)",
394
- "ANTI-PROCRASTINACIÓN (ACTION + RESULT + TIME)",
395
- "NÚMERICA SUPREMA",
396
- "EL TRIÁNGULO DE ORO"
397
- ]
398
- else:
399
- formulas = formula_matches
400
-
401
- # Select a random formula
402
- selected_formula = random.choice(formulas)
403
-
404
- return selected_formula
405
-
406
-
407
- def create_bullet_instruction_with_formula(avatar_description=None, product_name=None, uploaded_content=None):
408
- """
409
- Creates the instruction for generating benefit bullets with a specific
410
- randomly selected formula to ensure consistency.
411
-
412
- Args:
413
- avatar_description: Description of the target audience
414
- product_name: Name of the product or service
415
- uploaded_content: Content from uploaded files (if any)
416
-
417
- Returns:
418
- str: The complete instruction for generating bullets with the selected formula
419
- """
420
- # Check if any information is provided
421
- if not avatar_description and not product_name and not uploaded_content:
422
- return """
423
- ADVERTENCIA: No se ha proporcionado ninguna información para generar los bullets.
424
-
425
- Para obtener bullets más efectivos y personalizados, por favor proporciona al menos uno de los siguientes:
426
- - Descripción del público objetivo (avatar)
427
- - Nombre del producto o servicio
428
- - Contenido adicional relevante
429
-
430
- Sin esta información, los bullets generados serán genéricos y posiblemente menos efectivos para tu oferta específica.
431
- """
432
-
433
- # Get base instruction
434
- base_instruction = create_bullet_instruction(
435
- avatar_description=avatar_description,
436
- product_name=product_name,
437
- uploaded_content=uploaded_content
438
- )
439
-
440
- # Get a random formula
441
- selected_formula = get_random_bullet_formula()
442
-
443
- # Add specific instruction to use the selected formula
444
- formula_directive = f"""
445
-
446
- IMPORTANT OVERRIDE: For this specific task, you MUST use FORMULA {selected_formula}
447
- for ALL 5 bullets. Do not choose randomly - you must use this exact formula consistently.
448
- """
449
-
450
- # Combine instructions
451
- complete_instruction = base_instruction + formula_directive
452
-
453
  return complete_instruction
 
1
+ import random
2
+
3
+ def create_bullet_instruction(avatar_description=None, product_name=None, uploaded_content=None):
4
+ """
5
+ Creates the instruction for generating benefit bullets.
6
+ The model will randomly choose between different bullet formulas.
7
+
8
+ Args:
9
+ avatar_description: Description of the target audience
10
+ product_name: Name of the product or service
11
+ uploaded_content: Content from uploaded files (if any)
12
+
13
+ Returns:
14
+ str: The complete instruction for generating bullets
15
+ """
16
+ # Base instruction that applies to all formulas
17
+ base_instruction = """
18
+ IMPORTANT: After creating the main offer, add a section with 5 powerful benefit bullets that reinforce the promise.
19
+
20
+ Start the bullets section with an introduction like:
21
+ "Además, al aprovechar esta oferta también obtendrás:" or "Y eso no es todo, también disfrutarás de estos beneficios adicionales:" or "Con esta solución también conseguirás:"
22
+
23
+ For the benefit bullets section:
24
+
25
+ You are a world-class expert copywriter, experienced in creating benefits that emotionally connect and address the desires, problems, and motivations of the target audience.
26
+
27
+ OBJECTIVE:
28
+ - Generate 5 convincing and specific benefit bullets in Spanish
29
+ - Connect emotionally with the audience
30
+ - Address real desires, problems, and motivations
31
+ - Maintain natural and conversational language
32
+ - Orient each benefit towards action
33
+
34
+ FORMAT RULES:
35
+ - Each benefit must start with "• "
36
+ - One benefit per line
37
+ - No explanations or categories
38
+ - Add a line break between each benefit
39
+ - Never include : symbols in bullets
40
+ - Never use exclamation marks (!) in any bullet
41
+ - Each benefit must be a complete and concise phrase
42
+ - Do not use any emojis in the bullets
43
+ - Use natural, conversational language (avoid formal or technical jargon)
44
+
45
+ IMPORTANT:
46
+ - Each benefit must be ultra-specific with concrete, measurable outcomes
47
+ - NEVER use generic phrases like "mejorar tu vida" or "aumentar tu productividad"
48
+ - Always include specific numbers, percentages, or exact timeframes
49
+ - Each bullet must solve a very specific problem with a detailed solution
50
+ - Include at least one bullet that directly counters a common objection with evidence
51
+ - Each bullet should contain a clear call to action with a specific next step
52
+ - Avoid all generalizations - be precise about exactly what the user will get
53
+ - Maintain a persuasive but honest tone with verifiable claims
54
+ - Focus on tangible and measurable results that can be verified
55
+ - Ensure each bullet addresses a different aspect of the offer
56
+ - Write in a natural, conversational tone as if speaking directly to the reader
57
+ - Never use exclamation marks in the bullets
58
+ """
59
+
60
+ # Add guidance based on available information
61
+ guidance = ""
62
+
63
+ # Check different combinations of available information
64
+ if not avatar_description and not product_name and not uploaded_content:
65
+ return """
66
+ ADVERTENCIA: No se ha proporcionado ninguna información para generar los bullets.
67
+
68
+ Para obtener bullets más efectivos y personalizados, por favor proporciona al menos uno de los siguientes:
69
+ - Descripción del público objetivo (avatar)
70
+ - Nombre del producto o servicio
71
+ - Contenido adicional relevante
72
+
73
+ Sin esta información, los bullets generados serán genéricos y posiblemente menos efectivos para tu oferta específica.
74
+ """
75
+ elif not avatar_description and not product_name and uploaded_content:
76
+ # Only uploaded content provided
77
+ guidance = """
78
+ NOTA IMPORTANTE: Solo se ha proporcionado contenido adicional sin detalles específicos del público objetivo o producto.
79
+ Analiza cuidadosamente el contenido subido para:
80
+ - Identificar el público objetivo probable a partir del contexto
81
+ - Determinar el producto/servicio que probablemente se está ofreciendo
82
+ - Extraer puntos de dolor, objeciones y necesidades mencionadas en el contenido
83
+ - Crear beneficios que aborden específicamente los problemas identificados en el contenido
84
+ """
85
+ elif avatar_description and not product_name and not uploaded_content:
86
+ # Only avatar description provided
87
+ guidance = """
88
+ NOTA IMPORTANTE: Solo se ha proporcionado información del público objetivo, sin detalles del producto ni contenido adicional.
89
+ Enfócate en crear beneficios que:
90
+ - Aborden los puntos de dolor específicos mencionados en la descripción del avatar
91
+ - Resuelvan las objeciones comunes que este público suele tener
92
+ - Proporcionen soluciones a los problemas específicos de este público
93
+ - Conecten emocionalmente con las motivaciones de este avatar
94
+ """
95
+ elif product_name and not avatar_description and not uploaded_content:
96
+ # Only product name provided
97
+ guidance = """
98
+ NOTA IMPORTANTE: Solo se ha proporcionado información del producto, sin detalles del público objetivo ni contenido adicional.
99
+ Enfócate en crear beneficios que:
100
+ - Destaquen las características únicas de este producto específico
101
+ - Aborden objeciones comunes relacionadas con este tipo de producto
102
+ - Muestren resultados medibles que este producto puede proporcionar
103
+ - Diferencien este producto de alternativas genéricas
104
+ """
105
+ elif avatar_description and product_name and not uploaded_content:
106
+ # Avatar and product provided, no uploaded content
107
+ guidance = """
108
+ NOTA IMPORTANTE: Se ha proporcionado información tanto del público objetivo como del producto, pero no hay contenido adicional.
109
+ Crea beneficios altamente dirigidos que:
110
+ - Conecten las características específicas del producto con las necesidades del avatar
111
+ - Aborden las objeciones más probables que este público tendría sobre este producto
112
+ - Muestren cómo este producto específico resuelve los problemas concretos de este avatar
113
+ - Destaquen los resultados medibles que este público específico obtendrá con este producto
114
+ """
115
+ elif avatar_description and uploaded_content and not product_name:
116
+ # Avatar and uploaded content provided, no product
117
+ guidance = """
118
+ NOTA IMPORTANTE: Se ha proporcionado información del público objetivo y contenido adicional, pero no hay detalles específicos del producto.
119
+ Analiza ambas fuentes para:
120
+ - Inferir el producto/servicio probable del contexto
121
+ - Identificar puntos de dolor específicos mencionados tanto en la descripción del avatar como en el contenido subido
122
+ - Crear beneficios que aborden las necesidades y objeciones más prominentes
123
+ - Asegurar que los beneficios sean relevantes tanto para el avatar como para el contexto del contenido
124
+ """
125
+ elif product_name and uploaded_content and not avatar_description:
126
+ # Product and uploaded content provided, no avatar
127
+ guidance = """
128
+ NOTA IMPORTANTE: Se ha proporcionado información del producto y contenido adicional, pero no hay detalles del público objetivo.
129
+ Analiza ambas fuentes para:
130
+ - Inferir el público objetivo probable del contexto
131
+ - Identificar cómo el producto aborda las necesidades mencionadas en el contenido subido
132
+ - Crear beneficios que destaquen cómo el producto resuelve problemas específicos mencionados en el contenido
133
+ - Enfocarte en resultados medibles que el producto puede proporcionar según el contexto
134
+ """
135
+ elif avatar_description and product_name and uploaded_content:
136
+ # All information provided
137
+ guidance = """
138
+ NOTA IMPORTANTE: Se ha proporcionado información completa sobre el público objetivo, producto y contenido adicional.
139
+ Utiliza todas las fuentes para:
140
+ - Crear beneficios ultra-específicos que conecten perfectamente el producto con las necesidades del avatar
141
+ - Extraer detalles concretos del contenido subido para hacer los beneficios más relevantes y personalizados
142
+ - Abordar objeciones específicas mencionadas en cualquiera de las fuentes
143
+ - Crear beneficios que destaquen exactamente cómo este producto resuelve los problemas concretos de este avatar
144
+ """
145
+
146
+ # Add information about available inputs
147
+ input_information = f"""
148
+
149
+ AVAILABLE INFORMATION FOR ANALYSIS:
150
+
151
+ 1. TARGET AUDIENCE DESCRIPTION:
152
+ {avatar_description if avatar_description else "No specific avatar description provided."}
153
+
154
+ 2. PRODUCT/SERVICE NAME:
155
+ {product_name if product_name else "No specific product name provided."}
156
+
157
+ 3. UPLOADED CONTENT:
158
+ {uploaded_content if uploaded_content else "No additional content uploaded."}
159
+
160
+ {guidance}
161
+
162
+ IMPORTANT: Analyze ALL available information above to create bullets that specifically address the needs, desires, and objections of this audience for this specific product/service.
163
+ """
164
+
165
+ # Rest of the function remains the same...
166
+ # Multiple formula instructions (unchanged)
167
+ formula_instructions = """
168
+ IMPORTANT: Choose ONE of the following bullet formulas at random and use it consistently for ALL 5 bullets:
169
+
170
+ FORMULA 1 - STANDARD BENEFIT:
171
+ - Must be relevant to a specific segment of your target audience
172
+ - Must show a specific result with exact numbers or percentages
173
+ - Must include a precise emotional element tied to a specific desire
174
+ - Must eliminate a specific objection with evidence
175
+ - Must inspire immediate action with a clear next step
176
+
177
+ EXAMPLE FORMAT FOR FORMULA 1:
178
+ •Transforma tu estrategia de email marketing con plantillas que aumentan la tasa de apertura un 37% en 14 días, incluso si nunca has escrito una campaña exitosa.
179
+
180
+ FORMULA 2 - 3 EN 1 (FEATURE + BENEFIT + MEANING):
181
+ Formula: [Feature + Benefit + Meaning]
182
+
183
+ This formula creates an instant connection by linking three key elements:
184
+ 1. Feature: A specific, tangible characteristic of your offer
185
+ 2. Benefit: The exact, measurable result it delivers
186
+ 3. Meaning: The precise transformation in their life
187
+
188
+ Instructions for Creating Connection Bullets:
189
+ 1. Identify Your Core Feature:
190
+ - What specific component makes your offer unique?
191
+ - What exact characteristic can be measured?
192
+ - What concrete element can they use immediately?
193
+
194
+ 2. Transform into Benefits:
195
+ - What specific metric will improve?
196
+ - What exact problem will it solve?
197
+ - What measurable outcome will they achieve?
198
+
199
+ 3. Add Deeper Meaning:
200
+ - How exactly will it transform their specific situation?
201
+ - What precise emotional impact will they experience?
202
+ - What concrete identity shift will occur?
203
+
204
+ Structure Formats:
205
+ 1. "[Specific Feature] para que puedas [Measurable Benefit] con lo que [Concrete Meaning]"
206
+ 2. "Con [Specific Feature] podrás [Measurable Benefit] permitiéndote [Concrete Meaning]"
207
+ 3. "Gracias a [Specific Feature] lograrás [Measurable Benefit] haciendo que [Concrete Meaning]"
208
+ 4. "Mediante [Specific Feature] conseguirás [Measurable Benefit] lo que significa [Concrete Meaning]"
209
+ 5. "Usando [Specific Feature] alcanzarás [Measurable Benefit] transformando [Concrete Meaning]"
210
+
211
+ EXAMPLES FOR FORMULA 2:
212
+ • El Sistema de inmersión bilingüe de 21 días para que puedas mantener conversaciones de 15 minutos en inglés con lo que por fin dejarás de depender de traductores en tus reuniones internacionales.
213
+
214
+ • Con nuestro algoritmo de enfoque profundo de 3 pasos podrás completar proyectos en 4 horas en lugar de 8 permitiéndote disfrutar 20 horas adicionales semanales con tu familia.
215
+
216
+ • Gracias a nuestra tecnología de reprogramación mental de 28 días lograrás superar el miedo a hablar en público haciendo que te sientas seguro al presentar ante audiencias de hasta 500 personas.
217
+
218
+ • Mediante nuestro framework de creatividad de 5 fases conseguirás generar 10 ideas innovadoras por sesión lo que significa que nunca más perderás oportunidades de negocio por falta de propuestas.
219
+
220
+ • Usando nuestro sistema de automatización de tareas alcanzarás una reducción del 68% en tiempo administrativo transformando 15 horas semanales de trabajo tedioso en tiempo productivo para hacer crecer tu negocio.
221
+
222
+ FORMULA 3 - ANTI-PROCRASTINACIÓN (ACTION + RESULT + TIME):
223
+ Formula: [Action + Result + Time]
224
+
225
+ This formula uses a clear action followed by a direct result and the time in which that result will be achieved. You can modify the order of elements as needed.
226
+
227
+ Instructions:
228
+ 1. Establish the clear action that the user must take (specific action with details)
229
+ 2. Define the exact result with numbers/percentages that the user will obtain
230
+ 3. Indicate the precise time period with exact days/weeks/months
231
+
232
+ Response Format (choose one for each bullet):
233
+ 1. Action + Result + Time
234
+ 2. Action + Time + Result
235
+ 3. Result + Action + Time
236
+ 4. Result + Time + Action
237
+ 5. Time + Action + Result
238
+ 6. Time + Result + Action
239
+ 7. Result + Time + Action
240
+
241
+ EXAMPLES FOR FORMULA 3:
242
+ • Implementa nuestra estrategia de email marketing y aumenta tus ventas un 27% en los próximos 30 días, incluso si tu lista tiene menos de 500 suscriptores.
243
+
244
+ • Aplica las 3 técnicas de copywriting en tus próximos 5 posts y en 14 días verás un incremento del 42% en engagement, eliminando por completo los comentarios negativos.
245
+
246
+ • Tu tasa de conversión aumentará del 2% al 5.7% cuando implementes nuestro sistema de embudos en los próximos 21 días, sin necesidad de aumentar tu presupuesto publicitario.
247
+
248
+ • En 28 días exactos dominarás las 7 habilidades fundamentales de negociación aplicando nuestro método paso a paso, incluso si actualmente cedes en cada discusión.
249
+
250
+ • 8 semanas es todo lo que necesitas para transformar tu cuerpo con nuestro programa de 15 minutos diarios, reduciendo hasta 8 kg de grasa y aumentando tu energía un 65% desde la primera semana.
251
+
252
+ FORMULA 4 - NÚMERICA SUPREMA:
253
+ La Fórmula Suprema de Istvanova combina 5 elementos clave más artículos plurales para crear bullets persuasivos e interesantes:
254
+
255
+ 1. Artículos Plurales (Art):
256
+ - Los (para masculino plural)
257
+ - Las (para femenino plural)
258
+ - Dan naturalidad y autoridad al texto
259
+
260
+ 2. Números (N):
261
+ - Específicos y creíbles (3, 5, 7, 10...)
262
+ - Crean estructura y expectativas claras
263
+ - Se combinan con artículos: "Los 5...", "Las 3..."
264
+
265
+ 3. Adjetivo (A):
266
+ - Emocionales y descriptivos
267
+ - Conectan con deseos/miedos específicos
268
+ - Ejemplos: comprobados, científicos, revolucionarios
269
+
270
+ 4. Palabra Clave (P):
271
+ - Término central del beneficio en plural
272
+ - Fácil de entender y recordar
273
+ - Ejemplos: métodos, estrategias, técnicas, secretos
274
+
275
+ 5. Razón (R):
276
+ - Justifica el beneficio con datos concretos
277
+ - Añade credibilidad con evidencia específica
278
+ - Conecta con la motivación específica del lector
279
+
280
+ 6. Promesa (P):
281
+ - Resultado específico y medible con números
282
+ - Timeframe realista con días/semanas exactas
283
+ - Beneficio final atractivo y verificable
284
+
285
+ EXAMPLES FOR FORMULA 4:
286
+ • Los 3 rituales científicamente probados para reducir tu estrés un 47% en 14 días, validados por la Universidad de Stanford.
287
+
288
+ • Las 5 rutinas efectivas para fortalecer tu core en solo 12 minutos diarios, eliminando el dolor lumbar en el 89% de los casos.
289
+
290
+ • Los 7 hábitos esenciales para aumentar tu productividad un 63%, permitiéndote completar en 4 horas lo que antes hacías en 8.
291
+
292
+ • Las 3 técnicas comprobadas para dormir 7 horas ininterrumpidas basadas en neurociencia, que han ayudado a 1,243 personas con insomnio crónico.
293
+
294
+ • Los 5 movimientos efectivos para fortalecer tu core sin equipamiento, que activan un 78% más de fibras musculares que los ejercicios tradicionales.
295
+
296
+ FORMULA 5 - EL TRIÁNGULO DE ORO:
297
+ Formula: [Benefit 1 + Benefit 2 + Great Promise]
298
+
299
+ This formula creates high-impact bullets by combining three key benefits persuasively:
300
+ 1. Benefit 1: The first benefit that addresses an immediate client need
301
+ 2. Benefit 2: An additional benefit that generates more value
302
+ 3. Great Promise: The main or most impactful promise that closes the proposal
303
+
304
+ Instructions for Creating Powerful Bullets:
305
+ 1. Identify Your Audience's Great Dream:
306
+ - What's their ultimate aspiration?
307
+ - What keeps them awake at night?
308
+ - What's their ideal scenario?
309
+ - What transformation do they deeply desire?
310
+
311
+ 2. Structure Your Benefits:
312
+ - Write in a natural, conversational tone (like talking to a friend)
313
+ - Flow elements together without forced pauses or commas
314
+ - Make transitions smooth and invisible
315
+ - Keep the rhythm flowing from start to finish
316
+
317
+ 3. Craft Your Benefits:
318
+ - Benefit 1: Hook them with their biggest pain point using casual language
319
+ - Benefit 2: Build momentum with an exciting complementary gain
320
+ - Great Promise: Deliver the knockout punch that makes them say "I need this!"
321
+
322
+ 4. Tips for Maximum Impact:
323
+ - Write like you speak (but better)
324
+ - Avoid formal language or stiff transitions
325
+ - Make each element flow naturally into the next
326
+ - Create a rhythm that pulls the reader through
327
+ - Use conversational connectors instead of commas
328
+ - Read it aloud - if you stumble, rewrite it
329
+ - Make it so engaging they can't stop reading
330
+ - Keep the energy high from start to finish
331
+
332
+ Structure Formats:
333
+ 1. "[benefit 1] [benefit 2] [great promise]"
334
+ 2. "[benefit 2] [benefit 1] [great promise]"
335
+ 3. "[great promise] [benefit 2] [benefit 1]"
336
+ 4. "[great promise] [benefit 1] [benefit 2]"
337
+ 5. "[benefit 1] [benefit 2] [great promise]"
338
+ 6. "[benefit 1] + question + [benefit 2] + [great promise]"
339
+ 7. "question + [benefit 1] + [benefit 2] + [great promise]"
340
+ 8. "[benefit 1] + while + [benefit 2] + and also + [great promise]"
341
+ 9. "Not only + [benefit 1] + but also + [benefit 2] + and best of all + [great promise]"
342
+ 10. "Imagine + [benefit 1] + at the same time as + [benefit 2] + and finally + [great promise]"
343
+ 11. "From + [benefit 1] + going through + [benefit 2] + until + [great promise]"
344
+ 12. "First + [benefit 1] + then + [benefit 2] + and at the end + [great promise]"
345
+ 13. "Start with + [benefit 1] + transform with + [benefit 2] + culminate with + [great promise]"
346
+ 14. "Tired of the opposite of [benefit 1]? + Discover + [benefit 2] + and achieve + [great promise]"
347
+ 15. "Finally + [benefit 1] + plus + [benefit 2] + and as a bonus + [great promise]"
348
+
349
+ EXAMPLES FOR FORMULA 5:
350
+ • Reduce tu estrés laboral en un 42% mientras aumentas tu productividad un 37% y transforma tu carrera profesional con nuestro sistema de gestión del tiempo basado en neurociencia aplicada.
351
+
352
+ • Domina 5 idiomas extranjeros mientras duermes 8 horas ininterrumpidas y activa el 89% de tu potencial cerebral con nuestro revolucionario programa de aprendizaje durante el sueño profundo.
353
+
354
+ • No solo eliminarás el dolor de espalda crónico en 14 días sino que también fortalecerás tu core un 78% y lo mejor de todo es que recuperarás la capacidad de disfrutar actividades que creías imposibles.
355
+
356
+ • ¿Cansado de perder tiempo en reuniones improductivas? Descubre cómo reducir tu jornada laboral 3 horas diarias y consigue resultados un 65% superiores con nuestro framework de productividad cuántica.
357
+
358
+ • Imagina generar 10 ideas innovadoras por día al mismo tiempo que reduces tu estrés un 47% y finalmente te conviertes en el referente creativo de tu industria con nuestro método de pensamiento lateral estructurado.
359
+
360
+ Remember to choose just ONE formula and apply it consistently to all 5 bullets.
361
+ """
362
+
363
+ # Combine base instruction with formula instructions
364
+ complete_instruction = base_instruction + input_information + formula_instructions
365
+
366
+ return complete_instruction
367
+
368
+
369
+ def get_random_bullet_formula():
370
+ """
371
+ Randomly selects a bullet formula type to ensure variety in generated bullets.
372
+ Extracts formula names automatically from the instruction text.
373
+
374
+ Returns:
375
+ str: The name of the randomly selected formula
376
+ """
377
+ # Get the full instruction text
378
+ full_instruction = create_bullet_instruction()
379
+
380
+ # Extract formula names using regex pattern matching
381
+ import re
382
+
383
+ # Pattern to find formula names (looks for "FORMULA X - NAME:")
384
+ formula_pattern = r"FORMULA\s+\d+\s+-\s+([^:]+):"
385
+
386
+ # Find all matches in the instruction text
387
+ formula_matches = re.findall(formula_pattern, full_instruction)
388
+
389
+ # If no formulas found, fallback to manual list
390
+ if not formula_matches:
391
+ formulas = [
392
+ "STANDARD BENEFIT",
393
+ "3 EN 1 (FEATURE + BENEFIT + MEANING)",
394
+ "ANTI-PROCRASTINACIÓN (ACTION + RESULT + TIME)",
395
+ "NÚMERICA SUPREMA",
396
+ "EL TRIÁNGULO DE ORO"
397
+ ]
398
+ else:
399
+ formulas = formula_matches
400
+
401
+ # Select a random formula
402
+ selected_formula = random.choice(formulas)
403
+
404
+ return selected_formula
405
+
406
+
407
+ def create_bullet_instruction_with_formula(avatar_description=None, product_name=None, uploaded_content=None):
408
+ """
409
+ Creates the instruction for generating benefit bullets with a specific
410
+ randomly selected formula to ensure consistency.
411
+
412
+ Args:
413
+ avatar_description: Description of the target audience
414
+ product_name: Name of the product or service
415
+ uploaded_content: Content from uploaded files (if any)
416
+
417
+ Returns:
418
+ str: The complete instruction for generating bullets with the selected formula
419
+ """
420
+ # Check if any information is provided
421
+ if not avatar_description and not product_name and not uploaded_content:
422
+ return """
423
+ ADVERTENCIA: No se ha proporcionado ninguna información para generar los bullets.
424
+
425
+ Para obtener bullets más efectivos y personalizados, por favor proporciona al menos uno de los siguientes:
426
+ - Descripción del público objetivo (avatar)
427
+ - Nombre del producto o servicio
428
+ - Contenido adicional relevante
429
+
430
+ Sin esta información, los bullets generados serán genéricos y posiblemente menos efectivos para tu oferta específica.
431
+ """
432
+
433
+ # Get base instruction
434
+ base_instruction = create_bullet_instruction(
435
+ avatar_description=avatar_description,
436
+ product_name=product_name,
437
+ uploaded_content=uploaded_content
438
+ )
439
+
440
+ # Get a random formula
441
+ selected_formula = get_random_bullet_formula()
442
+
443
+ # Add specific instruction to use the selected formula
444
+ formula_directive = f"""
445
+
446
+ IMPORTANT OVERRIDE: For this specific task, you MUST use FORMULA {selected_formula}
447
+ for ALL 5 bullets. Do not choose randomly - you must use this exact formula consistently.
448
+ """
449
+
450
+ # Combine instructions
451
+ complete_instruction = base_instruction + formula_directive
452
+
453
  return complete_instruction