Created
March 25, 2026 12:14
-
-
Save BexTuychiev/1f7454d2b0ddfad14742888148fcb414 to your computer and use it in GitHub Desktop.
Promptfoo tutorial: email drafter evaluation config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| description: "Email drafter evaluation" | |
| prompts: | |
| - | | |
| Draft an email based on these bullet points. | |
| Match the specified tone throughout the email. | |
| Bullet points: | |
| {{bullet_points}} | |
| Tone: {{tone}} | |
| providers: | |
| - id: openai:chat:gpt-5 | |
| label: "GPT-5" | |
| - id: anthropic:messages:claude-sonnet-4-6 | |
| label: "Claude Sonnet 4" | |
| defaultTest: | |
| assert: | |
| - type: latency | |
| threshold: 30000 | |
| tests: | |
| - vars: | |
| bullet_points: | | |
| - Recap of the design review decisions | |
| - Next steps: finalize mockups by Thursday | |
| - Ask if anyone has questions | |
| tone: "casual" | |
| assert: | |
| - type: icontains | |
| value: "mockups" | |
| - type: not-contains | |
| value: "Dear" | |
| - type: llm-rubric | |
| value: "The email uses a casual tone with contractions and short sentences" | |
| - type: python | |
| value: "50 <= len(output.split()) <= 200" | |
| - vars: | |
| bullet_points: | | |
| - Q1 revenue exceeded targets by 12% | |
| - New enterprise client onboarded | |
| - Hiring plan for Q2 approved | |
| tone: "formal" | |
| assert: | |
| - type: icontains | |
| value: "Q1" | |
| - type: llm-rubric | |
| value: "The email maintains a formal, professional tone throughout" | |
| - vars: | |
| bullet_points: | | |
| - API migration deadline is Friday at 5pm | |
| - Three endpoints still need updating | |
| - Downtime window is Saturday 2-6am | |
| tone: "urgent" | |
| assert: | |
| - type: icontains | |
| value: "Friday" | |
| - type: llm-rubric | |
| value: "The email conveys urgency with direct language and clear action items" | |
| - type: python | |
| value: "50 <= len(output.split()) <= 200" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment