Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

promptfooconfig-scenarios.yaml 1.5 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: Scenario-based translation with expected values
  3. prompts:
  4. - file://prompts.txt
  5. providers:
  6. - openai:gpt-4.1-mini
  7. - openai:gpt-4.1
  8. - anthropic:claude-sonnet-4-20250514
  9. scenarios:
  10. - description: Translation accuracy with expected results
  11. config:
  12. - vars:
  13. language: Spanish
  14. expectedHelloWorld: 'Hola mundo'
  15. expectedGoodMorning: 'Buenos días'
  16. expectedHowAreYou: '¿Cómo estás?'
  17. - vars:
  18. language: French
  19. expectedHelloWorld: 'Bonjour le monde'
  20. expectedGoodMorning: 'Bonjour'
  21. expectedHowAreYou: 'Comment ça va?'
  22. - vars:
  23. language: German
  24. expectedHelloWorld: 'Hallo Welt'
  25. expectedGoodMorning: 'Guten Morgen'
  26. expectedHowAreYou: 'Wie geht es dir?'
  27. tests:
  28. - description: Translated Hello World
  29. vars:
  30. input: 'Hello world'
  31. assert:
  32. - type: similar
  33. value: '{{expectedHelloWorld}}'
  34. threshold: 0.90
  35. - description: Translated Good Morning
  36. vars:
  37. input: 'Good morning'
  38. assert:
  39. - type: similar
  40. value: '{{expectedGoodMorning}}'
  41. threshold: 0.90
  42. - description: Translated How are you?
  43. vars:
  44. input: 'How are you?'
  45. assert:
  46. - type: similar
  47. value: '{{expectedHowAreYou}}'
  48. threshold: 0.90
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...