File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_common Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -204,12 +204,15 @@ def converter(conversation: Dict) -> List[DerivedEvalInput]:
204204 for each_turn in messages :
205205 if "role" in each_turn and "content" in each_turn :
206206 content = each_turn ["content" ]
207- if not isinstance (content , str ) or not content .strip ():
208- continue # Skip invalid content
207+ if not isinstance (content , str ):
208+ continue # Skip non-string content
209+ # Allow empty content for user messages (needed for GroundednessProEvaluator compatibility)
210+ # but skip empty assistant responses as they provide no evaluable content
209211 if each_turn ["role" ] == "user" :
210212 queries .append (each_turn )
211213 elif each_turn ["role" ] == "assistant" :
212- responses .append (each_turn )
214+ if content .strip (): # Only skip empty assistant responses
215+ responses .append (each_turn )
213216
214217 # Handle mismatched queries and responses gracefully
215218 eval_inputs = []
You can’t perform that action at this time.
0 commit comments