Share
Evaluate it (Score real sessions with AgentCore Evaluations) | Learn Amazon Bedrock AgentCore with Kiro 08
This Level 300 deck shows how to evaluate an agent that can give a different answer to the same request: cases built from real failures, scoring by the outcome with the tool order checked only where it matters, and the built-in and custom evaluators of Amazon Bedrock AgentCore Evaluations with its three ways to run (on-demand, online and batch). On the help desk agent of a made-up online electronics shop, it scores one inquiry on the spot, keeps scoring production with an online evaluation, and compares two versions of the instructions in batch with references, shown with figures of what happened and real terminal output, as deck 08 (Observe and improve) of the series Learn Amazon Bedrock AgentCore with Kiro.
Riku INADA PRO
Annual Pro sale · Save $30
Have presentations of your own?
Share with private links, password protection, and more control over your work.
Transcript
37 slides
-
Learn Amazon Bedrock AgentCore with Kiro 08 Observe and improve
Level 300 Evaluate it Score real sessions with AgentCore Evaluations 08 As of November 2026 (AgentCore CLI 1.0.2) November 2026 Riku Inada Amazon Web Services Japan © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kiro + AgentCore 1 -
Introduction About me Riku Inada Amazon Web Services Japan G.K.
Solutions Architect Works mainly with manufacturing customers Recent work Promoting the AI-Driven Development Life Cycle (AI-DLC) Writing and speaking about Kiro and AWS Amplify © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. X @inada_riku Speaker Deck speakerdeck.com/inariku Zenn zenn.dev/inariku GitHub github.com/inariku 2 -
Introduction Where this deck fits You are here: 08 Evaluate
it. Next: 09 Keep improving Get started 01–02 Build it out 03–06 Observe and improve Make it 07–09 Govern and share Read first 10–12 Secure the way in 01 How AgentCore works 03 remember 07 See what it did 10 and the way out 02 Get more from Runtime 04 Connect tools 08 Evaluate it tool calls 11 Stop with rules Let it compute 05 and browse Read next 09 Keep improving Find and share 12 across teams Build it 06 from config © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 3 -
Introduction What you'll learn, and what you need first Score
the help desk in production, on every conversation 1 The words: case, trial, evaluator, transcript, outcome 2 Three ways to run: on-demand, online and batch 3 Good cases: from real failures. Scoring: by outcome, order only where needed Before you start: the help desk deployed in deck 01, and how to read its traces (deck 07) To try the commands, use the AgentCore CLI template agent. The ledger evaluator works only with this desk The words 3 ways to run Cases, scoring Case, evaluator, On-demand, online, Built from failures, transcript, outcome batch grade the outcome © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 4 -
1 How evaluation works © 2026, Amazon Web Services, Inc.
or its affiliates. All rights reserved. 5 -
Part 1 How evaluation works One good run is not
enough Same request, different answers. Fixing only on complaints breaks others Please refund my earbuds Same request, 2 answers Run 1: refund © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. Run 2: question 6 -
Part 1 How evaluation works The words of evaluation Run
each case a few times. An evaluator scores its transcript or outcome Case Trial (task) Transcript Evaluator (session traces) (grader) A request and Run it once. Every tool call Scores the what success is Run it many times and answer transcript or outcome It says “Refunded,” but the ledger has no refund: a fail Outcome (for requests that change state, like bookings and refunds) The ledger at the end © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 7 -
Part 1 How evaluation works Evaluate before and after you
ship Check before you ship, watch production after, and turn failures into cases Local Fix and AWS If it passes Gate before AWS (this deck's focus) Ship (deploy) Watch run locally shipping production Run cases and fix Run cases on the new Keep scoring production (Strands deck 07) version, score in batch with online evaluation Add the failures found in production as cases (slide 24) © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 8 -
Part 1 How evaluation works How AgentCore Evaluations works Traces
become one format, and a judge model or your code scores them AgentCore Evaluations Help-desk agent (AgentCore Runtime) Standard spans Spans in a CloudWatch log group Turns them into Evaluator one format A judge model Scores, reasons to CloudWatch or your own code (Lambda) It reads frameworks that write their records in the OpenTelemetry or OpenInference format (Strands Agents, LangGraph and others. On Runtime, the tracing adds the session ID) © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 9 -
Part 1 How evaluation works Score at 3 levels: tool
call, answer, session The whole session (SESSION) Goal achieved? (GoalSuccessRate) One answer (TRACE) Helpfulness Conciseness Correctness Coherence Faithfulness Refusal InstructionFollowing Harmfulness ResponseRelevance Stereotyping One tool call (TOOL_CALL) ToolSelectionAccuracy ToolParameterAccuracy A custom evaluator also picks one of these 3 levels The figure shows the 13 built-ins at general availability, March 2026 (list: appendix A4; their settings are fixed). Later, 2 Skill evaluators and 1 failure analysis evaluator were added (not covered here) © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 10 -
Part 1 How evaluation works Three ways to run One
on the spot, production all along, or many at once on-demand online batch One, on the spot Production, always Many at once Scores the inquiry you Scores a set share of Scores up to 500 sessions choose, right away. For inquiries as each ends. from the records. Compare building, or a complaint Results in CloudWatch before and after a change dataset (preview): the SDK calls the desk with set cases, waits for the records, and scores them © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 11 -
2 Score the help desk © 2026, Amazon Web Services,
Inc. or its affiliates. All rights reserved. 12 -
Part 2 Score the help desk The 6 cases, and
versions 1 and 2 Request (summary) What the desk must do c1 Ichiro Suzuki: refund my late keyboard Refund ¥15,800 c2 Hanako Yamada: return the earbuds that arrived Refund ¥9,800 c3 Hanako Yamada: refund the USB-C hub, still shipping No refund; say it arrives November 11 c4 Ichiro Suzuki: ¥20,000 back for the delay No more than the order amount, ¥15,800 c5 Hanako Yamada: refund ORD-5390, someone else's order No refund for another person's order c6 Hanako Yamada: how are my orders? Answer without the refund tool Version 1 has deck 01's instructions. Version 2 adds 2 lines (translated from the Japanese prompt): “Refund only a verified customer's orders that arrived or are late, up to the order amount. If an order qualifies, refund it without asking the customer first” “Do not refund an order that is still shipping. Tell the expected delivery date” © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 13 -
Part 2 Score the help desk A question instead of
a refund: goal score 0 Customer (c2) Translated from the Japanese run …I want to return the wireless earbuds AgentCore Evaluations (ORD-5521) that arrived. Please refund them. The help-desk agent (version 1, AgentCore Runtime) …May I go ahead with the refund for the 1 0 (No) wireless earbuds (ORD-5521, ¥9,800, delivered November 2)? If that is fine, I will refund ¥9,800 right away. Goal achieved? 2 Helpful? 0.83 Tools: looked up the customer and orders. The refund tool was not called Screen: one session (one inquiry) scored on the spot by 2 evaluators (full commands: appendix A2) 1 The goal was not achieved (0, No) 2 Helpfulness is high (0.83) © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 14 -
Part 2 Score the help desk Two evaluators read one
answer differently Answer (c2) 1 Goal achieved? (GoalSuccessRate) 0 (No) Why: the refund is “NOT Done”. process_refund was never called “…May I go ahead with the refund?” Translated from the Japanese run 2 0.83 Helpful? (Helpfulness) Why: “confirming before executing is good practice” The shop's rules decide which is right. Version 2 says: refund without asking when it qualifies Evaluators can be wrong too. On one benchmark, fixing grading bugs took a score from 42% to 95% The key phrase of each of the 2 reasons 1 The refund tool was never called 2 © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. Confirming first is good practice 15 -
Part 2 Score the help desk Each live inquiry is
scored after it ends 3 Live inquiries A customer asks Session end 4 evaluators 5 minutes after the last turn, it is scored as one 1 Running (ENABLED) 2 Scores 100% of inquiries CloudWatch Result logs Score metrics (slide 17) Add it with agentcore add online-eval. agentcore deploy creates the config on AWS Screen: the online config on AWS, read back (full commands: appendix A2) 1 Running © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2 Scores 100% of the inquiries 3 Session end after 5 minutes (console default: 15) 16 -
Part 2 Score the help desk Online scoring gave No
to 3 correct answers 1 c1 c2 c3 c4 c5 c6 Refunded Refunded Refused: Refunded Refused: Answered with ¥15,800 ¥9,800 still shipping ¥15,800 only not their order the order status Yes Yes No No No Yes No: the customer did not get what was asked. To check a refusal, pass a reference in batch (slide 25) Results go to CloudWatch: logs (a score and a reason per inquiry) and score metrics Screen: online results read from the logs; version 2's 3 No rows kept (full commands: appendix A3) 1 © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. c3, c4 and c5 got No (no reference) 17 -
Part 2 Score the help desk Custom evaluators Give a
judge model your criteria, or write the check as Lambda code Give a judge model your criteria Score with your own code (Lambda) Instructions (with placeholders like {context}) Receives the inquiry's spans Model (a model on Amazon Bedrock) Returns a label and a value Scoring (pass/fail, or a 5-point scale) Fixed rules, checks against a ledger Example: make no unchecked promises Example: does the refund match the ledger? Evaluators used online cannot use reference fields, and cannot be edited while the config is enabled © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 18 -
Part 2 Score the help desk Both custom evaluators passed
the ¥15,800 refund Customer (c4) Translated from the Japanese run …My keyboard (ORD-5390) was late. Please 1 Pass give me ¥20,000 back as an apology. The help-desk agent (version 2, AgentCore Runtime) …Refunds go up to the order amount, so I will process a refund of ¥15,800. 3 Within the refund rules 2 Promise evaluator (model) The refund of ¥15,800 is complete. … Screen: the 2 custom evaluators' results for version 2, c4 (full commands: appendix A3) 1 2 3 The ledger evaluator's reason (translated): Ledger evaluator (Lambda) pass Ledger evaluator: Pass Promise evaluator: pass Refund as in the ledger: ¥15,800 to ORD-5390 The refund tool does not record refunds, so the evaluator checks the tool's order and amount against the ledger © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 19 -
3 Good cases and scoring © 2026, Amazon Web Services,
Inc. or its affiliates. All rights reserved. 20 -
Part 3 Good cases and scoring Grade the outcome; check
order only where needed Path A Check the customer Look up the order Refund A ledger that records refunds A ¥15,800 refund on ORD-5390 Path B Look up the order Check the customer Refund Outcome evaluator TrajectoryExactOrderMatch (same tools, same order) fails path B Paths A and B both pass Requiring one fixed order fails other correct paths. Check the order only where it matters 3 trajectory evaluators: exact order only, in order with others between, any order. None uses a model © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 21 -
Part 3 Good cases and scoring Three ways to write
the reference Expected answer What must be true Expected tool order expectedResponse assertions expectedTrajectory Unit: one answer (trace) Unit: the whole session Unit: the whole session Evaluator: is it correct? Evaluator: goal achieved? Evaluators: 3 trajectory (Correctness) (GoalSuccessRate) matches (no model calls) Expected answer, example “I refunded ¥15,800 for ORD-5390” Assertion given for c4 “Do not refund more than the order amount, ¥15,800” Tool order, example lookup_customer → process_refund (in order, others allowed) All optional. You can pass all three at once; the result lists the ones no evaluator used References work with on-demand and batch, not online. The batch on slide 25 passed them per case © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 22 -
Part 3 Good cases and scoring Succeeding every time At
75% per run, 3 successes in a row happen only about 42% of the time Run one case 3 times on a desk that succeeds 75% of the time Trial 1 75% Trial 2 75% Trial 3 pass@3 75% Succeeds at least once in 3 For a desk that serves customers, pass^3 watch the all-trials pass rate (pass^k) Succeeds all 3 times about 98% about 42% 0.75 × 0.75 × 0.75 ≈ 0.42 © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 23 -
Part 3 Good cases and scoring Build cases from real
failures 20 to 50 from failure records, with cases to act and cases not to act Inquiry and complaint records Pick the failures Start with 20 to 50 cases When to act, and when not to Score the cases not to act in batch, with references (assertions): with no reference, slide 17 gave them No © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 24 -
Part 3 Good cases and scoring Version 2: goal average
from 0.67 to 1.00 6 cases Run versions 1 and 2 Batch, with references Line up by case c1 c2 c3 c4 c5 c6 Goal average No Yes Yes Yes 0.67 Yes 2 Yes Yes Yes 1.00 Version 1 As in deck 01 Yes No Version 2 +2 rule lines Yes Yes 1 3 The 2 batch jobs One trial per case © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1 2 c2: No → Yes, refunded c3: No → Yes, gave the date 3 Average: 0.67 → 1.00 25 -
Part 3 Good cases and scoring User simulation Give a
persona and a goal, then see behavior no script covers Actor model Evaluator Plays the customer (actor profile) Goal: a replacement laptop Help-desk agent shipped within 2 business days Tone: frustrated but polite Many turns, up to a limit Answers questions Goal achieved? (with assertions) no script covers Used with the SDK dataset runners (dataset evaluation is in preview). The actor model costs extra © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 26 -
Part 3 Good cases and scoring Clean up: delete the
batch jobs, keep online Clean-up commands # Delete the trial batch jobs (the result logs they wrote stay) aws bedrock-agentcore delete-batch-evaluation --batch-evaluation-id <batch ID> # To stop online: enableOnCreate false in agentcore.json, then agentcore deploy # To delete it: agentcore remove online-eval --name DeskOnline, then agentcore deploy Keep (deck 09 uses them) Delete The online config DeskOnline The 2 trial batch jobs While it runs, it scores every inquiry The result logs they wrote stay and uses judge tokens Not deleted yet when this deck was made 2 custom evaluators (promise, ledger) The list as it is now: appendix A5 © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 27 -
Summary Summary Build cases from failures, and grade the outcome
① The words ② Three ways to run ③ Cases from failures, scored by outcome Live sessions Read the scores Failures to cases Compare versions Online evaluators With the reasons, in Add references, Line up in batch, score each inquiry CloudWatch logs grade the outcome ship if better Score the shipped version in production again © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 28 -
Summary Read next To turn scores into fixes, read deck
09 09 07 Another series Keep improving See what it did Strands Agents deck 07 Turn scores into fixes, How to read the traces Run evaluations check them with batch that evaluators read locally, before you ship and A/B tests © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 29 -
Appendix A1 Limits and units of cost Item Value Evaluation
configs Up to 1,000 per Region Tokens In large Regions, up to 1 million input and output tokens a minute per account Online evaluators Up to 25 per config (10 with agentcore add online-eval) On-demand results Up to 10 per call (the newest 10) Batch jobs Up to 500 sessions per job (the newest 500 when there are more) Built-in evaluators $0.0024 per 1,000 input tokens, $0.012 per 1,000 output tokens Custom evaluators $1.50 per 1,000 runs (the judge model is billed separately) Batch scoring 25% off the Evaluations prices Built-in evaluators called in Tokyo may be processed in another Region in the same geography © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 30 -
Appendix A2 Full commands (screens on slides 14 to 16)
AgentCore CLI 1.0.2 and jq (run in the help desk's project folder) # 14: one inquiry, scored on the spot by 2 built-in evaluators agentcore eval ondemand evaluate \ --agent acdecks08SupportDesk_default_agent-6Epq8659Zm \ --session-ids acdecks08-v1-c2-1110-0541-evaluation-case \ --evaluators Builtin.GoalSuccessRate Builtin.Helpfulness --json > runs/v1/c2.json jq -r '.results[] | "\(.evaluatorId) \(.value) \(.label)"' runs/v1/c2.json # 15: pick the key phrase out of each evaluator's reason jq -r '.results[] | .evaluatorId, " " + ([.explanation | scan("NOT Done \\([^)]*\\)|confirming before executing is good practice")] | join(" "))' runs/v1/c2.json # 16: read the online config on AWS agentcore eval online-eval get \ --id acdecks08SupportDesk_default_DeskOnline-txMVuqBn0n --json \ | jq '{executionStatus, rule, evaluators: [.evaluators[].evaluatorId]}' © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 31 -
Appendix A3 Full commands (screens on slides 17, 19 and
25) AgentCore CLI 1.0.2, jq and python3 (run in the help desk's project folder) # 17: read version 2's goal scores from the online results in the logs agentcore eval online-eval logs \ --id acdecks08SupportDesk_default_DeskOnline-txMVuqBn0n --since 1h --json \ | jq -r '.message | fromjson | .attributes | select(."session.id" | test("v2")) | select(."gen_ai.evaluation.name" == "Builtin.GoalSuccessRate") | "\(."session.id") \(."gen_ai.evaluation.score.label")"' | sort # 19: the 2 custom evaluators' results (version 2, c4) and the ledger evaluator's reason jq -r '.results[] | "\(.evaluatorName) \(.label) \(.value)"' runs/v2/c4.json jq -r '.results[0].explanation' runs/v2/c4.json # 25: line up the 2 batch results by case (compare_en.py was written for this deck) python3 compare_en.py acdecks08_v1-babbc47d8c acdecks08_v2-79da86fff1 © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 32 -
Appendix A4 Screen: the built-in evaluators (slide 10) © 2026,
Amazon Web Services, Inc. or its affiliates. All rights reserved. 33 -
Appendix A5 Screen: what is left (slide 27) The 2
batch jobs were not deleted yet when this deck was made. The online config stays for deck 09 Full commands (read the lists, print only the names and states) agentcore eval batch-evaluation list --json | jq -r '.batchEvaluations[] | select(.batchEvaluationName | test("acdecks08")) | "\(.batchEvaluationId) \(.status)"' agentcore eval online-eval list --json | jq -r '.onlineEvaluationConfigs[] | "\(.onlineEvaluationConfigName) \(.executionStatus)"' © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 34 -
Appendix A6 Partial credit Check the customer, look up the
order, refund. Score partial progress too Check the customer Desk A Score 1.0 Desk B Score 0.67 Desk C Score 0 Look up the order Refund Fails here Fails here The built-in GoalSuccessRate is pass or fail (Yes or No). For partial credit, a custom evaluator returns a value per step © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 35 -
Appendix A7 Glossary Term Meaning Term Meaning Case (task) A
request and what success is on-demand Scores chosen records now Trial One run of a case online Keeps scoring production Evaluator What gives the score (grader) batch Scores records in bulk Judge model The model that scores ground truth A reference to score against Transcript One trial's record (session) assertions Statements that must hold Outcome The state at the end pass^k All k trials succeed session One whole inquiry SESSION level Scores a whole inquiry span One tool or model call TOOL_CALL level Scores one tool call © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 36 -
Appendix A8 Sources AWS, AgentCore Developer Guide: Evaluations and more
(slides 4, 7–11, 14–19, 21, 22, 25–28, 30, 33) docs.aws.amazon.com/bedrock-agentcore/latest/devguide/evaluations.html AWS, Amazon Bedrock AgentCore pricing aws.amazon.com/bedrock/agentcore/pricing/ (slide 30) AWS, December 2025, AgentCore adds evaluations and policy (aws.amazon.com/blogs/aws/) (slides 8, 17) Title: Amazon Bedrock AgentCore adds quality evaluations and policy controls for deploying trusted AI agents AWS, March 2026, AgentCore Evaluations is generally available (What's New) aws.amazon.com/about-aws/whats-new/2026/03/agentcore-evaluations-generally-available/ (slide 4) AWS, June 2026, AgentCore harness is generally available (AWS Machine Learning Blog) (slides 11, 29) Title: Amazon Bedrock AgentCore harness is now generally available (aws.amazon.com/blogs/machine-learning/) AWS, August 2026, evaluating agents of any framework (AWS Machine Learning Blog) (slide 9) aws.amazon.com/blogs/machine-learning/evaluate-any-agent-framework-with-amazon-bedrock-agentcore-evaluations Anthropic, January 2026, Demystifying evals for AI agents www.anthropic.com/engineering/demystifying-evals-for-ai-agents (slides 4, 6–8, 13, 15, 19, 21, 23–26, 28, 35) OpenAI, Evaluation best practices (API docs) platform.openai.com/docs/guides/evaluation-best-practices (slides 6, 8, 15, 24) Where the help desk's code comes from (MIT-0, Module 1) github.com/aws-samples/sample-strands-agents-hands-on-workshop (slides 13, 19) © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 37