File size: 18,046 Bytes
849a2df
4a53c7e
849a2df
bc7102d
 
 
9783c11
bc7102d
 
9053ddc
 
 
 
 
 
 
 
 
9783c11
 
9053ddc
 
 
 
 
 
 
9783c11
 
 
9053ddc
 
 
 
9783c11
 
9053ddc
 
 
 
 
 
 
 
 
377d493
9053ddc
 
377d493
 
9053ddc
 
cf4c876
e8eb78c
bc7102d
849a2df
bc7102d
9783c11
bc7102d
 
9783c11
 
 
 
 
afffb8f
bc7102d
 
9783c11
bc7102d
afffb8f
849a2df
afffb8f
 
 
 
 
 
 
 
 
849a2df
 
57be20f
 
 
 
 
 
e8eb78c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57be20f
 
 
e8eb78c
57be20f
e8eb78c
57be20f
bc7102d
 
849a2df
 
fcdacd3
 
 
 
 
 
 
9783c11
57be20f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bc7102d
26a011c
 
 
 
 
e5cbfe2
 
 
 
 
 
 
 
460708a
e5cbfe2
bc7102d
e70a84a
bc7102d
da1c40c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162d991
da1c40c
 
162d991
 
 
bff20c0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
da1c40c
bc7102d
 
849a2df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bc7102d
 
 
 
 
 
 
 
 
e964a3b
bc7102d
849a2df
88ffe2a
bc7102d
 
 
 
 
 
 
 
 
849a2df
bc7102d
 
e8eb78c
 
849a2df
 
e8eb78c
 
bc7102d
e70a84a
bc7102d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# Añade esta importación al inicio del archivo
from format.format import buyer_persona_formats, what_we_really_want, validation_questions, bullet_format_instructions
from format.jung_archetypes import jung_archetypes, get_all_archetype_names, get_archetype_description

def get_system_prompt():
    """
    Returns the main system prompt with instructions for creating ideal customer profiles
    """
    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.
   - Deeply explore their belief systems, mental frameworks, and how these shape their perception of their problems.
   - Investigate their daily routines, habits, and specific real-life situations where they experience their problems.

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?
   - Explore the emotional triggers that drive their purchasing decisions.
   - Uncover the subconscious thought patterns and limiting beliefs that might be preventing them from solving their problem.
   - Identify the specific moments in their daily life when they feel the most pain or frustration related to the problem.

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).
   - Develop a rich psychological profile that includes their core values, identity beliefs, and worldview.
   - Describe specific scenarios from their daily life that illustrate their struggles and desires.
   - 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."""

def create_instruction(product_service, skills, target_audience=None, gender=None, consciousness_level="Ninguno", format_type="junguiano_format"):
    """
    Creates customized instructions to generate an ideal customer profile
    
    Args:
        product_service (str): Description of the product or service
        skills (str): Relevant skills or competencies
        target_audience (str, optional): Specific target audience
        gender (str, optional): Gender of the avatar (male/female)
        consciousness_level (str, optional): Market awareness level
        format_type (str, optional): Type of format to use from buyer_persona_formats
        
    Returns:
        str: Complete instructions to generate the profile
    """
    # Obtener los componentes del formato dinámicamente
    format_template = buyer_persona_formats.get(format_type, buyer_persona_formats["junguiano_format"])
    
    # Intentar obtener el ejemplo correspondiente al formato seleccionado
    # Convención: si el formato es "x_format", buscar "x_example"
    format_base = format_type.split('_')[0] if '_' in format_type else format_type
    example_key = f"{format_base}_example"
    
    # Si no existe un ejemplo específico, usar el ejemplo predeterminado
    example = buyer_persona_formats.get(example_key, buyer_persona_formats["example"])
    
    # Solo incluir la sección "Lo que realmente quiere" para el formato junguiano
    if format_type == "junguiano_format":
        what_we_want = what_we_really_want["format"]
        what_we_want_instruction = """
        Give the reasons why they want what they want. Use **[WHAT WE REALLY WANT]** to answer that section.
        
        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.
        """
        # Solo incluir el formato de deseo para el formato base
        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.
"""
    else:
        what_we_want = ""
        what_we_want_instruction = """
        IMPORTANT: Do NOT include a "Lo que realmente quiere" section in this format. This format does not require this section.
        """
        desire_format = ""
    
    validation = validation_questions["buyer_persona"]
    
    # Solo incluir instrucciones de formato de viñetas para junguiano_format y busqueda_format
    if format_type in ["junguiano_format", "busqueda_format"]:
        format_instruction = bullet_format_instructions
    else:
        format_instruction = """
\n\nIMPORTANT - FORMAT INSTRUCTIONS:
Follow EXACTLY the format provided in the template. Do not add sections that are not in the template.
Do not include sections for Miedos, Inseguridades, Culpa, Problemas, or Frustraciones unless they are explicitly part of the format template.
"""
    
    # Obtener el prompt principal pero modificarlo según el formato
    system_prompt = get_system_prompt().replace(
        """Give the reasons why they want what they want. Use **[WHAT WE REALLY WANT]** to answer that section.
   
   **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.""",
        
        """**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.
   """ + what_we_want_instruction + """
   Use Markdown formatting for the presentation.
   THE ENTIRE RESPONSE MUST BE IN SPANISH."""
    )
    
    # 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."
    
    # 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.

