One Logo Pool Ball
_CoreSpotlight_FoundationModels · IOS API REFERENCE

SpotlightSearchTool.Guide

struct · iOS 27.0+ · SDK 27.1

struct Guide

A type you use to offer guidance about what search capabillities to employ during a session. Use this type to specify additional guidance about how you want the model to search your content. At configuration time, configure an instance of this structure and assign it to the ``SpotlightSearchTool/Configuration/guide`` property of your configuration object. You use guidance options primarily to limit the types of searches the model performs or to scope searches to specific types of content. Adding guidance can help improve the efficiency of searches, especially if you eliminate search techniques that don’t apply to your content.

Members (6)

init · iOS 27.0+

init

TypeScript
static init(level?: SpotlightSearchTool_GuidanceLevel, format?: SpotlightSearchTool_FormatLevel): SpotlightSearchTool_Guide
Swift declaration
init(level: SpotlightSearchTool.GuidanceLevel = .complete, format: SpotlightSearchTool.FormatLevel = .structured)
get · iOS 27.0+

level

TypeScript
get level(): SpotlightSearchTool_GuidanceLevel
Swift declaration
let level: SpotlightSearchTool.GuidanceLevel

The guidance for the model to use during a session. Use this property to specify custom guidance for how to search your app’s content. The default value of this property is ``SpotlightSearchTool/GuidanceLevel/complete``, which uses all available search techniques and search all content types.

get · iOS 27.0+

format

TypeScript
get format(): SpotlightSearchTool_FormatLevel
Swift declaration
let format: SpotlightSearchTool.FormatLevel

The representation format for tool responses returned to the model. Controls how search results are serialized in the model's context window. Use ``FormatLevel/compact`` to reduce token consumption when working with small-context models or long conversations.

static · iOS 27.0+

dynamic

TypeScript
static dynamic(profile: SpotlightSearchTool_GuidanceProfile): SpotlightSearchTool_Guide
Swift declaration
static func dynamic(_ profile: SpotlightSearchTool.GuidanceProfile) -> SpotlightSearchTool.Guide

A guide that includes only the search techniques specified by the given profile. - Parameter profile: The set of search techniques and attributes the model may use.

static · iOS 27.0+

focused

TypeScript
static focused(domain?: SpotlightSearchTool_ContentDomain): SpotlightSearchTool_Guide
Swift declaration
static func focused(_ domain: SpotlightSearchTool.ContentDomain = .items) -> SpotlightSearchTool.Guide

A guide that searches only the specified content domain using a compact, on-device-friendly schema. - Parameter domain: The content domain to focus on. Defaults to ``SpotlightSearchTool/ContentDomain/items``.

get · iOS 27.0+

complete

TypeScript
static get complete(): SpotlightSearchTool_Guide
Swift declaration
static var complete: SpotlightSearchTool.Guide { get }

A guide that uses all available search techniques.

Skipped declarations

No declarations were skipped in this snapshot.

All _CoreSpotlight_FoundationModels types →