Scorers

Built-in scorers for evaluating AI outputs

Scorers define how AI outputs are evaluated. Scout provides built-in scorers for both human review (collecting feedback) and automated evaluation (programmatic checks).

Human Review Scorers

Human review scorers are used with the Feedback API to collect ratings from users.

thumbs

The thumbs scorer collects simple thumbs up/down feedback.

PropertyValue
Scorer IDthumbs
Score Values1 (thumbs up) or 0 (thumbs down)
Use CaseQuick binary feedback on AI responses

Example:

1{
2 "target_type": "workflow_run",
3 "target_id": "wfr_abc123",
4 "scorer_id": "thumbs",
5 "score": 1,
6 "metadata": {
7 "user_id": "user_456",
8 "workflow_id": "wf_xyz",
9 "session_id": "sess_789"
10 }
11}

Native Scorers

Native scorers are used for automated evaluation runs. They programmatically check workflow outputs against expected values, enabling you to test your AI workflows at scale.

Full evaluation documentation is coming soon. Native scorers will be used when running evaluation test suites against your workflows.

exact_match

Checks if the output exactly matches the expected value.

PropertyValue
Scorer IDexact_match
Score1 if exact match, 0 otherwise

Config Options:

case_sensitive
booleanDefaults to true

Whether the comparison should be case-sensitive.

strip_whitespace
booleanDefaults to false

Whether to strip leading/trailing whitespace before comparing.

Example:

1{
2 "scorer_id": "exact_match",
3 "config": {
4 "case_sensitive": false,
5 "strip_whitespace": true
6 }
7}

contains

Checks if the output contains the expected value as a substring.

PropertyValue
Scorer IDcontains
Score1 if contains, 0 otherwise

Config Options:

case_sensitive
booleanDefaults to true

Whether the search should be case-sensitive.

Example:

1{
2 "scorer_id": "contains",
3 "config": {
4 "case_sensitive": false
5 }
6}

regex_match

Checks if the output matches a regular expression pattern.

PropertyValue
Scorer IDregex_match
Score1 if pattern matches, 0 otherwise

Config Options:

pattern
stringRequired

The regular expression pattern to match against.

flags
string

Regex flags (e.g., "i" for case-insensitive).

Example:

1{
2 "scorer_id": "regex_match",
3 "config": {
4 "pattern": "^[A-Z][a-z]+$",
5 "flags": ""
6 }
7}

field_exists

Checks if a specific field exists in a JSON output.

PropertyValue
Scorer IDfield_exists
Score1 if field exists, 0 otherwise

Config Options:

field_path
stringRequired

Dot-notation path to the field (e.g., "response.data.id").

Example:

1{
2 "scorer_id": "field_exists",
3 "config": {
4 "field_path": "summary.title"
5 }
6}

type_check

Validates that the output is of the expected type.

PropertyValue
Scorer IDtype_check
Score1 if type matches, 0 otherwise

Config Options:

expected_type
stringRequired

The expected type: "string", "number", "boolean", "array", "object", or "null".

Example:

1{
2 "scorer_id": "type_check",
3 "config": {
4 "expected_type": "object"
5 }
6}

Choosing a Scorer

GoalRecommended Scorer
Collect user feedbackthumbs
Exact string matchingexact_match
Partial string matchingcontains
Pattern validationregex_match
Schema validation (field presence)field_exists
Type validationtype_check