<!--
{
  "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/ModelJudgePrompt",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations16ModelJudgePromptV"
  },
  "title" : "ModelJudgePrompt"
}
-->

# ModelJudgePrompt

A configuration for how a model evaluator constructs its prompt.

```
struct ModelJudgePrompt<Input> where Input : ModelSampleProtocol
```

## Overview

```swift
let prompt = ModelJudgePrompt<ModelSample<String>>(
    instructions: "You are a domain expert evaluating product reviews."
)
```

`ModelJudgePrompt` bundles the instructions, response presentation, and reference-data
injection into a single composable value. Use it with [`ModelJudgeEvaluator`](/documentation/Evaluations/ModelJudgeEvaluator) to
customize how the model judge sees the evaluation.

## Topics

### Creating a prompt configuration

[`init(instructions:evaluationTarget:reference:)`](/documentation/Evaluations/ModelJudgePrompt/init(instructions:evaluationTarget:reference:))

Creates a model prompt configuration.

[`defaultInstructions`](/documentation/Evaluations/ModelJudgePrompt/defaultInstructions)

The default system instructions used when no custom instructions are provided.

### Customizing judge input

[`instructions`](/documentation/Evaluations/ModelJudgePrompt/instructions)

The system instructions for the model judge.

[`evaluationTarget`](/documentation/Evaluations/ModelJudgePrompt/evaluationTarget)

An optional closure that converts the model’s response to a string for the model prompt.

[`reference`](/documentation/Evaluations/ModelJudgePrompt/reference)

An optional closure that provides labeled reference data to include in the model prompt.

## 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)