Managing your experiment data
This page describes the data that Experiments stores, and how you view, update, delete, and export it.
Data that Experiments stores
Experiments stores two kinds of data:
-
Experiment and run records – CloudWatch keeps these. An experiment record holds the experiment's name, description, target, dataset, evaluators, and settings. A run record holds the run's status, rule, metadata, summary scores, and verdict.
-
Case results – Each run writes these to the results log group that you choose, in your own account. A case record holds the case's inputs, expected responses, and outputs, and the evaluator scores, labels, and explanations. For more information, see Where results are stored.
Viewing your data
To view experiment and run records, use the Experiments pages in the CloudWatch
console. You can also call GetExperiment,
ListExperiments, GetExperimentRun, and
ListExperimentRuns.
To view case results, query the results log group with CloudWatch Logs Insights, or
call GetLogEvents on the run's log stream,
{experimentId}/{runId}.
Updating your data
To change an experiment's name, description, configuration, or baseline run,
call UpdateExperiment. The configuration includes the dataset
settings.
You can't edit a run's results after CloudWatch records them. To correct them, delete the run and run it again.
Deleting your data
To delete one run, call DeleteExperimentRun. To delete an
experiment with all of its runs, call DeleteExperiment. You can't
undo either operation. For what each operation deletes, what it keeps, and
when CloudWatch refuses it, see Deleting experiments and runs.
Neither operation deletes data in your own account. Delete that data yourself:
-
Case records – Use CloudWatch Logs. Set a retention period on the results log group, or delete the run's log stream or the log group.
-
Batch evaluations from hosted runs – Use Amazon Bedrock AgentCore.
How long CloudWatch keeps your data
CloudWatch keeps experiment and run records until you delete them. The results log group keeps case records for its retention period.
Exporting your data
Case results are standard CloudWatch Logs data. To export them, use any of the following:
-
CreateExportTask, to export the results log group to Amazon S3. -
A subscription filter on the results log group, to stream new case records to another destination.
-
CloudWatch Logs Insights, to query case records and save the query results.
To export experiment and run records, save the output of
GetExperiment, ListExperiments,
GetExperimentRun, and ListExperimentRuns.