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

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

Comments

Loading...