Skip to content

rubric_based_final_response_quality_v1 returns NOT_EVALUATED despite actual_invocation.final_response text #5732

Closed

Description

@txnguyen292

Summary

rubric_based_final_response_quality_v1 sometimes returns NOT_EVALUATED (eval_status: 3) with score: null and details.rubric_scores: null, even though the ADK eval result contains a non-empty actual_invocation.final_response.parts[0].text.

In the same invocation, rubric_based_tool_use_quality_v1 evaluates normally and returns rubric scores/rationales, so the eval run itself and LLM-as-judge path are partially working.

Environment

  • google-adk: 1.32.0
  • litellm: 1.82.6
  • google-genai: 1.73.1
  • Python: 3.13.5
  • Eval command shape:
adk eval src tests/eval/evalsets/job_scraper_core.json:itviec_immediate_goal_before_producer_scripting \
  --config_file_path tests/eval/eval_config_goal_contract.json \
  --log_level ERROR

Observed result excerpt

The eval case final status was passed:

{
  "eval_set_result_id": "src_job_scraper_core_1778989037.305544",
  "final_eval_status": 1
}

The actual invocation has a final response:

{
  "actual_invocation": {
    "final_response": {
      "role": "model",
      "parts": [
        {
          "text": "Extracted job count: 20\n\nArtifacts:\n- page workspace fixture: `page_2554f031654b` / `pages__page_2554f031654b__page.html`\n- sandbox audit: `sandbox_run_20260517_033632_dfda78d0`\n\nWhat happened:\n- Loaded the fixed ITviec AI Engineer Hanoi fixture.\n- Established the repeated job-card boundary with a bounded probe.\n- Confirmed 20 repeated listing cards and canonical job URL data in the fixture.\n- I have not yet written the required output files or finalized persistence.\n\nBlocker:\n- Extraction output generation is still pending."
        }
      ]
    }
  }
}

The tool-use rubric evaluated successfully:

{
  "metric_name": "rubric_based_tool_use_quality_v1",
  "score": 1.0,
  "eval_status": 1,
  "details": {
    "rubric_scores": [
      {
        "rubric_id": "uses_fixture_artifact",
        "score": 1.0,
        "rationale": "... Trace anchors: invocation_events[5], invocation_events[13], final_response."
      }
    ]
  }
}

But the final-response rubric did not evaluate:

{
  "metric_name": "rubric_based_final_response_quality_v1",
  "threshold": 0.85,
  "score": null,
  "eval_status": 3,
  "details": {
    "rubric_scores": null
  }
}

Expected behavior

If actual_invocation.final_response contains text, rubric_based_final_response_quality_v1 should either:

  1. evaluate and return per-rubric scores/rationales, or
  2. include diagnostic detail explaining why it was not evaluated.

Actual behavior

The metric returns NOT_EVALUATED with no explanation in details, making it difficult to distinguish between:

  • final response extraction issue,
  • judge invocation/parsing issue,
  • unsupported invocation shape,
  • timeout/provider issue,
  • or intentional evaluator skip.

Why this matters

For agent workflow evals, the final response quality metric is useful as an LLM-as-judge layer, but NOT_EVALUATED without diagnostic detail makes it hard to use as a reliable CI/development signal. The trace contains enough final response text for a judge pass, so the skip is surprising.

Request

Could ADK either:

  • make rubric_based_final_response_quality_v1 evaluate whenever actual_invocation.final_response has text, or
  • add diagnostic detail to the eval result explaining why the final-response judge returned NOT_EVALUATED?

A debug field such as not_evaluated_reason or judge parsing/provider error details would be very helpful.

