A comprehensive training platform to help your non-tech teammates master prompt engineering for Microsoft 365 Copilot using Google Agent Development Kit (ADK) and Gemini on Vertex AI.
-
Gamification Elements
- Score tracking with detailed breakdowns
- User leaderboard
- Badge system (Perfect Score, Consistent Performer, Dedicated Learner, Advanced Master)
- Skill level progression (Beginner → Intermediate → Advanced)
-
Practice Scenarios
- Microsoft 365 Copilot-specific scenarios
- Real-world use cases for Outlook, Word, Excel, PowerPoint, and Teams
- Three difficulty levels with 3 scenarios each
- Hints and example prompts for learning
-
AI-Powered Evaluation
- Comprehensive scoring across 4 dimensions (Clarity, Specificity, Structure, Task Alignment)
- Detailed constructive feedback
- Identification of strengths and improvement areas
- Powered by Google ADK and Gemini 2.0 Flash
-
Progress Tracking
- Persistent user data storage
- Historical attempt records
- Performance analytics
- Learning resources and best practices
- Python 3.9 or higher
- Google Cloud Project with Vertex AI API enabled
- gcloud CLI installed and configured
mkdir prompt-training-app
cd prompt-training-appCreate the following file structure:
prompt-training-app/
├── prompt_training_app.py # Main application with ADK agents
├── streamlit_app.py # Streamlit UI
├── requirements.txt # Python dependencies
├── .env # Environment variables (create from .env.example)
├── .env.example # Template for environment variables
└── user_progress.json # Auto-generated user data (don't create manually)
# Create virtual environment (recommended)
python -m venv .venv
# Activate virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt- Create a Google Cloud Project at https://console.cloud.google.com
- Enable the Vertex AI API:
gcloud services enable aiplatform.googleapis.com - Authenticate:
gcloud auth application-default login
- Create
.envfile:cp .env.example .env
- Edit
.envand add your project details:GOOGLE_GENAI_USE_VERTEXAI=TRUE GOOGLE_CLOUD_PROJECT=your-actual-project-id GOOGLE_CLOUD_LOCATION=us-central1
- Get an API key from https://aistudio.google.com/apikey
- Create
.envfile:cp .env.example .env
- Edit
.env:GOOGLE_GENAI_USE_VERTEXAI=FALSE GOOGLE_API_KEY=your-api-key-here
# Make sure you're in the project directory and virtual environment is activated
streamlit run streamlit_app.pyThe app will open in your browser at http://localhost:8501
- Enter a username on the login screen
- Click "Start Training"
- Navigate to "Practice Mode" in the sidebar
- Select a difficulty level
- Choose or get a random scenario
- Write your prompt
- Submit for AI evaluation
- Review feedback and improve!
┌─────────────────────────────────────────────────┐
│ Streamlit UI (streamlit_app.py) │
│ - User Interface │
│ - Navigation & Session Management │
│ - Results Display │
└────────────────┬────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────┐
│ Core Logic (prompt_training_app.py) │
│ - PromptEvaluatorAgent (Google ADK) │
│ - CopilotScenarioGenerator │
│ - UserProgressTracker │
└────────────────┬────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────┐
│ Google Vertex AI / Gemini API │
│ - Gemini 2.0 Flash Model │
│ - Prompt Evaluation │
│ - Structured Feedback Generation │
└─────────────────────────────────────────────────┘
Each prompt is evaluated on 4 dimensions (25 points each):
- Clarity (25 points): Is the prompt clear and unambiguous?
- Specificity (25 points): Does it provide enough context and details?
- Structure (25 points): Is it well-organized with proper formatting?
- Task Alignment (25 points): Does it align with the given scenario/goal?
Total Score: 100 points
- 🌟 Excellent: 85-100 points
- 👍 Good: 70-84 points
- 💪 Needs Practice: 0-69 points
- Perfect Score: Achieve 100/100 on any scenario
- Consistent Performer: Score above 80 on 3 attempts
- Dedicated Learner: Complete 10 practice attempts
- Advanced Master: Complete 5 advanced scenarios with average > 85
- Beginner: Starting level
- Intermediate: Average score ≥70 with 3+ attempts
- Advanced: Average score ≥85 with 5+ attempts
- Email Summarization in Outlook
- Document Formatting in Word
- Meeting Preparation in Teams
- Data Analysis in Excel
- Presentation Creation in PowerPoint
- Cross-Product Workflow
- Strategic Analysis in Business Chat
- Complex Automation Workflow
- Enterprise Knowledge Synthesis
User progress is automatically saved to user_progress.json in the project directory. This includes:
- User scores and attempts
- Skill level progression
- Badge achievements
- Complete attempt history
- Leaderboard rankings
Edit prompt_training_app.py and add scenarios to the CopilotScenarioGenerator.get_scenarios() method:
{
"id": "b4", # Unique ID
"title": "Your Scenario Title",
"description": "Scenario description",
"goal": "What users should accomplish",
"context": "Additional context",
"product": "Microsoft 365 Product",
"hints": ["Hint 1", "Hint 2"],
"example_good": "Example of a good prompt"
}Modify the instruction parameter in the PromptEvaluatorAgent.__init__() method to change how prompts are evaluated.
Edit streamlit_app.py to modify colors, layouts, or add new pages. The custom CSS is in the st.markdown() section at the top.
- Make sure you've run
gcloud auth application-default login - Check that your
.envfile has the correct project ID
- Ensure virtual environment is activated
- Run
pip install -r requirements.txtagain
- Verify Vertex AI API is enabled in your Google Cloud project
- Check that the model name is correct (gemini-2.0-flash)
- Ensure your region supports Gemini models (us-central1 is recommended)
- This occasionally happens with LLM responses
- The app includes fallback handling
- Try submitting again if this occurs
- Check if port 8501 is already in use
- Try:
streamlit run streamlit_app.py --server.port 8502
- First API call may be slow due to cold start
- Subsequent calls should be faster
- Consider using a more powerful machine type if deploying to cloud
The app tracks the following metrics per user:
- Total attempts
- Average score across all attempts
- Score breakdown by category
- Skill level progression over time
- Badge achievements
- Complete attempt history with timestamps
-
Start with Basics
- Begin with beginner scenarios
- Demonstrate good vs. poor prompts
- Explain the evaluation criteria
-
Hands-On Practice
- Let users practice independently
- Encourage experimentation
- Review feedback together
-
Group Learning
- Share high-scoring prompts
- Discuss different approaches
- Use leaderboard for friendly competition
-
Progressive Difficulty
- Master beginner level first
- Move to intermediate when comfortable
- Advanced scenarios for power users
-
Read Scenarios Carefully
- Understand the context
- Identify the goal
- Note the product being used
-
Use the Hints
- Check hints before writing
- Look at example prompts
- Learn from patterns
-
Iterate and Improve
- Review feedback carefully
- Try scenarios multiple times
- Apply learnings to next attempts
-
Track Progress
- Monitor your score trends
- Set personal goals
- Celebrate badge achievements
- Authentication: Uses Google Cloud authentication (ADC or API key)
- Data Privacy: User data stored locally in
user_progress.json - API Keys: Never commit
.envfile to version control - Credentials: Keep service account keys secure
- Network: Ensure secure connection to Vertex AI endpoints
- Use service accounts with minimal required permissions
- Store secrets in Google Secret Manager
- Enable VPC Service Controls if needed
- Implement proper access controls
- Monitor API usage and costs
- Gemini 2.0 Flash is cost-effective for this use case
- Typical costs: ~$0.10-0.30 per 1000 evaluations
- Monitor usage in Google Cloud Console
- Set up billing alerts
- Google AI Studio offers free API access for testing
- Vertex AI has a free tier with monthly credits
- Perfect for initial testing and small teams
While this README focuses on local testing, here's what you'll need for cloud deployment:
- Docker installed
- Cloud Run API enabled
- Container Registry or Artifact Registry access
Dockerfilecloudbuild.yamlor deployment script- Updated
.envhandling for Cloud Run secrets
- Containerize the application
- Build and push to Container Registry
- Deploy to Cloud Run
- Configure environment variables as secrets
- Set up authentication and IAM
- Configure custom domain (optional)
Note: Cloud deployment instructions will be provided separately when you're ready to deploy.
-
Multi-Language Support
- Add internationalization
- Support for non-English prompts
-
Advanced Analytics
- Team performance dashboards
- Trend analysis over time
- Common mistake patterns
-
Integration Features
- Export progress reports
- Share prompts with team
- Import custom scenarios
-
Adaptive Learning
- Personalized scenario recommendations
- Dynamic difficulty adjustment
- AI-generated practice scenarios
-
Social Features
- Team challenges
- Prompt sharing and voting
- Mentor-mentee connections
-
Admin Dashboard
- User management
- Custom scenario creation UI
- Performance analytics
- User can log in
- Dashboard displays correct stats
- Can select and load scenarios
- Prompt submission works
- Evaluation returns valid scores
- Feedback is displayed properly
- Progress is saved correctly
- Leaderboard updates
- Badges are awarded correctly
- Navigation works smoothly
- Create test user "test_user_1"
- Complete 1 beginner scenario (aim for 60+ score)
- Complete 1 beginner scenario (aim for 85+ score)
- Verify skill level progression
- Complete 3 more scenarios
- Check badge awards
- Verify leaderboard placement
If you want to extend this application:
- Create feature branch
- Add new scenarios or features
- Test thoroughly
- Document changes
- Update README if needed
This project is for internal training purposes. Modify as needed for your organization.
Q: Can I use this without Google Cloud? A: Yes! Use Google AI Studio with a free API key for testing.
Q: How many users can use this simultaneously? A: Locally, one user at a time. For multiple users, deploy to Cloud Run with session management.
Q: Can I customize the scoring criteria?
A: Yes! Edit the PromptEvaluatorAgent instruction in prompt_training_app.py.
Q: How do I reset a user's progress?
A: Edit or delete their entry in user_progress.json.
Q: Can I add my own scenarios? A: Absolutely! Follow the "Adding New Scenarios" section above.
Q: What if the AI evaluation seems wrong? A: LLMs can be subjective. You can adjust the evaluation prompt or try again. Consider averaging multiple attempts.
- Check Google ADK documentation: https://google.github.io/adk-docs/
- Review Vertex AI docs: https://cloud.google.com/vertex-ai/docs
- Streamlit documentation: https://docs.streamlit.io
- Google Cloud support for billing/API issues
For questions about this training app or prompt engineering best practices, reach out to your AI Engineering team.
- Google ADK: For the excellent agent development framework
- Streamlit: For the intuitive UI framework
- Microsoft 365 Copilot: For the inspiration and use cases
- Your Team: For being eager to learn and improve!
# 1. Setup
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
# 2. Configure
cp .env.example .env
# Edit .env with your credentials
gcloud auth application-default login
# 3. Run
streamlit run streamlit_app.py
# 4. Train
# Open browser, create user, start practicing!Happy Learning! 🚀
Last Updated: 2025 Version: 1.0.0