# Analyze Data

## Benchmark Testing and Data Generation

After training a multi-agent system in AMESA, the system automatically runs a series of standardized tests to evaluate its performance. This benchmarking process:

1. Places the system in controlled testing environments
2. Records detailed metrics at each step of operation
3. Aggregates results to provide comprehensive performance statistics

The output of this testing process is compiled into a structured benchmark.json file, which contains rich performance data that can be analyzed to assess effectiveness, identify improvement opportunities, and compare different design approaches. This file is a performance record and a valuable analytics resource for optimizing your agentic systems.

## Downloading Benchmark Artifacts

To download benchmark data for further analysis:

1. Navigate to the "Training Sessions" page
2. Click the artifacts dropdown in the top right page of a trained system
3. Select "Benchmark"
4. The benchmark.json file will be saved to your local machine

<figure><img src="/files/QD6HZ7irSMCpNN2wffHL" alt=""><figcaption></figcaption></figure>

## Understanding the Benchmark.json File

The benchmark.json file contains structured data about the performance of a trained agent system. Here's how to interpret this file:

### File Structure

```
{
  "skill-name": {
    "scenario-0": {
      "scenario_data": { ... },
      "episode-0": [ ... ],
      "aggregate": { ... }
    }
  }
}
```

### Key Components

**Scenario Data**: Contains reference values for the scenario:

```
"scenario_data": {
  "sensor_one": {"data": 8.57, "type": "is_equal"}, 
  "sensor_two": {"data": 373, "type": "is_equal"}
}
```

**Episode Data**: Array of state-action pairs showing how the agent performed in each step:

```
[
  {
    "state": "{'sensor_one': array([311.2639], dtype=float32), ...}",
    "action": "[-1.253192]",
    "teacher_reward": 1.0,
    "teacher_success": false,
    "teacher_terminal": null
  },
  ...
]
```

**Aggregate Statistics**: Summary statistics for the entire benchmark:

```
"aggregate": {
  "mean": { ... },
  "medians": { ... },
  "std_dev": { ... },
  "max": { ... },
  "min": { ... }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amesa.com/evaluate-performance/analyze-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
