foundry_grader_score_model: Score-model grader

View source: R/evals.R

foundry_grader_score_modelR Documentation

Score-model grader

Description

Use a model to assign a numeric score to each row. Rows at or above pass_threshold pass. Scores fall within range, which defaults to c(0, 1).

Usage

foundry_grader_score_model(
  name,
  model,
  input,
  pass_threshold = NULL,
  range = NULL
)

Arguments

name

Character. Grader name.

model

Character. Deployment name of the scoring model.

input

List. A list of items from foundry_eval_item() (or a single item) forming the grading prompt.

pass_threshold

Numeric. Optional score at or above which a row passes.

range

Numeric vector of length 2. Optional score range. Defaults to c(0, 1) on the service when omitted.

Value

A named list describing a score_model grader.

Examples

foundry_grader_score_model(
  name = "helpfulness",
  model = "gpt-5-nano",
  input = list(
    foundry_eval_item("Rate helpfulness 0-1: {{sample.output_text}}")
  ),
  pass_threshold = 0.7
)

foundryR documentation built on Sept. 25, 2026, 1:10 a.m.