Spaces:
Running
Running
from format.format import buyer_persona_formats, what_we_really_want, validation_questions | |
def get_system_prompt(): | |
""" | |
Retorna el prompt principal del sistema con instrucciones para crear perfiles de cliente ideal | |
""" | |
return """You are an expert in creating ideal customer profiles, and your task is to help me create the perfect avatar for my product or service. You need to identify the customer who is attracted to my skills or the product/service I offer. This customer should be willing to invest in what I offer, keeping in mind their problems, frustrations, and desires. | |
STEPS TO COMPLETE THE TASK: | |
1. **Determine the customer profile and their problems:** | |
- First, understand who your ideal customer is through demographic data (age, gender, education, occupation, location) and psychographic information (values, beliefs, aspirations). | |
- Identify what interests, hobbies, and activities they enjoy that relate to your product/service. | |
- Determine what skills or interests you share with them that create a connection beyond the product itself. | |
- Focus on **urgent** and specific problems that your product/service can solve for this customer. | |
- The problem is what drives the purchase; identifying it will help niche the offer. | |
2. **Analyze their needs and decision-making process:** | |
- Identify the **symptoms** that indicate the customer is facing the problem. | |
- Understand their challenges and frustrations that make them seek your solution. | |
- Determine what benefits they see in your offering and why your specific approach resonates with them. | |
- Analyze their purchasing power and price sensitivity: How much can they spend? Are they willing to pay premium prices? | |
- Examine how they make buying decisions: Do they research extensively? Are they influenced by reviews or recommendations? | |
3. **Create a comprehensive buyer persona:** | |
- Use the information gathered from the previous steps to create a **detailed profile of the ideal customer**. | |
- Include their motivations for buying and what they value most (price, quality, effectiveness, convenience). | |
- Here are the points to follow: | |
**[VARIABLES]** | |
**Problems:** | |
[Copy and paste the problem you are solving, usually the painful one] | |
**[INSTRUCTION]** | |
Create a buyer persona in the following format. | |
Write the personality type (using their initials) from the 12 archetypes of Carlos Gustav Jung, what they value, what excites them, how they are, their fears, insecurities, guilt, frustrations, and problems, where they can be found, what they are willing to invest in, their interests, their desires, and what they really want. | |
**IMPORTANT:** | |
If there is a variable in **[VARIABLES]**, replace it in the format. | |
Base your answers on real-life situations that the avatar would experience in their daily life. | |
Use a natural, conversational language that feels authentic and relatable. | |
Give the reasons why they want what they want. Use **[WHAT WE REALLY WANT]** to answer that section. | |
Use Markdown formatting for the presentation. | |
THE ENTIRE RESPONSE MUST BE IN SPANISH, especially the section "Lo que realmente quiere". | |
For the section "Lo que realmente quiere" (What they really want), identify and focus on THE SINGLE MOST IMPORTANT underlying desire that drives this avatar. Choose only one element from [WHAT WE REALLY WANT] that best connects with their fears, obstacles, and aspirations. Develop this single desire in depth, explaining specifically how it manifests in their life, why it's so important to them, and how it relates to their personal circumstances mentioned in previous sections. Be detailed and specific about how this core desire influences their decisions and behaviors. | |
This prompt ensures the ideal customer aligns with your interests and skills and will be a good prospect for your products/services.""" | |
def create_instruction(product_service, skills, target_audience=None, gender=None, consciousness_level="Ninguno"): | |
""" | |
Crea instrucciones personalizadas para generar un perfil de cliente ideal | |
Args: | |
product_service (str): Descripción del producto o servicio | |
skills (str): Habilidades o competencias relevantes | |
target_audience (str, optional): Público objetivo específico | |
gender (str, optional): Género del avatar (hombre/mujer) | |
consciousness_level (str, optional): Nivel de conciencia del mercado | |
Returns: | |
str: Instrucciones completas para generar el perfil | |
""" | |
# Obtener los componentes del formato | |
format_template = buyer_persona_formats["base_format"] | |
example = buyer_persona_formats["example"] | |
what_we_want = what_we_really_want["format"] | |
validation = validation_questions["buyer_persona"] | |
# Obtener el prompt principal | |
system_prompt = get_system_prompt() | |
# Preparar la información del público objetivo si se proporciona | |
target_audience_info = "" | |
if target_audience: | |
target_audience_info = f"\n\nEl público objetivo específico es: {target_audience}. Asegúrate de que el perfil del cliente ideal se alinee con este público objetivo." | |
# Definir el género si se especifica | |
gender_instruction = "" | |
if gender: | |
if gender.lower() in ["hombre", "masculino", "male"]: | |
gender_instruction = "\n\nCrea un perfil de cliente ideal masculino." | |
elif gender.lower() in ["mujer", "femenino", "female"]: | |
gender_instruction = "\n\nCrea un perfil de cliente ideal femenino." | |
else: | |
gender_instruction = "\n\nIMPORTANTE: Elige un solo género (hombre o mujer) para el perfil y mantén ESTRICTA concordancia de género en todo el texto. NO uses lenguaje inclusivo ni te refieras al cliente en plural. Mantén coherencia usando siempre el mismo género que hayas elegido." | |
# Instrucciones para el formato de listas | |
format_instruction = """ | |
\n\nIMPORTANT - LIST FORMAT: | |
For the sections of Fears, Insecurities, Guilt, Problems, and Frustrations, use BULLET POINTS (•) with PROPER PARAGRAPH BREAKS after each item. | |
Example: | |
Miedos: | |
• Miedo a quedarse atrás en el mercado por no dominar nuevas tecnologías. | |
• Temor a perder oportunidades de negocio por barreras de comunicación. | |
• Preocupación por no poder expandir su empresa internacionalmente. | |
The correct format is (note the empty line between each bullet point): | |
Culpa: | |
• Se siente culpable por no pasar suficiente tiempo con su hijo debido al trabajo. | |
• Siente remordimiento por no haber aprendido inglés antes y ahora tener que hacerlo a la fuerza. | |
• Experimenta culpa al gastar dinero en un curso de inglés en lugar de en otras necesidades de su hijo. | |
• Se siente mal por no poder ayudar a su hijo con sus tareas de inglés. | |
DO NOT use this incorrect format (without paragraph breaks): | |
Inseguridades: • Primera inseguridad • Segunda inseguridad • Tercera inseguridad | |
ALSO DO NOT use this incorrect format (without empty lines between items): | |
Problemas: | |
• Tiene dificultades para encontrar tiempo para estudiar inglés debido a su trabajo y responsabilidades familiares. | |
• Se siente abrumado por la cantidad de información y recursos disponibles para aprender inglés. | |
• Le resulta difícil concentrarse y mantenerse motivado para estudiar después de un largo día de trabajo. | |
ENSURE there is an EMPTY LINE between each bullet point to create proper paragraph separation. | |
DO NOT use hyphens (-) or numbers for these lists. | |
""" | |
# Añadir instrucciones sobre el nivel de conciencia del mercado | |
consciousness_instruction = "" | |
if consciousness_level and consciousness_level.lower() != "ninguno": | |
consciousness_descriptions = { | |
"desconocido": "El cliente NO SABE que tiene un problema. Su perfil debe reflejar que no es consciente de su necesidad, aunque experimenta síntomas. Sus frustraciones y problemas deben estar relacionados con los síntomas, NO con la solución. NO debe estar buscando activamente soluciones.", | |
"consciente del problema": "El cliente RECONOCE que tiene un problema pero NO SABE cómo resolverlo. Su perfil debe mostrar que está FRUSTRADO por el problema y está comenzando a buscar información. Sus miedos deben reflejar la urgencia del problema y las consecuencias de no resolverlo.", | |
"consciente de la solución": "El cliente SABE qué tipo de soluciones existen pero NO HA DECIDIDO cuál elegir. Su perfil debe mostrar que está COMPARANDO opciones y evaluando alternativas. Sus inseguridades deben estar relacionadas con tomar la decisión correcta.", | |
"consciente del producto": "El cliente CONOCE tu producto/servicio pero NO ESTÁ CONVENCIDO de comprarlo. Su perfil debe mostrar que está considerando seriamente tu oferta pero tiene DUDAS o OBJECIONES específicas. Sus miedos deben estar relacionados con si tu solución es realmente la mejor para él.", | |
"consciente de la compra": "El cliente ESTÁ LISTO para comprar pero necesita un INCENTIVO FINAL. Su perfil debe mostrar que está convencido del valor pero busca la mejor oferta o el momento adecuado. Sus frustraciones deben estar relacionadas con barreras para completar la compra." | |
} | |
level_key = consciousness_level.lower() | |
description = consciousness_descriptions.get(level_key, f"Nivel de conciencia: {consciousness_level}") | |
consciousness_instruction = f""" | |
\n\nIMPORTANT - CUSTOMER AWARENESS LEVEL: {consciousness_level.upper()} | |
{description} | |
This awareness level must COMPLETELY DETERMINE how the ideal customer thinks, feels, and acts. | |
ADAPT THE ENTIRE PROFILE (especially their fears, frustrations, problems, and insecurities) to | |
consistently reflect this level of awareness. | |
""" | |
# Modificar el formato para la sección "Lo que realmente quiere" | |
desire_format = """ | |
\n\nFor the section "Lo que realmente quiere", structure the response as follows: | |
**Lo que realmente quiere:** | |
**Su gran deseo profundo:** [Develop here in a paragraph the most important underlying desire that drives this person at a deep emotional level. This should be different from the surface-level desires listed in the "Deseos" section. Explain its emotional importance and how it connects with their fears and aspirations] | |
**Sus 7 motivaciones ocultas:** | |
1. [First hidden motivation] | |
2. [Second hidden motivation] | |
3. [Third hidden motivation] | |
4. [Fourth hidden motivation] | |
5. [Fifth hidden motivation] | |
6. [Sixth hidden motivation] | |
7. [Seventh hidden motivation] | |
IMPORTANT: The "Deseos" section should list what the person consciously wants and openly expresses. In contrast, "Lo que realmente quiere" should reveal the deeper psychological motivations that they may not even be fully aware of themselves. | |
Select these deeper motivations from the list provided in the reference, choosing those that best connect with the profile. | |
""" | |
# Construir las instrucciones completas | |
instructions = f""" | |
Crea un perfil de cliente ideal para el siguiente producto/servicio: | |
**Producto/Servicio:** {product_service} | |
**Mis habilidades/competencias:** {skills} | |
{target_audience_info} | |
{gender_instruction} | |
{format_instruction} | |
{consciousness_instruction} | |
{desire_format} | |
Utiliza el siguiente formato para crear el perfil: | |
{format_template} | |
Aquí tienes un ejemplo de cómo debería ser el perfil: | |
{example} | |
Para la sección "Lo que realmente quiere", utiliza esta lista como referencia: | |
{what_we_want} | |
{validation} | |
""" | |
return instructions |