CRITICAL: You MUST include a section titled "Nivel de conciencia" in your response with this exact format:
**Nivel de conciencia:** {consciousness_level} - [Brief explanation of how this awareness level manifests in their life]

Example:
**Nivel de conciencia:** Desconocido - No es consciente de que la falta de dominio del inglés está limitando sus oportunidades. Atribuye su estancamiento a otros factores, como la suerte o la política de la empresa.
"""
    else:
        # Default to "Desconocido" if no consciousness level is specified
        consciousness_instruction = """
\n\nIMPORTANT - CUSTOMER AWARENESS LEVEL: 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.

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.

CRITICAL: You MUST include a section titled "Nivel de conciencia" in your response with this exact format:
**Nivel de conciencia:** Desconocido - [Brief explanation of how this awareness level manifests in their life]

Example:
**Nivel de conciencia:** Desconocido - No es consciente de que la falta de dominio del inglés está limitando sus oportunidades. Atribuye su estancamiento a otros factores, como la suerte o la política de la empresa.
"""
    
    # Construir las instrucciones completas
    # Solo incluir instrucciones de arquetipos de Jung para junguiano_format
    jung_archetypes_instruction = ""
    if format_type == "junguiano_format":
        # Crear una referencia concisa de los arquetipos para incluir en las instrucciones
        archetype_names = get_all_archetype_names()
        jung_archetypes_instruction = """
\n\nIMPORTANT - JUNG ARCHETYPES REFERENCE:
Selecciona un arquetipo principal y uno secundario para el cliente ideal basándote en la siguiente información:

"""
        # Añadir descripción de cada arquetipo
        for key in jung_archetypes.keys():
            archetype = jung_archetypes[key]
            name = key.replace('_', ' ').title()
            jung_archetypes_instruction += f"""
**{name}**: {archetype['descripcion']}
- Motivaciones: {archetype['motivaciones']}
- Miedos: {archetype['miedos']}
- Debilidades: {archetype['debilidades']}
"""
        
        jung_archetypes_instruction += """
Para cada arquetipo seleccionado, explica:
- Cómo se manifiesta en su personalidad y comportamiento
- Qué lo motiva basado en este arquetipo
- Sus miedos e inseguridades relacionados con el arquetipo
- Los aspectos "sombra" (rasgos reprimidos) que pueden emerger bajo estrés

La "sombra" representa los aspectos reprimidos o negados de la personalidad según la teoría de Jung.
"""
    
    # Añadir la instrucción de arquetipos a 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}
{jung_archetypes_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}

{what_we_want if format_type == "junguiano_format" else ""}

{validation}
"""
    
    # Añadir instrucción explícita para formatos que no son junguiano_format
    if format_type != "junguiano_format":
        instructions += """
\n\nIMPORTANTE: Este formato NO debe incluir la sección "Lo que realmente quiere". Sigue estrictamente el formato proporcionado sin añadir secciones adicionales.
"""
    
    return instructions