LLM search using Core Spotlight

If your app creates an Apple Intelligence schema conforming App Entity, Siri AI can only reason over the schema defined properties. (see this thread). But as a developer, I can add more optional properties on my App Entity with additional metadata about the entity.

If my app contributes these App Entities to Spotlight as indexed entities, is SpotlightSearchTool also limited to reasoning over just the schema defined properties, or are these unrelated concepts? Will these additional optional properties on my App Entity enable a deeper SpotlightSearchTool powered search experience around these entities?

Answered by Engineer in 893007022

IndexedEntity is backed by a CSSearchableItem that can be extended with any additional metadata on the item, whether system attributes or custom attributes, and are available for in-app search with any of CoreSpotlight's query APIs, including SpotlightSearchTool.

For reasoning over custom attributes, you can describe them in the instructions for your language model session, or use dynamic guidance in SpotlightSearchTool's configuration.

Accepted Answer

IndexedEntity is backed by a CSSearchableItem that can be extended with any additional metadata on the item, whether system attributes or custom attributes, and are available for in-app search with any of CoreSpotlight's query APIs, including SpotlightSearchTool.

For reasoning over custom attributes, you can describe them in the instructions for your language model session, or use dynamic guidance in SpotlightSearchTool's configuration.

Thank you @Engineer!

Do all the properties on my IndexedEntity also exist as properties on the CSSearchableItem that backs it automatically? Or is there an additional step there?

Update – I found more details about this here: https://developer.apple.com/documentation/appintents/making-app-entities-available-in-spotlight

LLM search using Core Spotlight
 
 
Q