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.4 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
  1. description: Example showing how to override scoring functions
  2. providers:
  3. - openai:gpt-4o-mini
  4. prompts:
  5. - 'Translate the following text to {{language}}: {{text}}'
  6. defaultTest:
  7. assertScoringFunction: file://./default.js
  8. assert:
  9. - type: llm-rubric
  10. value: Rate the accuracy of the translation of {{text}} from English to {{language}}
  11. metric: accuracy
  12. - type: llm-rubric
  13. value: Rate the fluency of the translation of {{text}} from English to {{language}}
  14. metric: fluency
  15. - type: llm-rubric
  16. value: Rate the grammar of the translation of {{text}} from English to {{language}}
  17. metric: grammar
  18. options:
  19. provider:
  20. text: openai:gpt-4o-mini
  21. embedding: openai:embedding:text-embedding-3-small
  22. tests:
  23. - description: Default scoring function (geometric mean)
  24. vars:
  25. language: Spanish
  26. text: Hello, how are you today?
  27. assert:
  28. - type: similar
  29. value: Como estas?
  30. metric: similar
  31. - description: Python scoring function (accuracy only)
  32. vars:
  33. language: French
  34. text: The weather is beautiful today.
  35. assertScoringFunction: file://./override.py:calculate_score
  36. - description: JavaScript scoring function (minimum score)
  37. vars:
  38. language: German
  39. text: I love learning new languages.
  40. assert:
  41. - type: contains
  42. value: Bananas
  43. metric: banana
  44. assertScoringFunction: file://./override.js:overrideScoring
Tip!

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

Comments

Loading...