From 89e6441cbdb7d61260f99e0bbd793cab2d28b699 Mon Sep 17 00:00:00 2001 From: Mohamed Hessien Date: Mon, 3 Nov 2025 17:24:48 +0200 Subject: [PATCH] Relevance Evaluator: Support Conversational Format in specs Updated the dataMappingSchema to allow 'query' and 'response' to be either a string or an array of objects in Relevance Evaluator specs --- assets/evaluators/builtin/relevance/spec.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/assets/evaluators/builtin/relevance/spec.yaml b/assets/evaluators/builtin/relevance/spec.yaml index 367ef38adf..6f482eedbd 100644 --- a/assets/evaluators/builtin/relevance/spec.yaml +++ b/assets/evaluators/builtin/relevance/spec.yaml @@ -23,9 +23,17 @@ dataMappingSchema: type: "object" properties: query: - type: "string" + anyOf: + - type: "string" + - type: "array" + items: + type: "object" response: - type: "string" + anyOf: + - type: "string" + - type: "array" + items: + type: "object" required: ["query", "response"] outputSchema: relevance: @@ -33,4 +41,4 @@ outputSchema: desirable_direction: "increase" min_value: 1 max_value: 5 -path: ./evaluator \ No newline at end of file +path: ./evaluator