Skip to content

Mock AgentCore GetEvaluator and Evaluate - #362

Open
Haotian-Hu wants to merge 1 commit into
open-telemetry:mainfrom
Haotian-Hu:mock-agentcore-evaluations
Open

Haotian-Hu wants to merge 1 commit into
open-telemetry:mainfrom
Haotian-Hu:mock-agentcore-evaluations

Conversation

@Haotian-Hu

Copy link
Copy Markdown

Adds deterministic mock routes for the AWS Bedrock AgentCore evaluation APIs, GetEvaluator (control plane) and Evaluate (data plane), next to the existing AgentCore memory routes.

The aws-bedrock-agentcore reference scenario in open-telemetry/semantic-conventions-genai needs them to show how gen_ai.evaluation.result events, including the evaluator's rating scale, are captured from AgentCore (open-telemetry/semantic-conventions-genai#590). The evaluator returns a numerical 1–5 rating scale and Evaluate returns one result with a value, label and explanation.

@Haotian-Hu
Haotian-Hu requested a review from a team as a code owner October 22, 2026 16:32
Copilot AI balanced review requested due to automatic review settings October 22, 2026 16:32
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Haotian-Hu / name: Haotian Hu (fc5b3eb)

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-10-23 20:44 UTC

Respond to 2 review items (e.g. link a commit, explain why not, ask a follow-up):

  • Inline threads: 1
  • Top-level threads: 2
Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with reviewers? Comment /dashboard route:reviewers to route it to them.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The additions are straightforward and deterministic, with only a non-blocking suggestion to strengthen payload regression coverage.

1 open issue
What changed in this PR

Adds deterministic AgentCore evaluation responses to the GenAI mock server, supporting the reference scenario’s capture of evaluation results and rating scales.

Changes:

  • Adds GetEvaluator with a numerical rating scale and Evaluate with a fixed result.
  • Adds both routes to the determinism tests.
  • Documents evaluator lookup and evaluation support.
File Description
tools/​gen-ai/​mock-server/​tests/​test_mock_server.py Adds deterministic-response checks for both routes.
tools/​gen-ai/​mock-server/​src/​genai_mock_server/​bedrock_agentcore.py Implements evaluator lookup and evaluation responses.
tools/​gen-ai/​mock-server/​README.md Documents the added AgentCore capabilities.

Review effort: Balanced

Comment on lines 208 to 209
]

@prasadovhal

Copy link
Copy Markdown

@Haotian-Hu
Thanks for adding the AgentCore evaluation mock routes. The implementation looks reasonable for the reference scenario.

One small API-fidelity point: AWS defines context as a required field in EvaluationResultContent, but the mocked evaluationResults entry doesn't include it.

Could we add a minimal spanContext using the session and trace identifiers from the scenario? That would keep the mock aligned with the AWS response contract and make the evaluated-target correlation explicit.

This seems like a small addition that could fit alongside the existing suggestion to strengthen the payload assertions.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants