As conversational synthetic intelligence (AI) brokers acquire traction throughout industries, offering reliability and consistency is essential for delivering seamless and reliable consumer experiences. Nonetheless, the dynamic and conversational nature of those interactions makes conventional testing and analysis strategies difficult. Conversational AI brokers additionally embody a number of layers, from Retrieval Augmented Technology (RAG) to function-calling mechanisms that work together with exterior data sources and instruments. Though present massive language mannequin (LLM) benchmarks like MT-bench consider mannequin capabilities, they lack the flexibility to validate the applying layers. The next are some widespread ache factors in creating conversational AI brokers:
- Testing an agent is commonly tedious and repetitive, requiring a human within the loop to validate the semantics which means of the responses from the agent, as proven within the following determine.
- Organising correct check instances and automating the analysis course of may be tough as a result of conversational and dynamic nature of agent interactions.
- Debugging and tracing how conversational AI brokers path to the suitable motion or retrieve the specified outcomes may be advanced, particularly when integrating with exterior data sources and instruments.
Agent Evaluation, an open supply answer utilizing LLMs on Amazon Bedrock, addresses this hole by enabling complete analysis and validation of conversational AI brokers at scale.
Amazon Bedrock is a completely managed service that provides a selection of high-performing basis fashions (FMs) from main AI corporations like AI21 Labs, Anthropic, Cohere, Meta, Stability AI, and Amazon by way of a single API, together with a broad set of capabilities to construct generative AI purposes with safety, privateness, and accountable AI.
Agent Analysis supplies the next:
- Constructed-in help for standard providers, together with Brokers for Amazon Bedrock, Information Bases for Amazon Bedrock, Amazon Q Enterprise, and Amazon SageMaker endpoints
- Orchestration of concurrent, multi-turn conversations along with your agent whereas evaluating its responses
- Configurable hooks to validate actions triggered by your agent
- Integration into steady integration and supply (CI/CD) pipelines to automate agent testing
- A generated check abstract for efficiency insights together with dialog historical past, check cross fee, and reasoning for cross/fail outcomes
- Detailed traces to allow step-by-step debugging of the agent interactions
On this publish, we display find out how to streamline digital agent testing at scale utilizing Amazon Bedrock and Agent Analysis.
Resolution overview
To make use of Agent Analysis, you’ll want to create a check plan, which consists of three configurable parts:
- Goal – A goal represents the agent you need to check
- Evaluator – An evaluator represents the workflow and logic to guage the goal on a check
- Check – A check defines the goal’s performance and the way you need your end-user to work together with the goal, which incorporates:
- A collection of steps representing the interactions between the agent and the end-user
- Your anticipated outcomes of the dialog
The next determine illustrates how Agent Analysis works on a excessive degree. The framework implements an LLM agent (evaluator) that can orchestrate conversations with your personal agent (goal) and consider the responses in the course of the dialog.

The next determine illustrates the analysis workflow. It reveals how the evaluator causes and assesses responses primarily based on the check plan. You possibly can both present an preliminary immediate or instruct the evaluator to generate one to provoke the dialog. At every flip, the evaluator engages the goal agent and evaluates its response. This course of continues till the anticipated outcomes are noticed or the utmost variety of dialog turns is reached.

By understanding this workflow logic, you’ll be able to create a check plan to totally assess your agent’s capabilities.
Use case overview
For instance how Agent Analysis can speed up the event and deployment of conversational AI brokers at scale, let’s discover an instance situation: creating an insurance claim processing agent using Agents for Amazon Bedrock. This insurance coverage declare processing agent is anticipated to deal with varied duties, resembling creating new claims, sending reminders for pending paperwork associated to open claims, gathering proof for claims, and trying to find related data throughout present claims and buyer data repositories.
For this use case, the aim is to check the agent’s functionality to precisely search and retrieve related data from present claims. You need to make sure that the agent supplies right and dependable details about present claims to end-users. Completely evaluating this performance is essential earlier than deployment.
Start by creating and testing the agent in your growth account. Throughout this part, you work together manually with the conversational AI agent utilizing pattern prompts to do the next:
- Have interaction the agent in multi-turn conversations on the Amazon Bedrock console
- Validate the responses from the agent
- Validate all of the actions invoked by the agent
- Debug and test traces for any routing failures
With Agent Analysis, the developer can streamline this course of by way of the next steps:
- Configure a check plan:
- Select an evaluator from the fashions offered by Amazon Bedrock.
- Configure the goal, which needs to be a sort that Agent Evaluation supports. For this publish, we use an Amazon Bedrock agent.
- Outline the check steps and anticipated outcomes. Within the following instance check plan, you will have a declare with the ID
claim-006in your check system. You need to affirm that your agent can precisely reply questions on this particular declare.
- Run the check plan from the command line:
The Agent Analysis check runner will robotically orchestrate the check primarily based on the check plan, and use the evaluator to find out if the responses from the goal match the anticipated outcomes.
- View the consequence abstract.
A consequence abstract can be offered in markdown format. Within the following instance, the abstract signifies that the check failed as a result of the agent was unable to supply correct details about the present declareclaim-006.
- Debug with the hint recordsdata of the failed assessments.
Agent Analysis supplies detailed hint recordsdata for the assessments. Every hint file meticulously data each immediate and interplay between the goal and the evaluator.For example, within the_invoke_targetstep, you’ll be able to acquire helpful insights into the rationale behind the Amazon Bedrock agent’s responses, permitting you to delve deeper into the decision-making course of:The hint reveals that after reviewing the dialog historical past, the evaluator concludes, “the agent can be unable to reply or help with this query utilizing solely the capabilities it has entry to.” Consequently, it ends the dialog with the goal agent and proceeds to generate the check standing.
Within the
_generate_test_statusstep, the evaluator generates the check standing with reasoning primarily based on the responses from the goal.The check plan defines the anticipated consequence because the goal agent precisely offering particulars concerning the present declare
claim-006. Nonetheless, after testing, the goal agent’s response doesn’t meet the anticipated consequence, and the check fails. - After figuring out and addressing the difficulty, you’ll be able to rerun the check to validate the repair. On this instance, it’s evident that the goal agent lacks entry to the declare
claim-006. From there, you’ll be able to proceed investigating and confirm ifclaim-006exists in your check system.
Combine Agent Analysis with CI/CD pipelines
After validating the performance within the growth account, you’ll be able to commit the code to the repository and provoke the deployment course of for the conversational AI agent to the following stage. Seamless integration with CI/CD pipelines is an important side of Agent Analysis, enabling complete integration testing to verify no regressions are launched throughout new characteristic growth or updates. This rigorous testing method is significant for sustaining the reliability and consistency of conversational AI brokers as they progress by way of the software program supply lifecycle.
By incorporating Agent Analysis into CI/CD workflows, organizations can automate the testing course of, ensuring each code change or replace undergoes thorough analysis earlier than deployment. This proactive measure minimizes the danger of introducing bugs or inconsistencies that would compromise the conversational AI agent’s efficiency and the general consumer expertise.
An ordinary agent CI/CD pipeline contains the next steps:
- The supply repository shops the agent configuration, together with agent directions, system prompts, mannequin configuration, and so forth. You must at all times commit your adjustments to supply high quality and reproducibility.
- Once you commit your adjustments, a construct step is invoked. That is the place unit assessments ought to run and validate the adjustments, together with typo and syntax checks.
- When the adjustments are deployed to the staging surroundings, Agent Analysis runs with a collection of check instances for runtime validation.
- The runtime validation on the staging surroundings can assist construct confidence to deploy the absolutely examined agent to manufacturing.
The next determine illustrates this pipeline.

Within the following sections, we offer step-by-step directions to arrange Agent Analysis with GitHub Actions.
Stipulations
Full the next prerequisite steps:
- Observe the GitHub user guide to get began with GitHub.
- Observe the GitHub Actions user guide to know GitHub workflows and Actions.
- Observe the insurance claim processing agent using Agents for Amazon Bedrock instance to arrange an agent.
Arrange GitHub Actions
Full the next steps to deploy the answer:
- Write a collection of check instances following the agent-evaluation test plan syntax and retailer check plans within the GitHub repository. For instance, a check plan to check an Amazon Bedrock agent goal is written as follows, with
BEDROCK_AGENT_ALIAS_IDandBEDROCK_AGENT_IDas placeholders: - Create an AWS Id and Entry Administration (IAM) consumer with the correct permissions:
- The principal should have InvokeModel permission to the mannequin specified within the configuration.
- The principal should have the permissions to name the goal agent. Relying on the goal sort, completely different permissions are required. Confer with the agent-evaluation target documentation for particulars.
- Retailer the IAM credentials (
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY) in GitHub Actions secrets. - Configure a GitHub workflow as follows:
Once you push new adjustments to the repository, it’ll invoke the GitHub Motion, and an instance workflow output is displayed, as proven within the following screenshot.

A check abstract like the next screenshot can be posted to the GitHub workflow web page with particulars on which assessments have failed.

The abstract additionally supplies the explanations for the check failures.

Clear up
Full the next steps to wash up your assets:
- Delete the IAM consumer you created for the GitHub Motion.
- Observe the insurance claim processing agent using Agents for Amazon Bedrock instance to delete the agent.
Evaluator issues
By default, evaluators use the InvokeModel API with On-Demand mode, which can incur AWS fees primarily based on enter tokens processed and output tokens generated. For the newest pricing particulars for Amazon Bedrock, confer with Amazon Bedrock pricing.
The price of operating an evaluator for a single check is influenced by the next:
- The quantity and size of the steps
- The quantity and size of anticipated outcomes
- The size of the goal agent’s responses
You possibly can view the full variety of enter tokens processed and output tokens generated by the evaluator utilizing the --verbose flag whenever you carry out a run (agenteval run --verbose).
Conclusion
This publish launched Agent Analysis, an open supply answer that allows builders to seamlessly combine agent analysis into their present CI/CD workflows. By profiting from the capabilities of LLMs on Amazon Bedrock, Agent Analysis allows you to comprehensively consider and debug your brokers, attaining dependable and constant efficiency. With its user-friendly check plan configuration, Agent Analysis simplifies the method of defining and orchestrating assessments, permitting you to concentrate on refining your brokers’ capabilities. The answer’s built-in help for standard providers makes it a flexible instrument for testing a variety of conversational AI brokers. Furthermore, Agent Analysis’s seamless integration with CI/CD pipelines empowers groups to automate the testing course of, ensuring each code change or replace undergoes rigorous analysis earlier than deployment. This proactive method minimizes the danger of introducing bugs or inconsistencies, in the end enhancing the general consumer expertise.
The next are some suggestions to contemplate:
- Don’t use the identical mannequin to guage the outcomes that you simply use to energy the agent. Doing so could introduce biases and result in inaccurate evaluations.
- Block your pipelines on accuracy failures. Implement strict high quality gates to assist forestall deploying brokers that fail to fulfill the anticipated accuracy or efficiency thresholds.
- Constantly increase and refine your check plans. As your brokers evolve, repeatedly replace your check plans to cowl new situations and edge instances, and supply complete protection.
- Use Agent Analysis’s logging and tracing capabilities to realize insights into your brokers’ decision-making processes, facilitating debugging and efficiency optimization.
Agent Analysis unlocks a brand new degree of confidence in your conversational AI brokers’ efficiency by streamlining your growth workflows, accelerating time-to-market, and delivering distinctive consumer experiences. To additional discover the most effective practices of constructing and testing conversational AI agent analysis at scale, get began by attempting Agent Evaluation and supply your suggestions.
In regards to the Authors
Sharon Li is an AI/ML Specialist Options Architect at Amazon Net Providers (AWS) primarily based in Boston, Massachusetts. With a ardour for leveraging cutting-edge know-how, Sharon is on the forefront of creating and deploying progressive generative AI options on the AWS cloud platform.
Bobby Lindsey is a Machine Studying Specialist at Amazon Net Providers. He’s been in know-how for over a decade, spanning varied applied sciences and a number of roles. He’s at the moment centered on combining his background in software program engineering, DevOps, and machine studying to assist prospects ship machine studying workflows at scale. In his spare time, he enjoys studying, analysis, mountaineering, biking, and path operating.
Tony Chen is a Machine Studying Options Architect at Amazon Net Providers, serving to prospects design scalable and strong machine studying capabilities within the cloud. As a former knowledge scientist and knowledge engineer, he leverages his expertise to assist deal with among the most difficult issues organizations face with operationalizing machine studying.
Suyin Wang is an AI/ML Specialist Options Architect at AWS. She has an interdisciplinary schooling background in Machine Studying, Monetary Info Service and Economics, together with years of expertise in constructing Information Science and Machine Studying purposes that solved real-world enterprise issues. She enjoys serving to prospects determine the fitting enterprise questions and constructing the fitting AI/ML options. In her spare time, she loves singing and cooking.
Curt Lockhart is an AI/ML Specialist Options Architect at AWS. He comes from a non-traditional background of working within the arts earlier than his transfer to tech, and enjoys making machine studying approachable for every buyer. Primarily based in Seattle, yow will discover him venturing to native artwork museums, catching a live performance, and wandering all through the cities and outside of the Pacific Northwest.

