Examples & Use Cases
Complete working examples and practical patterns for testing conversational AI systems with Penelope.
Prerequisites
Required: 1. RHESIS_API_KEY: Set your Rhesis API key
Get your key from Rhesis App → Settings (docs) 2. Rhesis Endpoint ID: Get this from your Rhesis dashboard
Running Examples
All examples are in the examples directory and accept command-line arguments:
Testing Patterns
Conversational Flow Testing
Test context retention and coherence across multiple turns.
Security Testing
Test for vulnerabilities and inappropriate behaviors.
⚠️ Important: Only test systems you own or have permission to test.
Testing with Restrictions
Define forbidden behaviors the target system must not exhibit. Restrictions are negative criteria - boundaries that should not be crossed.
Common Restriction Categories:
- Brand boundaries - No competitor mentions
- Professional advice - No medical/legal/financial advice
- Information security - No system prompt leaks
- Content safety - No harmful content generation
See Core Concepts for detailed explanation of how restrictions work with goals, instructions, and scenarios.
Compliance Verification
Verify regulatory compliance (GDPR, CCPA, accessibility).
Edge Case Discovery
Find unusual behaviors and boundary conditions.
User Experience Testing
Evaluate conversation quality and usability.
Multi-Language Support
Test internationalization and language handling.
Domain-Specific Testing
Test specialized knowledge and capabilities.
Advanced Examples
Platform Integration
Load TestSets from Rhesis platform, execute with Penelope, and store results back.
📝 Note: Requires valid TestSet IDs in your Rhesis account.
Custom Tools
Create custom testing tools for specialized needs (database verification, API monitoring, security scanning).
See Extending Penelope for detailed tool creation guide.
Batch Testing
Run multiple test scenarios efficiently with result aggregation, reporting, and JSON export.
Contributing Examples
Have an interesting use case? Contribute by following these guidelines:
Document Your Example
- Clear purpose and description
- Prerequisites needed
- How to run it
- Expected output
Write Clean Code
- Well-commented code
- Clear variable names
- Follow existing patterns
- Use type hints
Make It Realistic
- Real-world scenarios
- Proper error handling
- Self-contained examples
Test It
- Runs without errors
- Works with default configuration
- Clear instructions
See CONTRIBUTING.md for details.
Next: Learn about Configuration options or explore how to Extend Penelope with custom tools and architectures.