CoolFace
Apppublic

JeCabrera/Perfect_Webinar_FrameWork

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes
generator.py579 linesDownload Raw Back to bullets
1import random2 3def create_bullet_instruction(product_service=None, uploaded_content=None, target_audience=None, skills=None, selected_formula_name=None):4    """5    Creates the instruction for generating benefit bullets.6    The model will randomly choose between different bullet formulas.7    8    Args:9        target_audience: Description of the target audience10        product_service: Kind of product or service11        uploaded_content: Content from uploaded files (if any)12        skills: User's skills and expertise13        selected_formula_name: Name of the formula selected for the main offer14    15    Returns:16        str: The complete instruction for generating bullets17    """18    # Base instruction that applies to all formulas19    # Modify the FORMAT RULES section in the base_instruction20    # Modify the introduction options for bullets21    base_instruction = """22    IMPORTANT: After creating the main offer, add a section with 5 powerful benefit bullets that reinforce the promise.23    24    Start the bullets section with one of these creative introductions and a space before the first bullet:25    26    "**5 Cambios poderosos que notorás:**" or27    "**Lo que descurirás en este viaje:**" or28    "**Tu nueva realidad incluye:**"29    30    For the benefit bullets section:31    32    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.33    34    OBJECTIVE:35    - Generate 5 convincing and specific benefit bullets in Spanish36    - Connect emotionally with the audience37    - Address real desires, problems, and motivations38    - Maintain natural and conversational language39    - Orient each benefit towards action40    41    FORMAT RULES (CRITICAL - MUST FOLLOW EXACTLY):42    - Start the section with "**BENEFICIOS:**" in bold43    - Each benefit must start with "• " (bullet point followed by a space)44    - The first verb or action phrase of each bullet must be in bold using "**bold text**"45    - One benefit per line with exactly one empty line between bullets46    - Never include colons (:) in bullets47    - Never use exclamation marks (!) in any bullet48    - Each benefit must be a complete and concise phrase49    - Do not use any emojis in the bullets50    - Use natural, conversational language51    - ALL bullets must follow exactly the same formatting pattern52    - The spacing between bullets must be exactly the same (one empty line)53    54    EXAMPLE FORMAT:55    **BENEFICIOS:**56    57    • **Participa con confianza** en reuniones internacionales y expresa tus ideas con fluidez en tan solo 4 semanas, sin depender de traductores.58    59    • **Supera el miedo** a cometer errores y proyecta una imagen profesional y segura al comunicarte en inglés, gracias a nuestras sesiones de práctica intensiva.60    61    • **Accede a oportunidades** de ascenso y aumenta tu salario hasta en un 30% al dominar el inglés para negocios, respaldado por nuestra garantía de resultados.62    63    AVATAR ANALYSIS INSTRUCTIONS:64    65    STEP 1: ANALYZE THE AVATAR DEEPLY66    - Identify their specific pains, fears, objections, limiting beliefs, and problems67    - Look for emotional triggers that might prevent them from taking action68    - Determine what keeps them awake at night regarding this problem69    - Identify what they've tried before that hasn't worked70    - Understand their timeline expectations and what might make them hesitate71    - EXTRACT SPECIFIC DETAILS from the avatar description AND uploaded content72    73    STEP 2: IDENTIFY CORE PROBLEMS AND DESIRES74    - List the 5 most pressing problems this avatar faces75    - Determine which problems are most urgent vs. most important76    - Identify the emotional impact of each problem on their daily life77    - Discover what they truly desire as the ultimate outcome78    - Understand what specific results would make them feel successful79    80    STEP 3: MAP SOLUTIONS TO PROBLEMS81    - For each core problem, identify a specific solution your product/service provides82    - Determine exactly how your solution addresses their pain points83    - Calculate specific metrics that demonstrate the effectiveness of each solution84    - Identify the timeframe in which they can expect results85    - Connect each solution to their emotional desires and aspirations86    87    STEP 4: CREATE BENEFIT BULLETS THAT TRANSFORM PROBLEMS INTO RESULTS88    - Craft each bullet to directly address one specific problem identified89    - Include exact numbers, percentages, or timeframes for measurable outcomes90    - Incorporate emotional triggers that resonate with their deepest desires91    - Add proof elements that overcome their specific objections92    - Ensure each bullet provides a clear, tangible solution they can visualize93    94    FORMAT RULES:95    - Each benefit must start with "• " (bullet point followed by a space)96    - Make the first part of each bullet (main concept) in bold using "**bold text**" format97    - One benefit per line98    - Add exactly 1.2em of spacing between bullets (add an empty line between each bullet)99    - No explanations or categories100    - Never include : symbols in bullets101    - Never use exclamation marks (!) in any bullet102    - Each benefit must be a complete and concise phrase103    - Do not use any emojis in the bullets104    - Use natural, conversational language (avoid formal or technical jargon)105    - Maintain consistent formatting across all bullets106    107    EXAMPLE FORMAT:108    • **Desbloquea tu fluidez en inglés** y participa con confianza en reuniones de alto nivel desde la primera semana.109    110    • **Supera el miedo a cometer errores** y proyecta una imagen profesional y segura al comunicarte en inglés.111    112    IMPORTANT:113    - Each benefit must be ultra-specific with concrete, measurable outcomes114    - NEVER use generic phrases like "mejorar tu vida" or "aumentar tu productividad"115    - Always include specific numbers, percentages, or exact timeframes116    - Each bullet must solve a very specific problem with a detailed solution117    - Include at least one bullet that directly counters a common objection with evidence118    - Each bullet should contain a clear call to action with a specific next step119    - Avoid all generalizations - be precise about exactly what the user will get120    - Maintain a persuasive but honest tone with verifiable claims121    - Focus on tangible and measurable results that can be verified122    - Ensure each bullet addresses a different aspect of the offer123    - Write in a natural, conversational tone as if speaking directly to the reader124    - Never use exclamation marks in the bullets125    """126    127    # Add guidance based on available information128    guidance = ""129    130    # Check different combinations of available information131    if not target_audience and not product_service and not uploaded_content:132        return """133        ADVERTENCIA: No se ha proporcionado ninguna información para generar los bullets.134        135        Para obtener bullets más efectivos y personalizados, por favor proporciona al menos uno de los siguientes:136        - Descripción del público objetivo (avatar)137        - Nombre del producto o servicio138        - Contenido adicional relevante139        140        Sin esta información, los bullets generados serán genéricos y posiblemente menos efectivos para tu oferta específica.141        """142    elif not target_audience and not product_service and uploaded_content:143        # Only uploaded content provided144        guidance = """145        NOTA IMPORTANTE: Solo se ha proporcionado contenido adicional sin detalles específicos del público objetivo o producto.146        Analiza cuidadosamente el contenido subido para:147        - Identificar el público objetivo probable a partir del contexto148        - Determinar el producto/servicio que probablemente se está ofreciendo149        - Extraer puntos de dolor, objeciones y necesidades mencionadas en el contenido150        - Crear beneficios que aborden específicamente los problemas identificados en el contenido151        """152    elif target_audience and not product_service and not uploaded_content:153        # Only avatar description provided154        guidance = """155        NOTA IMPORTANTE: Solo se ha proporcionado información del público objetivo, sin detalles del producto ni contenido adicional.156        Enfócate en crear beneficios que:157        - Aborden los puntos de dolor específicos mencionados en la descripción del avatar158        - Resuelvan las objeciones comunes que este público suele tener159        - Proporcionen soluciones a los problemas específicos de este público160        - Conecten emocionalmente con las motivaciones de este avatar161        """162    elif product_service and not target_audience and not uploaded_content:163        # Only product name provided164        guidance = """165        NOTA IMPORTANTE: Solo se ha proporcionado información del producto, sin detalles del público objetivo ni contenido adicional.166        Enfócate en crear beneficios que:167        - Destaquen las características únicas de este producto específico168        - Aborden objeciones comunes relacionadas con este tipo de producto169        - Muestren resultados medibles que este producto puede proporcionar170        - Diferencien este producto de alternativas genéricas171        """172    elif target_audience and product_service and not uploaded_content:173        # Avatar and product provided, no uploaded content174        guidance = """175        NOTA IMPORTANTE: Se ha proporcionado información tanto del público objetivo como del producto, pero no hay contenido adicional.176        Crea beneficios altamente dirigidos que:177        - Conecten las características específicas del producto con las necesidades del avatar178        - Aborden las objeciones más probables que este público tendría sobre este producto179        - Muestren cómo este producto específico resuelve los problemas concretos de este avatar180        - Destaquen los resultados medibles que este público específico obtendrá con este producto181        """182    elif target_audience and uploaded_content and not product_service:183        # Avatar and uploaded content provided, no product184        guidance = """185        NOTA IMPORTANTE: Se ha proporcionado información del público objetivo y contenido adicional, pero no hay detalles específicos del producto.186        Analiza ambas fuentes para:187        - Inferir el producto/servicio probable del contexto188        - Identificar puntos de dolor específicos mencionados tanto en la descripción del avatar como en el contenido subido189        - Crear beneficios que aborden las necesidades y objeciones más prominentes190        - Asegurar que los beneficios sean relevantes tanto para el avatar como para el contexto del contenido191        """192    elif product_service and uploaded_content and not target_audience:193        # Product and uploaded content provided, no avatar194        guidance = """195        NOTA IMPORTANTE: Se ha proporcionado información del producto y contenido adicional, pero no hay detalles del público objetivo.196        Analiza ambas fuentes para:197        - Inferir el público objetivo probable del contexto198        - Identificar cómo el producto aborda las necesidades mencionadas en el contenido subido199        - Crear beneficios que destaquen cómo el producto resuelve problemas específicos mencionados en el contenido200        - Enfocarte en resultados medibles que el producto puede proporcionar según el contexto201        """202    elif target_audience and product_service and uploaded_content:203        # All information provided204        guidance = """205        NOTA IMPORTANTE: Se ha proporcionado información completa sobre el público objetivo, producto y contenido adicional.206        Utiliza todas las fuentes para:207        - Crear beneficios ultra-específicos que conecten perfectamente el producto con las necesidades del avatar208        - Extraer detalles concretos del contenido subido para hacer los beneficios más relevantes y personalizados209        - Abordar objeciones específicas mencionadas en cualquiera de las fuentes210        - Crear beneficios que destaquen exactamente cómo este producto resuelve los problemas concretos de este avatar211        """212    213    # Add information about available inputs214    input_information = f"""215    216    AVAILABLE INFORMATION FOR ANALYSIS:217    218    1. TARGET AUDIENCE DESCRIPTION:219    {target_audience if target_audience else "No specific target audience provided."}220    221    2. PRODUCT/SERVICE NAME:222    {product_service if product_service else "No specific product or service provided."}223    224    3. UPLOADED CONTENT:225    {uploaded_content if uploaded_content else "No additional content uploaded."}226    227    4. SKILLS AND EXPERTISE:228    {skills if skills else "No specific skills provided."}229    230    {guidance}231    232    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.233    """234    235    # Rest of the function remains the same...236    # Multiple formula instructions (unchanged)237    # Add this as a new formula option in the formula_instructions section238    formula_instructions = """239    IMPORTANT: Choose ONE of the following bullet formulas at random and use it consistently for ALL 5 bullets:240    241    FORMULA 1 - STANDARD BENEFIT:242    - Must be relevant to a specific segment of your target audience243    - Must show a specific result with exact numbers or percentages244    - Must include a precise emotional element tied to a specific desire245    - Must eliminate a specific objection with evidence246    - Must inspire immediate action with a clear next step247    248    EXAMPLE FORMAT FOR FORMULA 1:249    •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.250    251    FORMULA 2 - 3 EN 1 (FEATURE + BENEFIT + MEANING):252    Formula: [Feature + Benefit + Meaning]253    254    This formula creates an instant connection by linking three key elements:255    1. Feature: A specific, tangible characteristic of your offer256    2. Benefit: The exact, measurable result it delivers257    3. Meaning: The precise transformation in their life258    259    Instructions for Creating Connection Bullets:260    1. Identify Your Core Feature:261       - What specific component makes your offer unique?262       - What exact characteristic can be measured?263       - What concrete element can they use immediately?264       265    2. Transform into Benefits:266       - What specific metric will improve?267       - What exact problem will it solve?268       - What measurable outcome will they achieve?269       270    3. Add Deeper Meaning:271       - How exactly will it transform their specific situation?272       - What precise emotional impact will they experience?273       - What concrete identity shift will occur?274    275    Structure Formats:276    1. "[Specific Feature] para que puedas [Measurable Benefit] con lo que [Concrete Meaning]"277    2. "Con [Specific Feature] podrás [Measurable Benefit] permitiéndote [Concrete Meaning]"278    3. "Gracias a [Specific Feature] lograrás [Measurable Benefit] haciendo que [Concrete Meaning]"279    4. "Mediante [Specific Feature] conseguirás [Measurable Benefit] lo que significa [Concrete Meaning]"280    5. "Usando [Specific Feature] alcanzarás [Measurable Benefit] transformando [Concrete Meaning]"281    282    EXAMPLES FOR FORMULA 2:283    • 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.284    285    • 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.286    287    • 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.288    289    • 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.290    291    • 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.292    293    FORMULA 3 - ANTI-PROCRASTINACIÓN (ACTION + RESULT + TIME):294    Formula: [Action + Result + Time]295    296    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.297 298    Instructions:299    1. Establish the clear action that the user must take (specific action with details)300    2. Define the exact result with numbers/percentages that the user will obtain301    3. Indicate the precise time period with exact days/weeks/months302    303    Response Format (choose one for each bullet):304    1. Action + Result + Time305    2. Action + Time + Result306    3. Result + Action + Time307    4. Result + Time + Action308    5. Time + Action + Result309    6. Time + Result + Action310    7. Result + Time + Action311    312    EXAMPLES FOR FORMULA 3:313    • 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.314    315    • 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.316    317    • 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.318    319    • 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.320    321    • 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.322    323    FORMULA 4 - NÚMERICA SUPREMA:324    La Fórmula Suprema de Istvanova combina 5 elementos clave más artículos plurales para crear bullets persuasivos e interesantes:325 326    1. Artículos Plurales (Art):327       - Los (para masculino plural)328       - Las (para femenino plural)329       - Dan naturalidad y autoridad al texto330 331    2. Números (N):332       - Específicos y creíbles (3, 5, 7, 10...)333       - Crean estructura y expectativas claras334       - Se combinan con artículos: "Los 5...", "Las 3..."335 336    3. Adjetivo (A):337       - Emocionales y descriptivos338       - Conectan con deseos/miedos específicos339       - Ejemplos: comprobados, científicos, revolucionarios340 341    4. Palabra Clave (P):342       - Término central del beneficio en plural343       - Fácil de entender y recordar344       - Ejemplos: métodos, estrategias, técnicas, secretos345 346    5. Razón (R):347       - Justifica el beneficio con datos concretos348       - Añade credibilidad con evidencia específica349       - Conecta con la motivación específica del lector350 351    6. Promesa (P):352       - Resultado específico y medible con números353       - Timeframe realista con días/semanas exactas354       - Beneficio final atractivo y verificable355    356    EXAMPLES FOR FORMULA 4:357    • Los 3 rituales científicamente probados para reducir tu estrés un 47% en 14 días, validados por la Universidad de Stanford.358    359    • Las 5 rutinas efectivas para fortalecer tu core en solo 12 minutos diarios, eliminando el dolor lumbar en el 89% de los casos.360    361    • Las 7 hábitos esenciales para aumentar tu productividad un 63%, permitiéndote completar en 4 horas lo que antes hacías en 8.362    363    • Las 3 técnicas comprobadas para dormir 7 horas ininterrumpidas basadas en neurociencia, que han ayudado a 1,243 personas con insomnio crónico.364    365    • Los 5 movimientos efectivos para fortalecer tu core sin equipamiento, que activan un 78% más de fibras musculares que los ejercicios tradicionales.366    367    FORMULA 5 - EL TRIÁNGULO DE ORO:368    Formula: [Benefit 1 + Benefit 2 + Great Promise]369    370    This formula creates high-impact bullets by combining three key benefits persuasively:371    1. Benefit 1: The first benefit that addresses an immediate client need372    2. Benefit 2: An additional benefit that generates more value373    3. Great Promise: The main or most impactful promise that closes the proposal374    375    Instructions for Creating Powerful Bullets:376    1. Identify Your Audience's Great Dream:377       - What's their ultimate aspiration?378       - What keeps them awake at night?379       - What's their ideal scenario?380       - What transformation do they deeply desire?381 382    2. Structure Your Benefits:383       - Write in a natural, conversational tone (like talking to a friend)384       - Flow elements together without forced pauses or commas385       - Make transitions smooth and invisible386       - Keep the rhythm flowing from start to finish387 388    3. Craft Your Benefits:389       - Benefit 1: Hook them with their biggest pain point using casual language390       - Benefit 2: Build momentum with an exciting complementary gain391       - Great Promise: Deliver the knockout punch that makes them say "I need this!"392 393    4. Tips for Maximum Impact:394       - Write like you speak (but better)395       - Avoid formal language or stiff transitions396       - Make each element flow naturally into the next397       - Create a rhythm that pulls the reader through398       - Use conversational connectors instead of commas399       - Read it aloud - if you stumble, rewrite it400       - Make it so engaging they can't stop reading401       - Keep the energy high from start to finish402    403    Structure Formats:404    1. "[benefit 1] [benefit 2] [great promise]"405    2. "[benefit 2] [benefit 1] [great promise]"406    3. "[great promise] [benefit 2] [benefit 1]"407    4. "[great promise] [benefit 1] [benefit 2]"408    5. "[benefit 1] [benefit 2] [great promise]"409    6. "[benefit 1] + question + [benefit 2] + [great promise]"410    7. "question + [benefit 1] + [benefit 2] + [great promise]"411    8. "[benefit 1] + while + [benefit 2] + and also + [great promise]"412    9. "Not only + [benefit 1] + but also + [benefit 2] + and best of all + [great promise]"413    10. "Imagine + [benefit 1] + at the same time as + [benefit 2] + and finally + [great promise]"414    11. "From + [benefit 1] + going through + [benefit 2] + until + [great promise]"415    12. "First + [benefit 1] + then + [benefit 2] + and at the end + [great promise]"416    13. "Start with + [benefit 1] + transform with + [benefit 2] + culminate with + [great promise]"417    14. "Tired of the opposite of [benefit 1]? + Discover + [benefit 2] + and achieve + [great promise]"418    15. "Finally + [benefit 1] + plus + [benefit 2] + and as a bonus + [great promise]"419    420    EXAMPLES FOR FORMULA 5:421    • 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.422    423    • 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.424    425    • 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.426    427    • ¿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.428    429    • 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.430    431    Remember to choose just ONE formula and apply it consistently to all 5 bullets.432   433   ORMULA 6 - PERSUASIÓN PROGRESIVA (DOLOR + BENEFICIO + CURIOSIDAD + CONTRASTE + ACCIÓN):434    Esta fórmula crea bullets altamente persuasivos siguiendo una estructura psicológica de 5 pasos:435    436    1. Dolor/Problema Específico:437       - Comienza identificando un dolor o problema concreto del avatar438       - Puede formularse como pregunta o afirmación directa439       - Debe tocar un punto emocional específico y reconocible440       - Ejemplos de inicio: "¿Cansado de...", "Si has intentado...", "Cuando te enfrentas a..."441    442    2. Beneficio Tangible:443       - Presenta la solución de forma concreta y medible444       - Incluye números específicos cuando sea posible (porcentajes, días, resultados)445       - Muestra la transformación de forma visual y palpable446       - Conecta directamente con el problema mencionado447    448    3. Elemento de Curiosidad:449       - Añade un giro inesperado o sorprendente450       - Utiliza frases que generen intriga451       - Menciona un método poco conocido o contraintuitivo452       - Ejemplos: "el truco que nadie te ha contado", "la técnica contraintuitiva que..."453    454    4. Eliminación de Objeciones:455       - Anticipa y neutraliza resistencias comunes456       - Muestra cómo se logra el resultado sin los obstáculos temidos457       - Utiliza contrastes: "sin necesidad de...", "aunque nunca antes hayas..."458       - Elimina la fricción mental para la acción459    460    5. Llamada a la Acción/Urgencia:461       - Cierra con un elemento de acción inmediata462       - Usa verbos en presente o imperativo463       - Añade un elemento de tiempo para crear urgencia464       - Conecta la acción con un resultado rápido y visible465    466    Estructura Flexible:467    - No es necesario seguir el orden exacto de los 5 elementos468    - Asegúrate de incluir al menos 4 de los 5 elementos en cada bullet469    - Adapta la estructura según el tipo de producto/servicio470    - Mantén un tono conversacional y fluido entre los elementos471    472    EXAMPLES FOR FORMULA 6:473    • ¿Te bloqueas al hablar en público y ves cómo tu negocio pierde oportunidades? Descubre la técnica de 3 pasos que te hará comunicar con autoridad en 14 días, usando el mismo truco mental que los mejores conferencistas aplican antes de subir al escenario, sin memorizar discursos ni sonar como un robot.474    475    • Transforma tu metabolismo lento en una máquina quemagrasa con nuestro protocolo de 8 minutos diarios que activa un 64% más de células musculares que el ejercicio tradicional, gracias al descubrimiento científico que contradice todo lo que creías sobre perder peso, incluso si tienes más de 40 años y has fracasado con todas las dietas anteriores.476    477    • Cuando tu negocio se estanca en los mismos números mes tras mes, necesitas el sistema de escalabilidad en 3 fases que ha permitido a 1,247 emprendedores duplicar sus ingresos en 90 días, aplicando la estrategia contraintuitiva de reducir servicios en lugar de añadirlos, sin contratar personal adicional ni trabajar más horas que ahora.478    479    • Si tus campañas de email marketing generan menos del 2% de conversión, implementa nuestra fórmula de asuntos irresistibles que aumenta la tasa de apertura un 47% desde el primer envío, utilizando el principio psicológico que las grandes marcas ocultan a propósito, sin necesidad de tener una lista grande ni conocimientos técnicos avanzados.480    481    • ¿Frustrado porque tu contenido en redes sociales no genera clientes reales? Aplica hoy mismo nuestro framework de contenido estratégico que convierte seguidores en compradores en un ciclo de 21 días, mediante la técnica del "puente de valor" que pocos conocen pero todos los influencers rentables utilizan, aunque nunca antes hayas vendido nada a través de tus redes.482    """483    484    # Combine base instruction with formula instructions485    complete_instruction = base_instruction + input_information + formula_instructions486    487    return complete_instruction488 489 490def get_random_bullet_formula():491    """492    Randomly selects a bullet formula type to ensure variety in generated bullets.493    Extracts formula names automatically from the instruction text.494    495    Returns:496        str: The name of the randomly selected formula497    """498    # Get the full instruction text499    full_instruction = create_bullet_instruction()500    501    # Extract formula names using regex pattern matching502    import re503    504    # Pattern to find formula names (looks for "FORMULA X - NAME:")505    formula_pattern = r"FORMULA\s+\d+\s+-\s+([^:]+):"506    507    # Find all matches in the instruction text508    formula_matches = re.findall(formula_pattern, full_instruction)509    510    # If no formulas found, fallback to manual list511    if not formula_matches:512        formulas = [513            "STANDARD BENEFIT",514            "3 EN 1 (FEATURE + BENEFIT + MEANING)",515            "ANTI-PROCRASTINACIÓN (ACTION + RESULT + TIME)",516            "NÚMERICA SUPREMA",517            "EL TRIÁNGULO DE ORO"518        ]519    else:520        formulas = formula_matches521    522    # Select a random formula523    selected_formula = random.choice(formulas)524    525    return selected_formula526 527 528def create_bullet_instruction_with_formula(target_audience=None, product_service=None, uploaded_content=None, skills=None, selected_formula_name=None):529    """530    Creates the instruction for generating benefit bullets with a specific531    randomly selected formula to ensure consistency.532    533    Args:534        target_audience: Description of the target audience535        product_service: Name of the product or service536        uploaded_content: Content from uploaded files (if any)537        skills: User's skills and expertise538        selected_formula_name: Name of the formula selected for the main offer539    540    Returns:541        str: The complete instruction for generating bullets with the selected formula542    """543    # Check if any information is provided544    if not target_audience and not product_service and not uploaded_content and not skills:545        return """546        ADVERTENCIA: No se ha proporcionado ninguna información para generar los bullets.547        548        Para obtener bullets más efectivos y personalizados, por favor proporciona al menos uno de los siguientes:549        - Descripción del público objetivo (avatar)550        - Nombre del producto o servicio551        - Contenido adicional relevante552        - Habilidades y experiencia553        554        Sin esta información, los bullets generados serán genéricos y posiblemente menos efectivos para tu oferta específica.555        """556    557    # Get base instruction558    base_instruction = create_bullet_instruction(559        target_audience=target_audience,560        product_service=product_service,561        uploaded_content=uploaded_content,562        skills=skills,563        selected_formula_name=selected_formula_name  # Pass the formula name564    )565    566    # Get a random formula567    selected_bullet_formula = get_random_bullet_formula()568    569    # Add specific instruction to use the selected formula570    formula_directive = f"""571    572    IMPORTANT OVERRIDE: For this specific task, you MUST use FORMULA {selected_bullet_formula} 573    for ALL 5 bullets. Do not choose randomly - you must use this exact formula consistently.574    """575    576    # Combine instructions577    complete_instruction = base_instruction + formula_directive578    579    return complete_instruction