<!--
{
  "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/ToolCallEvaluator/init(allPass:percentagePass:argumentMatchModel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations17ToolCallEvaluatorV7allPass010percentageF018argumentMatchModelACyxGAA6MetricV_AI16FoundationModels08LanguageJ0_ptcfc"
  },
  "title" : "init(allPass:percentagePass:argumentMatchModel:)"
}
-->

# init(allPass:percentagePass:argumentMatchModel:)

Creates a new tool-call expectations evaluator with a custom language model
for semantic matching of natural language argument matchers.

```
init(allPass: Metric, percentagePass: Metric, argumentMatchModel: any LanguageModel)
```

## Parameters

`allPass`

The metric for the strict pass or fail result.

`percentagePass`

The metric for the partial score result.

`argumentMatchModel`

The language model to use for semantic matching.

## Discussion

```swift
let allPassMetric = Metric("Tools All Pass")
let percentagePassMetric = Metric("Tools Percentage Pass")

let evaluator = ToolCallEvaluator<ModelSample<String>>(
    allPass: allPassMetric,
    percentagePass: percentagePassMetric,
    argumentMatchModel: SystemLanguageModel.default
)
```

---

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)