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 889 B

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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: Code generation with sandboxed verification
  3. prompts: code_generation_prompt.txt
  4. providers:
  5. - openai:gpt-4
  6. - anthropic:messages:claude-3-5-sonnet-20241022
  7. tests:
  8. - vars:
  9. problem: 'Write a Python function to calculate the factorial of a number'
  10. function_name: 'factorial'
  11. test_input: '5'
  12. expected_output: '120'
  13. - vars:
  14. problem: 'Write a Python function to check if a string is a palindrome'
  15. function_name: 'is_palindrome'
  16. test_input: "'racecar'"
  17. expected_output: 'True'
  18. - vars:
  19. problem: 'Write a Python function to find the largest element in a list'
  20. function_name: 'find_largest'
  21. test_input: '[1, 5, 3, 9, 2]'
  22. expected_output: '9'
  23. defaultTest:
  24. assert:
  25. - type: python
  26. value: file://validate_and_run_code.py
Tip!

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

Comments

Loading...