---
title: customStages
framework: corespotlight
role: symbol
role_heading: Instance Property
path: corespotlight/spotlightsearchtool/configuration-swift.struct/customstages
---

# customStages

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

## Declaration

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

## Discussion

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.

## See Also

### Customizing the output

- [guide](corespotlight/spotlightsearchtool/configuration-swift.struct/guide.md)
