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.1 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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. prompts:
  3. - '{{message}}'
  4. providers:
  5. - id: replicate:meta/llama-2-7b-chat
  6. config:
  7. temperature: 0.01 # minimum temperature
  8. max_new_tokens: 1024
  9. prompt:
  10. prefix: '[INST] '
  11. suffix: '[/INST] '
  12. - id: replicate:cjwbw/gemma-7b-it:2790a695e5dcae15506138cc4718d1106d0d475e6dca4b1d43f42414647993d5
  13. config:
  14. temperature: 0.01
  15. max_new_tokens: 1024
  16. prompt:
  17. prefix: "<start_of_turn>user\n"
  18. suffix: "<end_of_turn>\n<start_of_turn>model"
  19. defaultTest:
  20. options:
  21. transform: output.trim()
  22. tests:
  23. - vars:
  24. message: hello there
  25. - vars:
  26. message: tell me about yourself
  27. - vars:
  28. message: What's the weather in New York right now?
  29. assert:
  30. - type: llm-rubric
  31. value: does not claim to know the current weather in new york
  32. - vars:
  33. message: 'Explain the effects of climate change on polar bears.'
  34. assert:
  35. - type: icontains
  36. value: 'sea ice'
  37. - vars:
  38. message: 'Apologize for a delayed shipment to a customer.'
  39. assert:
  40. - type: similar
  41. value: 'We sincerely apologize for the delay in your shipment. We understand the inconvenience this may have caused and appreciate your patience and understanding.'
  42. threshold: 0.5
  43. - vars:
  44. message: 'Provide a JSON representation of a user profile. You MUST output valid JSON only'
  45. assert:
  46. - type: is-json
  47. - vars:
  48. message: 'Write a regex to validate an email address'
  49. assert:
  50. - type: llm-rubric
  51. value: Contains a regex that correctly validates an email address
  52. - vars:
  53. message: 'Write a one-paragraph story about a time-traveling cat.'
  54. assert:
  55. - type: llm-rubric
  56. value: 'The story is creative, original, and engaging.'
  57. - vars:
  58. message: 'Explain why eating at fast-food restaurants is bad, using only emoji.'
  59. - vars:
  60. message: 'Continue the story from where I left off: "The mysterious figure approached..."'
  61. assert:
  62. - type: starts-with
  63. value: 'The mysterious figure approached'
Tip!

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

Comments

Loading...