curl -X POST https://your-api.com/api/gemini \ -H "Content-Type: application/json" \ -d '{ "transcript": "User: I am feeling overwhelmed lately.\nAssistant: Tell me more about what is overwhelming you.", "emoData": { "anxious": 0.785, "sad": 0.652, "calm": 0.421 } }'
{ "response": "I notice you're experiencing significant anxiety alongside sadness. It's completely valid to feel this way. Let's explore what might be contributing to these feelings and identify coping strategies that work for you.", "emotions": { "anxious": 0.785, "sad": 0.652, "calm": 0.421, "confident": 0.245 }}
Core Features
Therapeutic feedback
Generate personalized therapeutic responses using AI that combines conversation context with emotional analysis
SvaraAI provides AI-generated therapeutic feedback that analyzes both conversation content and detected emotions to offer personalized, empathetic responses. The system uses Google’s Gemini 2.0 Flash model to generate contextually relevant therapeutic insights.
The system uses a template-based approach for prompt construction:
Prompt Template
You are a compassionate AI therapist analyzing a conversation.Transcript:{{transcript}}Detected emotions:{{emoData}}Provide brief, empathetic therapeutic feedback addressing the emotional state and conversation content.
Prompt design principles
Context first: Provide the AI with full conversation context
Emotion integration: Explicitly include emotion data for analysis
Role definition: Clearly define the AI’s therapeutic role
{ "response": "I notice you're experiencing significant anxiety alongside sadness. It's completely valid to feel this way. Let's explore what might be contributing to these feelings and identify coping strategies that work for you.", "emotions": { "anxious": 0.785, "sad": 0.652, "calm": 0.421, "confident": 0.245 }}
Emotion scores as key-value pairs where keys are emotion names and values are confidence scores (0-1)
curl -X POST https://your-api.com/api/gemini \ -H "Content-Type: application/json" \ -d '{ "transcript": "User: I am feeling overwhelmed lately.\nAssistant: Tell me more about what is overwhelming you.", "emoData": { "anxious": 0.785, "sad": 0.652, "calm": 0.421 } }'
AI-generated therapeutic feedback should complement, not replace, professional mental health care. Always encourage users to seek professional help for serious concerns.
Not a replacement for therapy: AI feedback is supportive, not diagnostic or prescriptive
Context limitations: 100 token limit may not allow for complex therapeutic explorations
Model biases: Gemini may reflect biases present in training data
Crisis situations: AI is not equipped to handle mental health emergencies