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.8 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
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: Image Classification Example of Fashion MNIST dataset
  3. providers:
  4. - openai:chat:gpt-4o
  5. - openai:chat:gpt-4o-mini
  6. prompts:
  7. - label: Image Classification
  8. raw: file://prompt.js
  9. config:
  10. response_format:
  11. type: json_schema
  12. json_schema:
  13. name: image_classification
  14. schema:
  15. type: object
  16. properties:
  17. classification:
  18. type: string
  19. enum:
  20. [
  21. 'T-shirt/top',
  22. 'Trouser',
  23. 'Pullover',
  24. 'Dress',
  25. 'Coat',
  26. 'Sandal',
  27. 'Shirt',
  28. 'Sneaker',
  29. 'Bag',
  30. 'Ankle boot',
  31. ]
  32. color:
  33. type: string
  34. features:
  35. type: string
  36. style:
  37. type: string
  38. confidence:
  39. type: integer
  40. reasoning:
  41. type: string
  42. required:
  43. - classification
  44. - color
  45. - features
  46. - style
  47. - confidence
  48. - reasoning
  49. additionalProperties: false
  50. defaultTest:
  51. assert:
  52. - type: is-json
  53. value:
  54. type: object
  55. properties:
  56. classification:
  57. type: string
  58. color:
  59. type: string
  60. features:
  61. type: string
  62. style:
  63. type: string
  64. confidence:
  65. type: integer
  66. reasoning:
  67. type: string
  68. - type: javascript
  69. value: 'output.classification === context.vars.label'
  70. metric: accuracy
  71. tests: file://fashion_mnist_sample_base64.csv
Tip!

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

Comments

Loading...