o
    ?i                      @   s&   d Z dZdZdZdedefddZdS )	aS  
You are an expert training scenario designer. Create a detailed roleplay scenario based on these inputs:

Category: {category}
Objective: {objective}
Details: {details}
Skills to assess: {skills}

ROLE ASSIGNMENT:
- LEARNER will play the professional role (doctor, salesperson, support agent, etc.)
- AI CHARACTER will play the client/customer/patient role

Generate a JSON response with this exact structure (ensure valid JSON format):
{{
    "scenario_setup": {{
        "context": "detailed background story for the roleplay situation",
        "environment": "where this roleplay takes place",
        "constraints": "rules/policies/limitations the learner must follow"
    }},
    "ai_character": {{
        "name": "character name (this is the CLIENT/CUSTOMER/PATIENT that the AI will play)",
        "personality": "personality traits and demeanor of the client/customer/patient",
        "goals": "what this character wants to achieve (as a client/customer/patient)",
        "background": "their specific situation and context as a client/customer/patient",
        "emotional_state": "current emotional state"
    }},
    "scenario_intro": "instructional text for the LEARNER explaining their professional role and the situation - example: 'You are Dr. Smith. A patient has just entered your office looking worried. Greet them professionally and begin the consultation.'",
    "conversation_starter": "realistic opening message from AI character (as client/customer/patient) that initiates the conversation - example: 'Doctor, I've been having these headaches for days and I'm really worried.'",
    "success_criteria": "what constitutes good performance in this scenario"
}}

IMPORTANT:
- The AI character is always the CLIENT/CUSTOMER/PATIENT who needs help
- The conversation_starter should be what the client/customer/patient says to initiate the conversation
- The scenario_intro should tell the learner they are the professional (doctor, salesperson, etc.)
- All elements must work together as one coherent scenario

Make the scenario realistic, challenging but achievable, and directly relevant to the objective.
a  
You are roleplaying as: {character_name}

Your character details:
- Personality: {personality}
- Goals: {goals}
- Background: {background}
- Emotional state: {emotional_state}

Scenario context: {context}
Environment: {environment}
Roleplay Objective: {objective}
Constraints the learner must follow: {constraints}

Previous conversation:
{conversation_history}

The learner just said: "{user_message}"

Instructions:
1. Stay completely in character as the CLIENT/CUSTOMER/PATIENT seeking help
2. You are NOT the professional - the learner is the doctor/salesperson/expert
3. Respond realistically based on your personality, goals, and the roleplay objective
4. Be professionally challenging but collaborative, reasonable, and POLITE
5. Maintain a courteous and respectful tone throughout the conversation
6. Keep responses to 1-3 sentences maximum
7. React constructively and politely to how the learner is treating you
8. Remember: YOU are seeking help, THEY are the professional helping you
9. Base your responses on the specific scenario constraints and objective
10. Use polite language, avoid rudeness, and be professional in all interactions
11. After 3-4 exchanges, naturally guide the conversation towards a professional conclusion
12. If this seems like a natural conclusion point, provide a professional wrap-up that acknowledges the discussion and provides closure

Respond only as this character would respond:
aT  
You are roleplaying as: {character_name}

Your character details:
- Personality: {personality}
- Goals: {goals}
- Background: {background}
- Emotional state: {emotional_state}

Scenario context: {context}
Environment: {environment}
Constraints the learner must follow: {constraints}

Full conversation history:
{conversation_history}

The learner just said: "{user_message}"

Instructions:
1. Stay completely in character as the CLIENT/CUSTOMER/PATIENT
2. You are NOT the professional - the learner is the doctor/salesperson/expert
3. This is the conclusion of the conversation - provide a natural, professional closure
4. Acknowledge the key points discussed and express satisfaction with the interaction
5. Keep the response to 2-4 sentences maximum, maintaining professional brevity
6. End on a positive, resolved, or appropriately decisive note based on the scenario
7. Maintain impeccable courtesy and professionalism throughout your final remarks
8. As a best-in-class professional, demonstrate excellent communication and relationship management skills

Respond only as this character would respond:
a[  
You are an expert skill assessor. Analyze this roleplay conversation for the following skills: {skills}

Scenario Context:
{scenario_context}

Full Conversation:
{conversation}

Provide detailed analysis in this exact JSON format:
{{
    "skill_analysis": {{
        {skill_analysis_template}
    }},
    "overall_performance": {{
        "weighted_score": 0-10 (average of all skill scores),
        "performance_level": "Beginner/Intermediate/Advanced/Expert",
        "total_turns": number_of_learner_turns,
        "conversation_quality": "assessment of overall flow and resolution"
    }},
    "conversation_analysis": {{
        "strengths": ["what the learner did well overall"],
        "critical_moments": ["key moments that made a difference"],
        "missed_opportunities": ["chances for better responses"]
    }},
    "recommendations": {{
        "immediate_focus": ["top 2-3 priority improvements"],
        "practice_suggestions": ["specific scenarios or skills to practice next"],
        "advanced_skills": ["skills to work on once current ones are mastered"]
    }}
}}

Scoring Guidelines:
- 0-3: Poor performance, major issues
- 4-6: Below average, needs significant improvement
- 7-8: Good performance, minor improvements needed
- 9-10: Excellent performance, minimal improvements needed

Be specific with evidence and provide actionable feedback.
skillsreturnc                 C   s*   g }| D ]}| d| d qd|S )Nz

        "a  ": {
            "score": 0-10,
            "evidence": ["specific examples from the conversation showing this skill"],
            "strengths": ["what they did well for this skill"],
            "improvement_areas": ["specific areas needing improvement for this skill"]
        },)appendjoin)r   template_partsskill r   =/var/www/eduai.edurigo.com/roleplay/testing/config/prompts.pyget_skill_analysis_template   s   
r
   N)SCENARIO_GENERATION_PROMPTCHARACTER_ROLEPLAY_PROMPTCHARACTER_CONCLUSION_PROMPTSKILL_ANALYSIS_PROMPTliststrr
   r   r   r   r	   <module>   s
    ($)