---
title: "init(instructions:evaluationTarget:reference:)"
framework: evaluations
role: symbol
role_heading: Initializer
path: "evaluations/modeljudgeprompt/init(instructions:evaluationtarget:reference:)"
---

# init(instructions:evaluationTarget:reference:)

Creates a model-as-judge prompt configuration.

## Declaration

```swift
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-as-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 judge prompt.

## Discussion

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

## See Also

### Creating a prompt configuration

- [defaultInstructions](evaluations/modeljudgeprompt/defaultinstructions.md)
