Evaluating multi-agent systems for explainability and helpfulness with Amazon Bedrock AgentCore
https://aws.amazon.com/blogs/machine-learning/evaluating-multi-agent-systems-for-explainability-and-helpfulness-with-amazon-bedrock-agentcore/📌 多代理系統上線前,你怎麼知道agent的決策講得通?Amazon Bedrock AgentCore的解法
TL;DR:AgentCore Evaluations用三層評估器,從「有沒有幫助」一路驗到「決策理由講清楚了沒」。
LLM能生成流暢的回答,但企業場景要的不只是「講得好」,而是agent有沒有選對工具、有沒有守住業務限制、推理過程能不能被解釋清楚。當多代理系統從實驗階段走向生產環境,這個落差會直接變成風險。
🤔 多代理系統上生產線前,缺的是「可解釋」這一層
企業導入多代理系統,是為了處理需要跨資料來源、跨工具、跨業務限制推理的複雜問題,從供應鏈規劃到財務分析、客戶營運都是如此。這些系統不只是問答,而是協調多個專職agent做決策、執行工作流、產出可行動的建議。傳統只看模型回應品質的評估方式,對這類系統並不夠用,因為正確性還取決於工具選擇、工作流執行與業務限制的遵守程度。
Amazon Bedrock AgentCore是一個用來建置、串接、最佳化agent的平臺,其中的AgentCore Evaluations是一套全代管的能力,用來在開發與生產階段評估agent表現,涵蓋正確性、任務成功率與多個品質維度的行為。文章特別強調,評估(Evaluations)發生在執行之後,評估agent的品質;而Amazon Bedrock Guardrails則是在執行期間強制安全限制,兩者互補而非取代。
🧩 以虛構的AnyCompany Retail為例,拆解供應鏈決策agent
文章用一家虛構的跨國零售商AnyCompany Retail做示範案例:該公司常見庫存失衡問題(某些地區促銷缺貨、某些地區庫存過剩),也要在配送速度、運力與成本之間權衡。解決方案用Strands Agents SDK搭配Amazon Bedrock AgentCore MCP伺服器與AgentCore Evaluations,建出一個orchestrator agent再分派給四個專職sub-agent:最佳化agent、配送agent、路由agent、分析agent,每個agent都跑在AgentCore runtime上,並開啟AgentCore memory與Observability。
orchestrator接到規劃人員的請求後,把工作分派給被包裝成工具的專職agent:最佳化agent呼叫背後接著模擬API Gateway REST介面的MCP工具取得最佳化決策;配送agent呼叫推薦API建議庫存在配送中心、門店、數位通路間的重新分配;路由agent呼叫物流API推薦承運商與路線;分析agent則回答供應鏈診斷類問題。
📊 三層評估法:從通用品質一路驗到業務正確性
文章採用的是漸進式的三層評估架構:
第一層是內建評估器,不需額外設定。所有agent都套用Helpfulness作為通用基準,再依各自最常出錯的地方加一個專屬評估器:orchestrator用Tool Selection Accuracy,最佳化與配送agent用Response Relevance,路由agent用Instruction Following,分析agent用Faithfulness。
第二層是自訂評估器,用來編碼業務規則,驗證「這個建議有沒有守住預算限制、是否用了真實庫存資料、輸出在業務上是否可行」:最佳化agent驗證constraint satisfaction、配送agent驗證data grounding、路由agent驗證route feasibility、分析agent驗證SQL correctness、orchestrator驗證plan coherence。
第三層則把可解釋性當成獨立評估維度,驗證agent是否明確闡述決策理由、引用支撐的資料或工具輸出,並解釋像成本與服務水準之間的取捨。
評估支援兩種模式:on-demand模式用於開發階段的benchmark、迴歸測試與CI/CD關卡;online模式用於生產環境的持續監控,透過OnlineEvaluationConfig物件設定抽樣率(例如1%到10%的production traces)與選用的session過濾條件,服務會自動從AgentCore Observability讀取trace、評分,再把結果串流到Amazon CloudWatch儀表板與告警。
⚠️ 案例是虛構示範,重點在評估框架本身
AnyCompany Retail是文章用來示範概念的虛構公司,實際導入時每個企業的業務限制與可解釋性要求都不同,內建評估器只能打底,真正貼近業務的驗證仍需要自訂評估器。
🎯 對正在上線多代理系統的團隊的意義
如果你的多代理系統已經要從實驗走向生產,單靠「回答得通順」是不夠的評估標準。值得借鏡的是這套漸進式架構:先用內建評估器建立品質基準,再疊加業務規則的自訂評估器,最後把「解釋理由」本身當成可被量測的指標,搭配on-demand與online兩種模式把評估嵌進開發與維運流程,而不是上線後才發現agent的決策無法被稽核。
🔗 來源
- 標題:Evaluating multi-agent systems for explainability and helpfulness with Amazon Bedrock AgentCore
- 作者/機構:Kanishk Mahajan, AWS Machine Learning Blog
- 連結:https://aws.amazon.com/blogs/machine-learning/evaluating-multi-agent-systems-for-explainability-and-helpfulness-with-amazon-bedrock-agentcore/
#AWS #Bedrock #AgentCore #MultiAgent #AIEvaluation #Explainability #EnterpriseAI #StrandsAgents #ResponsibleAI #AIObservability
原始資料 AWS ML · 收集於 2026-10-05
摘要原文
A critical challenge that emerges as multi-agent systems move from experimentation to production is making sure that these systems are consistently helpful, accurate, and explainable in real-world scenarios. Enterprises are increasingly adopting multi-agent systems to solve complex, real-world problems that require reasoning across data sources, tools, and business constraints. From supply chain planning to financial analysis and customer operations, these systems go beyond simple question answering. They coordinate multiple specialized agents to make decisions, execute workflows, and generate actionable recommendations. While large language models can generate fluent responses, enterprise applications require much deeper guarantees, where agents must follow instructions reliably, select the right tools, respect constraints, and provide clear reasoning behind their outputs. Amazon Bedrock AgentCore is a platform to build, connect, and optimize agents at scale, with any framework or model. Amazon Bedrock AgentCore Evaluations , a capability of Amazon Bedrock AgentCore, is designed to address this challenge as a fully managed capability for assessing agent performance across development and production, so teams can measure accuracy, task success, and behavior across multiple quality dimensions. Traditional evaluation approaches that focus only on model response quality are insufficient for agentic systems, where correctness depends on tool selection, workflow execution, and adherence to business constraints. In addition to evaluation, production deployment of agentic systems requires responsible AI controls. Amazon Bedrock Guardrails provides configurable safeguards such as content filtering, denied topic detection, and grounding validation that complement the evaluation framework. While evaluations assess agent quality after execution, Guardrails enforce safety constraints during execution. In this post, we focus on operationalizing this evaluation framework with Amazon Bedrock AgentCore Evaluations support for both built-in evaluators and custom evaluators. Built-in evaluators offer pre-defined assessments for common quality dimensions such as helpfulness, task success, and instruction following, so teams can quickly baseline agent performance without additional setup. However, enterprise use cases require deeper, domain-specific validation. Custom evaluators address this, so you can define business-aware checks. We also focus specifically on explainability as a first-class evaluation dimension. We demonstrate how built-in evaluators can assess general response clarity. We showcase how custom evaluators are used to verify that agents explicitly articulate decision rationale, reference supporting data or tool outputs, and explain tradeoffs such as cost versus service level. By combining these evaluators, we show how AgentCore Evaluations can move beyond surface-level response quality and provide structured, measurable insights into how and why agents arrive at their decisions. To make these concepts concrete, the following sections walk through a reference architecture and implementation that demonstrates how these components work together in practice. For this post, we use a fictitious global retail company called AnyCompany Retail, a multinational retailer operating ecommerce channels, regional fulfillment centers, distribution centers, and thousands of physical stores. AnyCompany experiences frequent inventory imbalances: some regions face stockouts during promotions, while others carry excess inventory. Transportation teams must also balance delivery speed, carrier capacity, and cost. The company wants an agentic assistant that can help planners optimize inventory allocation, recommend distribution adjustments, analyze inventory health, and simulate routing or fulfillment scenarios. You will build and evaluate a multi-agent supply chain decisioning system using Strands Agents SDK , Amazon Bedrock AgentCore MCP Server and Amazon Bedrock AgentCore Evaluations. The solution uses Strands Agents with an orchestrator agent and four specialized sub-agents: an optimization agent, distribution agent, routing agent, and analytics agent. Each agent runs on Amazon Bedrock AgentCore runtime with Amazon Bedrock AgentCore memory and Amazon Bedrock AgentCore Observability enabled. The orchestrator agent receives the planner’s request and delegates work to specialized agents exposed as tools. The optimization agent calls MCP tools backed by mock Amazon API Gateway REST interfaces that return optimization decisions. The distribution agent calls recommendation APIs to suggest inventory rebalancing across fulfillment centers, stores, and digital channels. The routing agent calls logistics APIs to recommend carrier and route options and the analytics agent answers supply chain diagnostics questions. This solution uses foundation models on Amazon Bedrock for the agent loop. For model availability by Region, refer to Supported models by AWS Region in Amazon Bedrock. The solution uses built-in evaluators that assess general quality dimensions such as helpfulness and task completion. It also provides custom evaluators that assess supply-chain-specific behavior such as constraint satisfaction, route feasibility, SQL correctness, inventory grounding, and explanation quality. AnyCompany can evaluate both the language quality of the response and the business validity of the agent’s decision. The solution supports both on-demand and online modes with Amazon Bedrock AgentCore Evaluations. The on-demand mode is meant for development benchmarking, regression testing, and continuous integration and continuous delivery (CI/CD) gates. The online mode is for continuous production monitoring and alerts. Both modes help you close the loop and act on feedback from your users. The same custom evaluators (such as the constraint satisfaction, route feasibility, SQL correctness, and explainability evaluators from your supply chain solution) used for on-demand evaluations are repurposed with an OnlineEvaluationConfig object that references the Amazon Resource Names (ARNs) of the evaluators and specifies a sampling rate (for example, 1–10% of production traces) along with optional session filters. The service then automatically reads traces from AgentCore Observability, scores them and streams results to Amazon CloudWatch dashboards and alarms. In this post, you will use the on-demand mode to test the solution. The following architecture diagram illustrates the various components of our solution. Figure 1: Architecture of the multi-agent supply chain decisioning solution In this post, you will use a three-layer evaluation approach for multi-agent systems that progressively builds enterprise trust. The approach follows a clear progression starting with built-in evaluators for general quality then adding custom evaluators for business accuracy and finally layering explainability evaluators for trust and auditability. The first layer uses built-in evaluators requiring no setup. We apply Helpfulness as a universal baseline plus a second agent-specific evaluator targeting each agent’s primary failure mode: Tool Selection Accuracy for the orchestrator, Response Relevance for optimization and distribution, Instruction Following for routing, and Faithfulness for analytics. The second layer adds custom evaluators encoding domain-specific business rules: constraint satisfaction for optimization, data grounding for distribution, route feasibility for routing, SQL correctness for analytics, and plan coherence for orchestration. These validate business validity: did the recommendation respect budget limits, use real inventory data, and produce operationally correct outputs? The following table maps the two built-in evaluators and custom evaluator selected for each agent that you will implement here.
由 claude-code/sonnet 自動生成