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.yaml 4.6 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: Mistral AI model comparison and evaluation
  3. prompts:
  4. - '{{message}}'
  5. providers:
  6. # Reasoning models - specialized for complex problems
  7. - id: mistral:magistral-medium-latest
  8. label: magistral-medium
  9. config:
  10. temperature: 0.7
  11. top_p: 0.95
  12. max_tokens: 40960
  13. - id: mistral:magistral-small-latest
  14. label: magistral-small
  15. config:
  16. temperature: 0.7
  17. top_p: 0.95
  18. max_tokens: 40960
  19. # Traditional chat models
  20. - id: mistral:mistral-large-latest
  21. label: large
  22. config:
  23. temperature: 0.7
  24. - id: mistral:mistral-medium-latest
  25. label: medium
  26. config:
  27. temperature: 0.7
  28. - id: mistral:mistral-small-latest
  29. label: small
  30. config:
  31. temperature: 0.7
  32. # Use Mistral models for evaluation instead of OpenAI
  33. defaultTest:
  34. options:
  35. # Use Mistral Large for grading and Mistral embeddings for similarity
  36. provider:
  37. id: mistral:mistral-large-latest
  38. embedding:
  39. id: mistral:embedding:mistral-embed
  40. tests:
  41. # Simple chat scenarios
  42. - description: Casual greeting
  43. vars:
  44. message: 'Hello! How are you today?'
  45. assert:
  46. - type: llm-rubric
  47. value: Responds in a friendly, conversational manner
  48. - type: similar
  49. value: "Hi there! I'm doing well, thanks for asking."
  50. threshold: 0.7
  51. - description: Creative writing request
  52. vars:
  53. message: 'Write a short story about a robot learning to paint'
  54. assert:
  55. - type: llm-rubric
  56. value: Creates an engaging creative story with clear narrative structure
  57. - type: contains
  58. value: robot
  59. - type: contains
  60. value: paint
  61. # Reasoning scenarios - where Magistral models should excel
  62. - description: Mathematical reasoning
  63. vars:
  64. message: 'Solve this step by step: If a pizza has 8 slices and you eat 3 slices, then your friend eats twice as many slices as you did, how many slices are left?'
  65. assert:
  66. - type: contains
  67. value: '2'
  68. - type: llm-rubric
  69. value: Shows clear step-by-step mathematical reasoning and arrives at the correct answer
  70. - description: Logical reasoning
  71. vars:
  72. message: 'If all roses are flowers, and some flowers are red, can we conclude that some roses are red? Explain your reasoning.'
  73. assert:
  74. - type: icontains
  75. value: 'cannot'
  76. - type: llm-rubric
  77. value: Correctly identifies the logical fallacy and explains why the conclusion doesn't follow
  78. - description: Complex problem solving
  79. vars:
  80. message: 'You have a 3-gallon jug and a 5-gallon jug. How do you measure exactly 4 gallons of water? Show your steps.'
  81. assert:
  82. - type: llm-rubric
  83. value: Provides a correct step-by-step solution to the water jug problem
  84. - type: similar
  85. value: 'Fill the 5-gallon jug, pour into 3-gallon jug, empty 3-gallon jug, pour remaining 2 gallons from 5-gallon into 3-gallon, fill 5-gallon again, pour into 3-gallon until full'
  86. threshold: 0.6
  87. # Multi-language capabilities
  88. - description: French conversation
  89. vars:
  90. message: 'Bonjour! Comment allez-vous? Pouvez-vous me parler de Paris?'
  91. assert:
  92. - type: llm-rubric
  93. value: Responds appropriately in French and provides information about Paris
  94. - type: contains
  95. value: Paris
  96. # Technical explanations
  97. - description: Technical concept explanation
  98. vars:
  99. message: 'Explain how machine learning works in simple terms that a 10-year-old could understand'
  100. assert:
  101. - type: llm-rubric
  102. value: Explains machine learning concepts clearly and appropriately for a young audience
  103. - type: similar
  104. value: 'Machine learning is like teaching a computer to recognize patterns and make predictions by showing it lots of examples'
  105. threshold: 0.5
  106. # Code generation
  107. - description: Code writing task
  108. vars:
  109. message: 'Write a Python function that takes a list of numbers and returns the average'
  110. assert:
  111. - type: contains
  112. value: 'def'
  113. - type: contains
  114. value: 'sum'
  115. - type: llm-rubric
  116. value: Provides correct Python code for calculating an average
  117. # Ethical reasoning
  118. - description: Ethical discussion
  119. vars:
  120. message: 'What are the ethical considerations when developing AI systems?'
  121. assert:
  122. - type: llm-rubric
  123. value: Discusses important ethical considerations like bias, privacy, transparency, and societal impact
  124. - type: similar
  125. value: 'Key ethical considerations include preventing bias, protecting privacy, ensuring transparency, and considering societal impact'
  126. threshold: 0.6
Tip!

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

Comments

Loading...