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 2.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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. prompts:
  3. - 'Solve this riddle: {{riddle}}'
  4. providers:
  5. - openai:gpt-4o
  6. - openai:gpt-4o-mini
  7. defaultTest:
  8. assert:
  9. # Inference should always cost less than this (USD)
  10. - type: cost
  11. threshold: 0.002
  12. # Inference should always be faster than this (milliseconds)
  13. - type: latency
  14. threshold: 3000
  15. tests:
  16. - vars:
  17. riddle: 'I speak without a mouth and hear without ears. I have no body, but I come alive with wind. What am I?'
  18. assert:
  19. # Make sure the LLM output contains this word
  20. - type: contains
  21. value: echo
  22. # Use model-graded assertions to enforce free-form instructions
  23. - type: llm-rubric
  24. value: Do not apologize
  25. - vars:
  26. riddle: 'You see a boat filled with people. It has not sunk, but when you look again you don’t see a single person on the boat. Why?'
  27. assert:
  28. - type: llm-rubric
  29. value: explains that the people are below deck
  30. - vars:
  31. riddle: 'The more of this there is, the less you see. What is it?'
  32. assert:
  33. - type: contains
  34. value: darkness
  35. - vars:
  36. riddle: >-
  37. I have keys but no locks. I have space but no room. You can enter, but
  38. can’t go outside. What am I?
  39. - vars:
  40. riddle: >-
  41. I am not alive, but I grow; I don't have lungs, but I need air; I don't
  42. have a mouth, but water kills me. What am I?
  43. - vars:
  44. riddle: What can travel around the world while staying in a corner?
  45. - vars:
  46. riddle: Forward I am heavy, but backward I am not. What am I?
  47. - vars:
  48. riddle: >-
  49. The person who makes it, sells it. The person who buys it, never uses
  50. it. The person who uses it, doesn't know they're using it. What is it?
  51. - vars:
  52. riddle: I can be cracked, made, told, and played. What am I?
  53. - vars:
  54. riddle: What has keys but can't open locks?
  55. - vars:
  56. riddle: >-
  57. I'm light as a feather, yet the strongest person can't hold me for much
  58. more than a minute. What am I?
  59. - vars:
  60. riddle: >-
  61. I can fly without wings, I can cry without eyes. Whenever I go, darkness
  62. follows me. What am I?
  63. - vars:
  64. riddle: >-
  65. I am taken from a mine, and shut up in a wooden case, from which I am
  66. never released, and yet I am used by almost every person. What am I?
  67. - vars:
  68. riddle: >-
  69. David's father has three sons: Snap, Crackle, and _____? What is the
  70. name of the third son?
  71. - vars:
  72. riddle: >-
  73. I am light as a feather, but even the world's strongest man couldn’t
  74. hold me for much longer than a minute. What am I?
Tip!

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

Comments

Loading...