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 1.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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. # Learn more about building a configuration: https://promptfoo.dev/docs/configuration/guide
  3. description: 'Function calling demonstration'
  4. prompts:
  5. - What is the weather in {{location}}?
  6. providers:
  7. # See https://www.promptfoo.dev/docs/providers/vertex/
  8. - id: 'vertex:gemini-2.5-flash-002'
  9. config:
  10. tools: file://tools.json
  11. defaultTest:
  12. assert:
  13. - type: is-valid-function-call
  14. - type: equals
  15. value: get_current_weather
  16. # Transform is a cleaner way to pick out specific properties.
  17. # This transform returns only the 'name' property
  18. transform: output[0].functionCall.name
  19. - type: similar
  20. value: '{{location}}'
  21. threshold: 0.9
  22. # This transform returns only the parsed location argument.
  23. transform: output[0].functionCall.args.location
  24. options:
  25. # This overrides the default grading providers with Vertex AI models.
  26. providers:
  27. embedding: 'vertex:embedding:text-embedding-005'
  28. text: 'vertex:gemini-2.5-flash-002'
  29. tests:
  30. - vars:
  31. location: San Francisco
  32. - vars:
  33. location: New York
Tip!

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

Comments

Loading...