Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Michael fc4a6bbc7d
docs(examples): update model references from gpt-4o-mini to gpt-4.1-mini (#4289)
2 months ago
..
360d7b519d
docs(examples): add uniform init commands to all example READMEs (#4068)
3 months ago
42ab66b096
feat(assertions): add custom assertion scoring functions (#3142)
6 months ago
42ab66b096
feat(assertions): add custom assertion scoring functions (#3142)
6 months ago
42ab66b096
feat(assertions): add custom assertion scoring functions (#3142)
6 months ago
fc4a6bbc7d
docs(examples): update model references from gpt-4o-mini to gpt-4.1-mini (#4289)
2 months ago

README.md

You have to be logged in to leave a comment. Sign In

assertion-scoring-override (Assertion Scoring Function Override Example)

You can run this example with:

npx promptfoo@latest init --example assertion-scoring-override

This example demonstrates different ways to define and override the default scoring function in promptfoo. It shows three patterns for implementing and referencing scoring functions:

  1. A global override in the defaultTest section of the config
  2. A named export in a JavaScript file
  3. A Python function export in a Python file

Getting Started

Initialize the example:

npx promptfoo@latest init --example assertion-scoring-override

Run the evaluation:

cd assertion-scoring-override
promptfoo eval

View the results:

promptfoo view
Tip!

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

Comments

Loading...