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.2 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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: 'Claude vs GPT Image Analysis'
  3. prompts:
  4. - ./prompt.py:format_image_prompt
  5. - ./prompt.js:formatImagePrompt
  6. providers:
  7. - id: bedrock:anthropic.claude-3-sonnet-20240229-v1:0
  8. - id: anthropic:claude-3-5-sonnet-20241022
  9. - id: openai:gpt-4.1
  10. label: custom label for gpt-4.1
  11. tests:
  12. - vars:
  13. image_url: https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Great_Wave_off_Kanagawa2.jpg/640px-Great_Wave_off_Kanagawa2.jpg
  14. label: Great Wave off Kanagawa
  15. defaultTest:
  16. options:
  17. provider: openai:gpt-4.1
  18. rubricPrompt: |
  19. [
  20. {
  21. "role": "system",
  22. "content": "You are a meticulous grader. Evaluate how accurately the answer describes the provided image. Respond in JSON {reason:string, pass:boolean, score:number}"
  23. },
  24. {
  25. "role": "user",
  26. "content": [
  27. {"type": "image_url", "image_url": {"url": "{{image_url}}"}},
  28. {"type": "text", "text": "Answer: {{ output }}\nCriteria: {{ rubric }}"}
  29. ]
  30. }
  31. ]
  32. assert:
  33. - type: llm-rubric
  34. value: Is a detailed description of the image '{{label}}'
Tip!

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

Comments

Loading...