<!--
{
  "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/ModelSample/init(prompt:expected:instructions:generationSchema:expectations:)-7daed",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations11ModelSampleV6prompt8expected12instructions16generationSchema12expectationsACyxGSS_xSgSSSg16FoundationModels010GenerationH0VSgAA21TrajectoryExpectationVSgtcfc"
  },
  "title" : "init(prompt:expected:instructions:generationSchema:expectations:)"
}
-->

# init(prompt:expected:instructions:generationSchema:expectations:)

Creates a model sample with string-based prompt and instructions.

```
init(prompt: String, expected: ExpectedValue? = Optional<String>(nilLiteral: ()), instructions: String? = nil, generationSchema: GenerationSchema? = nil, expectations: TrajectoryExpectation? = nil)
```

---

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)