Project

General

Profile

Actions

Bug #274

closed

Scenario Generation Tool for AI Communication Coach

Added by Harikrishnan Murugan 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
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

  1. Tool Function Development

    • Create tool function following Pipecat tool format (callable function that Gemini can invoke)
    • Use gemini-2.5-flash model with thinking mode enabled
    • Implement function that accepts input parameters and returns JSON output
  2. 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
  3. 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
  4. 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

  1. Tool function created in Pipecat tool format
  2. Accepts all 5 input parameters correctly (3 required, 2 optional)
  3. Returns JSON with exact format: {title, description, duration}
  4. Uses gemini-2.5-flash model with balanced thinking budget
  5. Generates realistic, communication-focused scenarios
  6. Tested with at least 5 diverse combinations across different industries (technology, healthcare, education, sales, retail)
  7. Tested with all three levels (beginner, intermediate, advanced)
  8. Tested with and without optional topic parameter
  9. 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:

Testing Guidance:

  • Test with diverse user profiles to ensure scenario variety
  • Validate output JSON structure matches specification exactly
Actions #1

Updated by Harikrishnan Murugan about 2 months ago

  • Status changed from Pending to Resolved
  • % Done changed from 0 to 100
Actions #2

Updated by Harikrishnan Murugan about 2 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF