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 1.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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: Custom LLM-based grading with evaluation prompts
  3. prompts:
  4. - file://prompts.txt
  5. providers:
  6. - openai:gpt-4.1-mini
  7. defaultTest:
  8. options:
  9. # ---
  10. # Custom grading prompt:
  11. # ---
  12. rubricPrompt:
  13. - role: system
  14. content: >-
  15. Grade the output by the following specifications, keeping track of the points scored:
  16. Did the output mention {{x}}? +1 point
  17. Did the output describe {{y}}? + 1 point
  18. Did the output ask to clarify {{z}}? +1 point
  19. Calculate the score but always pass the test. Output your response in the following JSON format:
  20. {pass: true, score: number, reason: string}
  21. - role: user
  22. content: 'Output: {{ output }}'
  23. # ---
  24. # You can also provide an OpenAI prompt directly as pure JSON:
  25. # ---
  26. #
  27. # rubricPrompt: >-
  28. # [
  29. # {
  30. # "role": "system",
  31. # "content": "Grade the output by the following specifications, keeping track of the points scored:\n Did the output mention {{x}}? +1 point\n Did the output describe {{y}}? + 1 point\n Did the output ask to clarify {{z}}? +1 point\n\n Output your response in the following JSON format:\n {pass: bool, score: number, reason: string}"
  32. # },
  33. # {
  34. # "role": "user",
  35. # "content": "Output: {{ output }}"
  36. # }
  37. # ]
  38. #
  39. tests:
  40. - vars:
  41. topic: the economy
  42. x: the Federal Reserve
  43. y: macroeconomics
  44. z: the specific question the user wants to ask
  45. assert:
  46. - type: llm-rubric
Tip!

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

Comments

Loading...