Actions
Bug #274
closedScenario Generation Tool for AI Communication Coach
Start date:
10/30/2025
Due date:
11/04/2025
% Done:
100%
Estimated time:
Prioritization:
P0
Description
Task Description¶
Build a scenario generation tool function using Pipecat tool format for the AI Communication Coach. This tool will generate realistic conversation scenarios based on user profile (industry, role, level) to help users practice and improve their English communication skills.
The AI coach will call this tool during conversation, passing user context parameters to generate appropriate practice scenarios. The tool returns scenario details as JSON that the coach uses to guide the conversation practice session.
Technical Approach¶
-
Tool Function Development
- Create tool function following Pipecat tool format (callable function that Gemini can invoke)
- Use
gemini-2.5-flashmodel with thinking mode enabled - Implement function that accepts input parameters and returns JSON output
-
Input Parameters (all passed by AI coach based on user context)
-
industry(string, required): User's industry or domain (examples: "technology", "healthcare", "education", "sales", "retail") -
role(string, required): User's professional or student role (examples: "software engineer", "manager", "college student", "sales representative") -
level(string, required): Difficulty level for scenario (values: "beginner", "intermediate", "advanced") -
topic(string, optional): Specific conversation context if user wants focused practice (examples: "job interview", "client meeting", "presentation") -
personalization_note(string, optional): Additional context from coach's learning about user preferences or areas needing improvement
-
-
Output JSON Format
-
title: One-line scenario name (concise and descriptive) -
description: Two-line scenario explanation (what the practice will focus on) -
duration: Integer representing minutes for this practice session
-
-
Implementation Requirements
- Configure thinking budget parameter through testing to balance response latency and output quality
- Generate communication-focused scenarios (goal: improve English speaking skills)
- Ensure scenarios are realistic and appropriate for the specified level
- Account for diverse industries and roles
Acceptance Criteria¶
- Tool function created in Pipecat tool format
- Accepts all 5 input parameters correctly (3 required, 2 optional)
- Returns JSON with exact format:
{title, description, duration} - Uses
gemini-2.5-flashmodel with balanced thinking budget - Generates realistic, communication-focused scenarios
- Tested with at least 5 diverse combinations across different industries (technology, healthcare, education, sales, retail)
- Tested with all three levels (beginner, intermediate, advanced)
- Tested with and without optional
topicparameter - Code includes clear comments explaining tool purpose and parameters
Resources/References¶
Pipecat Documentation:
- Pipecat Tool Functions: https://docs.pipecat.ai/ (understand how to create tool functions)
- Reference existing tool implementations in the codebase to understand the pattern
Gemini API:
- Google Generative AI Python Package: https://github.com/googleapis/python-genai
Testing Guidance:
- Test with diverse user profiles to ensure scenario variety
- Validate output JSON structure matches specification exactly
Updated by Harikrishnan Murugan about 2 months ago
- Status changed from Pending to Resolved
- % Done changed from 0 to 100
Updated by Harikrishnan Murugan about 2 months ago
- Status changed from Resolved to Closed
Actions