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
  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.0-flash-001'
  9. config:
  10. tools: file://tools.json
  11. defaultTest:
  12. assert:
  13. - type: equals
  14. value: get_current_weather
  15. # Transform is a cleaner way to pick out specific properties.
  16. # This transform returns only the 'name' property
  17. transform: JSON.parse(output).functionCall.name
  18. - type: similar
  19. value: '{{location}}'
  20. threshold: 0.9
  21. # This transform returns only the parsed location argument.
  22. transform: JSON.parse(output).functionCall.args.location
  23. options:
  24. # This overrides the default grading providers with Vertex AI models.
  25. providers:
  26. embedding: 'vertex:embedding:text-embedding-005'
  27. text: 'vertex:gemini-2.0-flash-001'
  28. tests:
  29. - vars:
  30. location: San Francisco
  31. - vars:
  32. location: New York
Tip!

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

Comments

Loading...