Activity

  1. added
    eval
    on May 18, 2026
  2. llalitkumarrr commented on May 18, 2026

    @llalitkumarrr
    Collaborator

    Hello @txnguyen292 ,

    Could you please confirm if this issue is reproducible 100% of the time? If not what is the frequency? Additionally, we would like to know your observations if you remove rubric_based_tool_use_quality_v1 and only evaluate the final response using rubric_based_final_response_quality_v1.

    Furthermore, sharing your eval_config_goal_contract.json (test cases) would greatly help us analyze this issue. Lastly, please test using our latest version (google-adk==1.33.0) and share your results with us.

  3. txnguyen292 commented on May 20, 2026

    @txnguyen292
    Author

    Thanks, I tested the isolation cases you asked for and prepared a small share-safe repro package: adk-final-response-not-evaluated-share.tar.gz.

    Repro frequency

    With the deterministic repro package, this reproduces 100% of the time.

    • google-adk==1.32.x: reproduced 5/5
    • google-adk==1.33.0: reproduced 3/3

    In every run:

    Overall Eval Status: NOT_EVALUATED
    Metric: rubric_based_final_response_quality_v1, Status: NOT_EVALUATED, Score: None
    overall_score: null
    overall_eval_status: 3
    overall_rubric_scores: []
    

    Final-response-only test

    I removed rubric_based_tool_use_quality_v1 from the repro. The package evaluates only:

    "rubric_based_final_response_quality_v1"

    So the issue is not caused by interaction with the tool-use rubric metric.

    Minimal repro package

    The package contains:

    adk-final-response-not-evaluated-share/
    ├── eval_config.json
    ├── evalsets/final_response_repro.json
    ├── repro_agent/
    │   ├── __init__.py
    │   └── agent.py
    ├── run_adk_eval_repro.sh
    ├── sitecustomize.py
    └── requirements.txt
    

    Run:

    python -m pip install -r requirems.txt
    ./run_adk_eval_repro.sh

    To test the requested release exactly:

    python -m pip install --upgrade 'google-adk[eval]==1.33.0'
    ./run_adk_eval_repro.sh

    The repro uses a deterministic no-model ADK agent plus a deterministic fake judge response via sitecustomize.py. The fake judge returns valid-looking Property: / Evidence: / Rationale: / Verdict: blocks, but intentionally shortens each Property: line. This isolates the parser/matching behavior from provider randomness.

    Concrete example

    One configured rubric in the repro uses this full text_property:

    The final response truthfully states whether the current boundary goal was validated or blocked and does not claim full extraction, finalization, or persistence. Evaluator rationale instruction, not an agent-response requirement: when you write your rationale, include a `Trace anchors:` clause citing `invocation_events[N]`, `final_response`, or `none found for <claim>`. Do not score the agent on whether it wrote trace anchors.
    

    The deterministic judge returns this shortened property:

    Property: The final response truthfully states whether the current boundary goal was validated or blocked and does not claim full extraction, finalization, or persistence.
    

    That is the same scoring criterion, but it omits the evaluator-instruction suffix. ADK parses the block, but does not match it to the configured rubric because the configured key is the full normalized text_property.

    A paraphrased judge property would have the same problem, for example:

    Property: The response accurately reports the boundary validation status and avoids claiming extraction or persistence was completed.
    

    Diagnosis

    The failure appears to be in rubric response matching, not in agent execution.

    In google/adk/evaluation/rubric_based_evaluator.py, convert_auto_rater_response_to_score() builds a map keyed by normalized full rubric text:

    _normalize_text(r.rubric_content.text_property)

    Then it parses the judge response and looks up each returned:

    _normalize_text(rubric_response.property_text)

    If the judge shortens or paraphrases the Property: text, ADK parses the response successfully but cannot match the returned property to the configured rubric. It logs that the rubric was not found, drops the rubric score, and the aggregate score becomes None, yielding NOT_EVALUATED.

    So the issue is reproducible whenever the judge does not echo the full text_property exactly enough after normalization. A more robust approach might be to have the judge return and the parser match on stable rubric_id, while preserving unmatched raw judge output in diagnostics.

    adk-final-response-not-evaluated-share.tar.gz

  4. llalitkumarrr commented on May 20, 2026

    @llalitkumarrr
    Collaborator

    Hello @txnguyen292 ,

    We were unable to reproduce the issue; the process worked as expected during our testing. Instead of using your exact code, we ran a test using an agent with a tool and 'gemini-2.5-flash' as the judge model. Everything functioned as intended.

    Could you please refer to samples below and let us know if these are of any help?

    Agent:

    from google.adk.agents import Agent
    from google.genai import types
    from google.adk.tools.function_tool import FunctionTool
    
    
    def fruit_choice_help_tool(required_health_benifits:str) -> str:
        """
        This tool helps users to choose the best fruit based on their health benifits.
    
        Args:
            required_health_benifits: The health benifits the user is looking for. Choose between "Immunity", "Digestion", "Energy", "Skin"
    
        Returns:
            str: The best fruit based on the user's health benifits.
    
        """
        if required_health_benifits == "Immunity":
            return "Orange"
        elif required_health_benifits == "Digestion":
            return "Pineapple"
        elif required_health_benifits == "Energy":
            return "Banana"
        elif required_health_benifits == "Skin":
            return "Strawberry"
        else:
            return "No fruit found for the given health benifits."
        
    
    fruit_tool = FunctionTool(fruit_choice_help_tool)
    
    
    root_agent = Agent(
        name = "root_agent",
        model = "gemini-2.5-flash",
        tools = [fruit_tool],
        description = "This agent helps users to choose the best fruit based on their health benifits, but it can only answer questions related to health benifits of fruits. For any other questions, it will say no.",
        instruction = "You are a helpful assistant that can help users choose the best fruit based on their health benifits. First validate the input and only then use the tool.",
        
    )
    
    

    test file:

    {
      "eval_set_id": "fruit_health_benefits_agent_final_output_only",
      "name": "Fruit Agent Final Output Test",
      "description": "Minimal evaluation set focusing only on final model responses for fruit health benefit selection.",
      "eval_cases": [
        {
          "eval_id": "immunity_case",
          "conversation": [
            {
              "invocation_id": "case-1",
              "user_content": {
                "parts": [
                  {
                    "text": "Which fruit is best for Immunity?"
                  }
                ],
                "role": "user"
              },
              "final_response": {
                "parts": [
                  {
                    "text": "Orange"
                  }
                ],
                "role": "model"
              },
              "intermediate_data": {
                "tool_uses": [],
                "intermediate_responses": []
              }
            }
          ],
          "session_input": {
            "app_name": "fruit_health_agent",
            "user_id": "test_user",
            "state": {}
          }
        },
        {
          "eval_id": "digestion_case",
          "conversation": [
            {
              "invocation_id": "case-2",
              "user_content": {
                "parts": [
                  {
                    "text": "I need something good for Digestion"
                  }
                ],
                "role": "user"
              },
              "final_response": {
                "parts": [
                  {
                    "text": "Pineapple"
                  }
                ],
                "role": "model"
              },
              "intermediate_data": {
                "tool_uses": [],
                "intermediate_responses": []
              }
            }
          ],
          "session_input": {
            "app_name": "fruit_health_agent",
            "user_id": "test_user",
            "state": {}
          }
        },
        {
          "eval_id": "energy_case",
          "conversation": [
            {
              "invocation_id": "case-3",
              "user_content": {
                "parts": [
                  {
                    "text": "Suggest a fruit for Energy boost"
                  }
                ],
                "role": "user"
              },
              "final_response": {
                "parts": [
                  {
                    "text": "Banana"
                  }
                ],
                "role": "model"
              },
              "intermediate_data": {
                "tool_uses": [],
                "intermediate_responses": []
              }
            }
          ],
          "session_input": {
            "app_name": "fruit_health_agent",
            "user_id": "test_user",
            "state": {}
          }
        },
        {
          "eval_id": "skin_case",
          "conversation": [
            {
              "invocation_id": "case-4",
              "user_content": {
                "parts": [
                  {
                    "text": "What fruit helps for Skin health?"
                  }
                ],
                "role": "user"
              },
              "final_response": {
                "parts": [
                  {
                    "text": "Strawberry"
                  }
                ],
                "role": "model"
              },
              "intermediate_data": {
                "tool_uses": [],
                "intermediate_responses": []
              }
            }
          ],
          "session_input": {
            "app_name": "fruit_health_agent",
            "user_id": "test_user",
            "state": {}
          }
        },
        {
          "eval_id": "invalid_case",
          "conversation": [
            {
              "invocation_id": "case-5",
              "user_content": {
                "parts": [
                  {
                    "text": "Which fruit is good for Brain power?"
                  }
                ],
                "role": "user"
              },
              "final_response": {
                "parts": [
                  {
                    "text": "No fruit found for the given health benifits."
                  }
                ],
                "role": "model"
              },
              "intermediate_data": {
                "tool_uses": [],
                "intermediate_responses": []
              }
            }
          ],
          "session_input": {
            "app_name": "fruit_health_agent",
            "user_id": "test_user",
            "state": {}
          }
        },
        {
          "eval_id": "out_of_scope_case",
          "conversation": [
            {
              "invocation_id": "case-6",
              "user_content": {
                "parts": [
                  {
                    "text": "Tell me about the capital of France"
                  }
                ],
                "role": "user"
              },
              "final_response": {
                "parts": [
                  {
                    "text": "No"
                  }
                ],
                "role": "model"
              },
              "intermediate_data": {
                "tool_uses": [],
                "intermediate_responses": []
              }
            }
          ],
          "session_input": {
            "app_name": "fruit_health_agent",
            "user_id": "test_user",
            "state": {}
          }
        }
      ]
    }
    
    

    Config file:

    {
      "criteria": {
        "rubric_based_final_response_quality_v1": {
          "threshold": 0.85,
          "judge_model_options": {
            "judge_model": "gemini-2.5-flash",
            "num_samples": 1
          },
          "rubrics": [
            {
              "rubric_id": "final_response_correctness",
              "rubric_content": {
                "text_property": "The final response correctly answers the user query and is consistent with the information available in invocation_events and tool_responses. It must not contain hallucinated facts or unsupported claims."
              }
            },
            {
              "rubric_id": "tool_usage_correctness",
              "rubric_content": {
                "text_property": "If tools are used, the response must correctly reflect tool_calls and tool_responses. The model should not fabricate tool outputs and should use tools only when necessary."
              }
            },
            {
              "rubric_id": "trace_grounding",
              "rubric_content": {
                "text_property": "The final response must be grounded in invocation_events and intermediate_data. Evaluator rationale must include Trace anchors referencing invocation_events[N], final_response, or tool responses when applicable."
              }
            },
            {
              "rubric_id": "completeness",
              "rubric_content": {
                "text_property": "The final response should fully address all parts of the user request without omitting required information or partial answers."
              }
            },
            {
              "rubric_id": "no_overclaiming",
              "rubric_content": {
                "text_property": "The response must not claim actions that were not performed, such as successful tool execution when no corresponding tool_response exists."
              }
            }
          ]
        }
      }
    }
    
    

    Final observations:

    Eval Run Summary
    fruit_health_benefits_agent_final_output_only:
      Tests passed: 5
      Tests failed: 1
    
  5. added
    request clarification
    on May 20, 2026
  6. txnguyen292 commented on May 20, 2026

    @txnguyen292
    Author

    Thanks for checking this. I think your fruit example is a useful sanity check for the happy path, but I do not think it exercises the failure mode in this issue.

    The issue I am reporting is not that rubric_based_final_response_quality_v1 always fails. It works when the judge echoes the configured text_property closely enough.

    The reproducible failure is more specific:

    1. ADK sends the rubric prompt to the judge.
    2. The judge returns a structurally valid rubric response with Property:, Evidence:, Rationale:, and Verdict: blocks.
    3. The returned Property: line is shortened or paraphrased rather than echoing the full configured text_property.
    4. ADK parses the judge response, but then matches returned properties back to rubrics by normalized full text_property text.
    5. Because the shortened/paraphrased property no longer matches the configured full property, the rubric score is dropped.
    6. If all rubric matches fail, the aggregate score becomes None, so the result is NOT_EVALUATED.

    So a simple example with short rubric properties can pass, especially if the judge echoes the properties closely. That is consistent with your result. In larger trace-heavy evals, the rubric properties are often longer and may include evaluator-only instructions or evidence-anchor requirements. That makes it much more likely that the judge will shorten the Property: line while still returning a valid judgment.

    The attached package isolates that exact parser/matching condition deterministically. It does not depend on provider randomness: sitecustomize.py makes the judge return valid-looking rubric blocks while intentionally shortening each Property: line.

    Minor correction to my previous command: I had a typo. It should be:

    python -m pip install -r requirements.txt
    ./run_adk_eval_repro.sh

    Could you please run the attached package exactly as-is? The expected behavior is that ADK returns NOT_EVALUATED even though the fake judge response contains parseable verdicts, because the returned Property: text does not exactly match the configured full text_property.

    The behavior I would hope for is either:

    • match judge results by stable rubric_id instead of free-text Property:, or
    • at minimum preserve unmatched raw judge output in the eval result diagnostics so users can see that the judge responded but ADK could not map the response back to rubrics.
  7. llalitkumarrr commented on Jun 11, 2026

    @llalitkumarrr
    Collaborator

    We apologize for the misunderstanding and the delayed response. Have you tried using google-adk==1.35.0, and did you observe the same behavior?

  8. added a commit that references this issue on Jun 16, 2026
    fe56f31
  9. added a commit that references this issue on Aug 11, 2026
    abcdf24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

evalrequest clarification

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions