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.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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: 'Helicone AI Gateway provider comparison'
  3. providers:
  4. # Basic usage with different providers through Helicone AI Gateway
  5. - id: helicone:openai/gpt-4o-mini
  6. label: 'OpenAI via Helicone Gateway'
  7. config:
  8. temperature: 0.7
  9. max_tokens: 500
  10. - id: helicone:anthropic/claude-3-5-sonnet
  11. label: 'Anthropic via Helicone Gateway'
  12. config:
  13. temperature: 0.7
  14. max_tokens: 500
  15. - id: helicone:groq/llama-3.1-8b-instant
  16. label: 'Groq via Helicone Gateway'
  17. config:
  18. temperature: 0.7
  19. max_tokens: 500
  20. prompts:
  21. - |
  22. You are a helpful AI assistant. Please answer the following question concisely and accurately.
  23. Question: {{question}}
  24. Provide a clear, informative response.
  25. tests:
  26. - description: 'Basic question answering'
  27. vars:
  28. question: 'What is machine learning?'
  29. assert:
  30. - type: contains
  31. value: 'algorithm'
  32. - type: contains
  33. value: 'data'
  34. - type: llm-rubric
  35. value: 'Response accurately explains machine learning concepts'
  36. - description: 'Creative writing task'
  37. vars:
  38. question: 'Write a short story about a robot learning to paint in exactly 3 sentences.'
  39. assert:
  40. - type: llm-rubric
  41. value: 'Story is exactly 3 sentences long'
  42. - type: llm-rubric
  43. value: 'Story is creative and engaging'
  44. - type: contains
  45. value: 'robot'
  46. - description: 'Technical explanation'
  47. vars:
  48. question: 'Explain the difference between supervised and unsupervised learning.'
  49. assert:
  50. - type: contains
  51. value: 'supervised'
  52. - type: contains
  53. value: 'unsupervised'
  54. - type: llm-rubric
  55. value: 'Explanation clearly distinguishes between the two types of learning'
  56. - description: 'Math problem solving'
  57. vars:
  58. question: 'If a train travels 60 miles per hour for 2.5 hours, how far does it travel?'
  59. assert:
  60. - type: contains
  61. value: '150'
  62. - type: llm-rubric
  63. value: 'Calculation is correct and clearly explained'
  64. - description: 'Code explanation'
  65. vars:
  66. question: 'What does this Python code do: `[x**2 for x in range(10)]`?'
  67. assert:
  68. - type: contains
  69. value: 'list comprehension'
  70. - type: contains
  71. value: 'square'
  72. - type: llm-rubric
  73. value: 'Explanation is accurate and includes the output'
  74. defaultTest:
  75. options:
  76. # Helicone provides built-in cost tracking
  77. # Enable cost tracking for comparison
  78. includeMetrics: true
Tip!

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

Comments

Loading...