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

# reference

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

```
let reference: (nonisolated(nonsending) @Sendable (Input, Input.ExpectedValue) async throws -> [String : String])?
```

## Discussion

The closure receives both the input sample and the model’s response, allowing
reference data from either, for example, running a grammar checker on the response,
or passing the sample’s expected value for comparison.

---

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)