agentevals icon indicating copy to clipboard operation
agentevals copied to clipboard

Native evaluation can lose the Agent identity of captured tool activity

Open erauner12 opened this issue 1 month ago • 0 comments

Description

A trace can identify the Agent responsible for a tool call, yet native evaluation treats that activity as belonging to the generic agent identity. When the captured tool declarations belong to the named Agent, these identities disagree and evaluation can fail while constructing the judge prompt, before any judge request is sent.

This affects ordinary named Agents as well as multi-Agent traces. In a conversation, losing ownership also makes it difficult to associate earlier tool evidence with the right Agent. A complete, otherwise usable execution can therefore receive no grading verdict.

Expected behavior

Captured tool activity and the corresponding Agent context should agree on which Agent performed it. Native evaluation should accept legitimate named-Agent traces and distinguish different Agents throughout a conversation, including when they expose tools with the same name.

Steps to reproduce

  1. Capture a turn from a named Agent, such as support_agent, that calls a tool and records its available tool declarations.
  2. Convert the captured turn and evaluate it with a native ADK metric that uses Agent context.
  3. Observe that the tool activity can appear under agent while its declarations belong to support_agent.
  4. Native prompt construction fails because the tool activity's Agent cannot be found in that context, rather than producing a score for the execution.

Why this matters

Agent names should not determine whether an otherwise valid execution can be graded. We need to evaluate saved conversations reliably and judge each Agent against its own captured activity and available tools. An identity mismatch is an evaluation failure, not evidence of poor Agent behavior, and should not obscure the actual behavioral results.

Version information

Upstream main at 3520274, using native ADK evaluation. The failure occurs before model dispatch, so it does not depend on the selected judge model.

erauner12 avatar Nov 01 '26 23:11 erauner12