| foundry_grader_label_model | R Documentation |
Use a model to assign one of a fixed set of labels to each row, then treat a subset of those labels as passing. The model must support structured outputs.
foundry_grader_label_model(name, model, input, labels, passing_labels)
name |
Character. Grader name. |
model |
Character. Deployment name of a model that supports structured outputs. |
input |
List. A list of items from |
labels |
Character vector. The complete set of labels the model may assign. |
passing_labels |
Character vector. The labels that count as a pass. Must
be a subset of |
A named list describing a label_model grader.
foundry_grader_label_model(
name = "relevance-label",
model = "gpt-5-nano",
input = list(
foundry_eval_item("Is the answer relevant? {{sample.output_text}}")
),
labels = c("relevant", "irrelevant"),
passing_labels = "relevant"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.