---
title: ModelSampleProtocol
framework: evaluations
role: symbol
role_heading: Protocol
path: evaluations/modelsampleprotocol
---

# ModelSampleProtocol

A type that defines language model evaluation samples with prompt, instructions, and expectations.

## Declaration

```swift
protocol ModelSampleProtocol : SampleProtocol where Self.ExpectedValue : Decodable, Self.ExpectedValue : Encodable, Self.ExpectedValue : Sendable
```

## Overview

Overview Extends SampleProtocol with prompt, instructions, and evaluation expectations. Use ModelSample for the common case; create custom conformances when you need additional properties. let sample = ModelSample(     prompt: "What's the weather?",     expected: "Sunny",     expectations: TrajectoryExpectation(ordered: [         ToolExpectation("get_weather")     ]) )

## Topics

### Associated Types

- [Expectation](evaluations/modelsampleprotocol/expectation.md)

### Instance Properties

- [input](evaluations/modelsampleprotocol/input.md)
- [output](evaluations/modelsampleprotocol/output.md)

## Relationships

### Inherits From

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [SampleProtocol](evaluations/sampleprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

### Conforming Types

- [ModelSample](evaluations/modelsample.md)

## See Also

### Protocols

- [SampleProtocol](evaluations/sampleprotocol.md)
