The arguments for creating the refusal evaluator.
Optionalchoices?: ClassificationChoicesMapOptionalinputMapping?: ObjectMapping<RecordType>The mapping of the input to evaluate to the shape that the evaluator expects
Optionalname?: stringOptionaloptimizationDirection?: OptimizationDirectionOptionalpromptTemplate?: PromptTemplateOptionaltelemetry?: TelemetryConfigAn evaluator function that takes a RefusalEvaluationRecord and returns a classification result indicating whether the output is a refusal or an answer.
Creates a refusal evaluator function.
This function returns an evaluator that detects when an LLM refuses, declines, or avoids answering a user query. It is use-case agnostic: it only detects whether a refusal occurred, not whether the refusal was appropriate.