Skip to main content
bt scorers manages Braintrust scorers from the CLI. Use bt scorers create to create prompt-based LLM scorers and classifiers. The other subcommands are aliases for bt functions scoped to scorers.

Subcommands

Examples

--messages, --choice-scores, --classifications, --metadata, and --response-format accept inline values, @PATH to read from a file, or - when piping content from stdin. Braintrust validates a scorer definition before saving it. Validation errors identify invalid or unsupported model parameters and may suggest a corrected value or recommend removing the parameter. With --json, validation errors appear in error.message.

Command-specific flags

Preprocessors

A preprocessor turns a trace into the messages a scorer receives for trace template variables such as {{preprocessed}}. In bt v0.26.0 or later, --preprocessor on bt scorers create accepts:
  • <SLUG>: A preprocessor pushed to the project, for example with bt preprocessors push.
  • global:<NAME>: A built-in preprocessor, for example global:thread.
  • @PATH: A local preprocessor file, inlined into the scorer. If the file exports more than one definition, select one with --preprocessor-export <NAME>, or --preprocessor-export default for the default export.
  • none: Disable preprocessing.
Without --preprocessor, the project’s default preprocessor applies.

Prompt options

bt scorers create also accepts prompt configuration flags: For shared function behavior and flags, see bt functions.