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.0 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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. prompts:
  3. - |
  4. Given this math puzzle: {{puzzle}}
  5. Provide a short, clear answer with minimal explanation.
  6. providers:
  7. - google:gemini-2.0-flash-exp
  8. - google:gemini-2.0-flash-thinking-exp
  9. - id: google:gemini-1.5-flash
  10. config:
  11. temperature: 0.7
  12. maxOutputTokens: 512
  13. - id: google:gemini-1.5-pro
  14. config:
  15. temperature: 0.7
  16. maxOutputTokens: 1024
  17. topP: 0.9
  18. topK: 40
  19. # Structured output example
  20. - id: google:gemini-1.5-pro
  21. config:
  22. generationConfig:
  23. temperature: 0
  24. maxOutputTokens: 1024
  25. response_mime_type: 'application/json'
  26. response_schema:
  27. type: 'object'
  28. properties:
  29. answer:
  30. type: 'string'
  31. description: 'The numerical or text answer'
  32. confidence:
  33. type: 'string'
  34. enum: ['high', 'medium', 'low']
  35. method_used:
  36. type: 'string'
  37. description: 'One-word description of solving method'
  38. required: ['answer', 'confidence', 'method_used']
  39. # Function calling example
  40. - id: google:gemini-1.5-pro
  41. config:
  42. tools:
  43. function_declarations:
  44. - name: 'verify_answer'
  45. description: 'Verify if the answer is correct'
  46. parameters:
  47. type: 'object'
  48. properties:
  49. answer:
  50. type: 'string'
  51. description: 'The proposed answer'
  52. explanation:
  53. type: 'string'
  54. description: 'Brief explanation'
  55. required: ['answer']
  56. tool_config:
  57. function_calling_config:
  58. mode: 'auto'
  59. tests:
  60. - vars:
  61. puzzle: 'If a train travels at 60 mph for 2.5 hours, then at 40 mph for 1.5 hours, what is the average speed for the entire journey?'
  62. assert:
  63. - type: contains
  64. value: 52.5
  65. - type: llm-rubric
  66. value: |
  67. The answer should be 52.5 mph.
Tip!

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

Comments

Loading...