TechnologiesMachine Learning & AI

_CoreSpotlight_FoundationModels cross-import overlay

iOSmacOStvOSwatchOSvisionOS

_CoreSpotlight_FoundationModels is a cross-import overlay that lets foundation models search and reason over your app's Spotlight-indexed content. Expose indexed data to a model by configuring a CoreSpotlightSource, FileSource, or SearchSource, and drive queries through a SpotlightSearchTool that returns ScoredSearchableItem and SearchTextResult values. Build a search pipeline from these stages using types such as SearchPipelineData, SearchResultsTable, and SearchStatistic, and resolve entities and content types with protocols like ContactResolver and UTTypeResolutionStrategy. Available on iOS, macOS, and visionOS.

Indexed Content Sources 3

Expose your app's Spotlight-indexed, file-based, and search-derived content to a foundation model.

  • St
    CoreSpotlightSource
    A search source that retrieves data from the app’s Spotlight index.
  • St
    FileSource
    A search source that retrieves indexed metadata from files and directories visible to Spotlight.
  • St
    SearchSource
    A source of data for Spotlight to search.

Searching with the Model 4

Drive model-issued queries over your indexed content and receive scored, text-bearing results.

  • St
    SpotlightSearchTool
    A tool you use to make your app’s custom data available to Foundation Models.
  • St
    ScoredSearchableItem
    A searchable item paired with a caller-assigned relevance score.
  • St
    SearchTextResult
    LLM-generated text summary or analysis from a pipeline stage.
  • St
    SearchCount
    A scalar count result (e.g., "47 emails from John").

Search Pipeline 5

Compose and stage the search pipeline that processes content into result tables and statistics.

  • Pr
    CustomStage
    A custom processing stage in a Spotlight search pipeline.
  • St
    SearchPipelineData
    The value that flows between pipeline stages, carrying a typed payload.
  • En
    SearchPipelineDataType
    Declares the kind of data a pipeline stage accepts or produces.
  • St
    SearchResultsTable
    Tabulated result data — rows with typed columns for display or spreadsheet export.
  • St
    SearchStatistic
    A scalar statistic derived from search results (sum, average, max, min, median, stddev).

Contact Resolution 2

Resolve people referenced in indexed content into concrete contact values.

  • Pr
    ContactResolver
    Resolves the current user's identity for search queries involving people.
  • St
    ResolvedContact
    Contact information used to match person and organization references in search queries.

Uniform Type Resolution 3

Resolve and classify the uniform type identifiers of indexed content.

  • Pr
    UTTypeResolutionStrategy
    Protocol for pluggable UTType resolution strategies
  • Cl
    UTTypeHierarchyStrategy
    Strategy for resolving UTTypes by walking the LaunchServices type hierarchy using BFS traversal
  • St
    UTTypeResolutionResult
    Result of a UTType resolution operation with confidence metrics and context
← Machine Learning & AI