Contents

ModelSampleProtocol

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

Declaration

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

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

Instance Properties

See Also

Protocols