<!--
{
  "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/init(instructions:evaluationTarget:reference:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations16ModelJudgePromptV12instructions16evaluationTarget9referenceACyxGSS_SS13ExpectedValueQzYbcSgSDyS2SGx_AItYaYbKYCcSgtcfc"
  },
  "title" : "init(instructions:evaluationTarget:reference:)"
}
-->

# init(instructions:evaluationTarget:reference:)

Creates a model prompt configuration.

```
init(instructions: String = ModelJudgePrompt.defaultInstructions, evaluationTarget: (@Sendable (Input.ExpectedValue) -> String)? = nil, reference: (nonisolated(nonsending) @Sendable (Input, Input.ExpectedValue) async throws -> [String : String])? = nil)
```

## Parameters

`instructions`

System instructions for the model judge. Defaults to a general-purpose evaluator prompt.

`evaluationTarget`

Optional closure to convert the response to a string. When `nil`, the response is JSON-serialized.

`reference`

Optional closure returning labeled reference data to include in the model prompt.

## Discussion

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

---

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)