<!--
{
  "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/TrajectoryExpectation/init(ordered:unordered:disallowed:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations21TrajectoryExpectationV7ordered9unordered10disallowedACSayAA04ToolC0VG_A2Itcfc"
  },
  "title" : "init(ordered:unordered:disallowed:)"
}
-->

# init(ordered:unordered:disallowed:)

Creates a trajectory expectation with ordered and unordered requirements,
plus specific tools that the model must not call.

```
init(ordered: [ToolExpectation] = [], unordered: [ToolExpectation] = [], disallowed: [ToolExpectation])
```

## Parameters

`ordered`

Steps that must be satisfied in sequential order.

`unordered`

Tool calls that must occur at some point, regardless of position.

`disallowed`

Tools that the model must not call.

## Discussion

Using disallowed expectations always allows additional tool calls;
the disallowed list targets specific tools
while permitting everything else. To disallow *all* unexpected calls instead,
use [`init(ordered:unordered:allowsAdditionalToolCalls:)`](/documentation/Evaluations/TrajectoryExpectation/init(ordered:unordered:allowsAdditionalToolCalls:)) with
`allowsAdditionalToolCalls: false`.

---

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)