<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/SpotlightSearchTool/Configuration-swift.struct/customStages",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Spotlight",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:31_CoreSpotlight_FoundationModels0B10SearchToolV13ConfigurationV12customStagesSayAA11CustomStage_pGvp"
  },
  "title" : "customStages"
}
-->

# customStages

Custom pipeline stages you use to help the Spotlight search tool generate results.

```
var customStages: [any CustomStage] { get set }
```

## Discussion

Provide a custom stage if you have custom code for determining search results. For example, you might
use a custom stage to provide the Spotlight search tool with app-managed relevance scores. The tool
makes your custom stages available to the model, which determines whether to run them based on the prompt.

For more information about creating a custom stage, see [Making your indexed content available to Foundation Models](/documentation/CoreSpotlight/making-your-indexed-content-available-to-foundation-models).

---

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)