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

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

Comments

Loading...