<!--
{
  "availability" : [
    "Xcode: 27.0.0 -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Evaluations",
  "identifier" : "/documentation/Evaluations/EvaluationResult",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations16EvaluationResultV"
  },
  "title" : "EvaluationResult"
}
-->

# EvaluationResult

The results of running a model evaluation.

```
struct EvaluationResult
```

## Overview

A structure that contains the summary and detailed results from an evaluation run.

Use the column descriptors from your [`Evaluation`](/documentation/Evaluations/Evaluation) to access typed columns from the
[`detailed`](/documentation/Evaluations/EvaluationResult/detailed) DataFrame:

```swift
let result = try await evaluation.run(on: samples)
let inputs = result.detailed[evaluation.inputColumn]
let responses = result.detailed[evaluation.responseColumn]
let expected = result.detailed[evaluation.expectedColumn]
```

## Topics

### Accessing results

[`summary`](/documentation/Evaluations/EvaluationResult/summary)

Aggregated statistics for each metric in the evaluation.

[`detailed`](/documentation/Evaluations/EvaluationResult/detailed)

Individual results for each sample in the evaluation.

[`evaluationInfo`](/documentation/Evaluations/EvaluationResult/evaluationInfo)

User-defined information about this evaluation, such as the model name, prompt version, or dataset.

[`evaluationID`](/documentation/Evaluations/EvaluationResult/evaluationID)

The identifier of the evaluation that produced these results.

[`resultID`](/documentation/Evaluations/EvaluationResult/resultID)

A unique identifier for this particular result.

[`reportMetadata`](/documentation/Evaluations/EvaluationResult/reportMetadata)

Framework-generated metadata used for report presentation.

[`aggregateValue(_:)`](/documentation/Evaluations/EvaluationResult/aggregateValue(_:))

Returns the first aggregate value matching the given operation, or `-1` if not found.

[`DataFrameKind`](/documentation/Evaluations/EvaluationResult/DataFrameKind)

The kind of DataFrame to convert for JSON serialization.

### Inspecting timing

[`startTime`](/documentation/Evaluations/EvaluationResult/startTime)

The time when the evaluation run started.

[`endTime`](/documentation/Evaluations/EvaluationResult/endTime)

The time when the evaluation run finished.

[`duration`](/documentation/Evaluations/EvaluationResult/duration)

The total duration of the evaluation run.

### Formatting results

[`groupedSummary`](/documentation/Evaluations/EvaluationResult/groupedSummary)

A formatted description of summary metrics organized by groups.

[`jsonRepresentableDataFrame(of:)`](/documentation/Evaluations/EvaluationResult/jsonRepresentableDataFrame(of:))

Transforms a DataFrame into one with column types compatible with JSON representation.

### Saving and loading results

[`saveJSON(to:includeReportMetadata:includeTranscripts:)`](/documentation/Evaluations/EvaluationResult/saveJSON(to:includeReportMetadata:includeTranscripts:))

Saves evaluation results to a single JSON file.

[`jsonData(includeReportMetadata:includeTranscripts:jsonOptions:)`](/documentation/Evaluations/EvaluationResult/jsonData(includeReportMetadata:includeTranscripts:jsonOptions:))

Returns the evaluation results as JSON data.

[`loadJSON(from:)`](/documentation/Evaluations/EvaluationResult/loadJSON(from:))

Loads an evaluation result from a JSON file on disk.

[`loadJSONLines(from:)`](/documentation/Evaluations/EvaluationResult/loadJSONLines(from:))

Loads an array of evaluation results from a JSONL file on disk.

[`init(jsonData:)`](/documentation/Evaluations/EvaluationResult/init(jsonData:))

Creates an evaluation result by parsing JSON data.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)