From 4d7d3c345716607f4aaf428434990e3702161906 Mon Sep 17 00:00:00 2001 From: kauabh <56749351+kauabh@users.noreply.github.com> Date: Thu, 29 Jan 2026 15:17:54 +0530 Subject: [PATCH 1/2] Update user_content initialization to None Change user_content initialization from empty string to None for better clarity. Added condition to skip evaluation when user input is None, as this is required for Evaluation --- src/google/adk/evaluation/evaluation_generator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/google/adk/evaluation/evaluation_generator.py b/src/google/adk/evaluation/evaluation_generator.py index 3656cec68c..acf0f33619 100644 --- a/src/google/adk/evaluation/evaluation_generator.py +++ b/src/google/adk/evaluation/evaluation_generator.py @@ -277,7 +277,7 @@ def convert_events_to_eval_invocations( invocations = [] for invocation_id, events in events_by_invocation_id.items(): final_response = None - user_content = "" + user_content = None invocation_timestamp = 0 app_details = None if ( @@ -306,6 +306,11 @@ def convert_events_to_eval_invocations( if p.function_call or p.function_response or p.text: events_to_add.append(event) break + + if user_content is None: + # We skip because an evaluation case without user input + # is generally not useful for testing/grading. + continue invocation_events = [ InvocationEvent(author=e.author, content=e.content) From d85d3f82f6ff73f9a3e3ed3df6afa3c7c4da27ce Mon Sep 17 00:00:00 2001 From: kauabh <56749351+kauabh@users.noreply.github.com> Date: Thu, 29 Jan 2026 15:30:51 +0530 Subject: [PATCH 2/2] Update src/google/adk/evaluation/evaluation_generator.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/google/adk/evaluation/evaluation_generator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/google/adk/evaluation/evaluation_generator.py b/src/google/adk/evaluation/evaluation_generator.py index acf0f33619..6dfee13068 100644 --- a/src/google/adk/evaluation/evaluation_generator.py +++ b/src/google/adk/evaluation/evaluation_generator.py @@ -306,7 +306,6 @@ def convert_events_to_eval_invocations( if p.function_call or p.function_response or p.text: events_to_add.append(event) break - if user_content is None: # We skip because an evaluation case without user input # is generally not useful for testing/grading.