The arguments for creating the retrieval relevance 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 RetrievalRelevanceEvaluationRecord and returns a classification result indicating whether the retrieved information is relevant or irrelevant to the request.
Creates a retrieval relevance evaluator function.
This function returns an evaluator that determines whether the external information retrieved during a step is relevant to the request it was serving. Unlike createDocumentRelevanceEvaluator, which judges a single document against a question, this evaluator is source-agnostic and scores the retrieved information as a whole (holistically, per retrieval step), whether it came from a vector search, a tool or MCP call, a web search, or content embedded in an LLM turn.