o
    hh                     @   s"   d Z dZdZdedefddZdS )aT  
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.
ah  
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}

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 and goals  
4. Be challenging but not impossible to work with
5. Keep responses to 1-3 sentences maximum
6. React naturally to how the learner is treating you
7. Remember: YOU are seeking help, THEY are the professional helping you

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   R/var/www/eduai.edurigo.com/doc_train/edurigo_ai/roleplay/testing/config/prompts.pyget_skill_analysis_templatep   s   
r
   N)SCENARIO_GENERATION_PROMPTCHARACTER_ROLEPLAY_PROMPTSKILL_ANALYSIS_PROMPTliststrr
   r   r   r   r	   <module>   s    ()