The Problem
Adding a simple natural language search to a fixed list, like your app's settings, commands, or product catalog, usually comes with a few problems:
- Requires an internet connection. Searching your app's built-in settings or commands shouldn't depend on whether your users are online.
- Unpredictable costs. API costs can add up, and providers can change their pricing or usage limits at any time.
- Privacy concerns. Every search query is sent to a third-party server, even when users are searching content already in your app.
- Unexpected model changes. Providers can update, restrict, or discontinue their models. Your search results could suddenly change, even when you haven't changed anything in your app.
Training your own small, on-device model solves these problems. But the training process takes a lot of work, and it's easy to waste money on experiments that don't give you good results.
The Solution
On-Device Search Starter helps you train a small search model specifically for your app, without having to figure out the entire process yourself. Your agent guides you through training, keeps costs within your budget, and tests your model against existing search options so you can see how well it works before using it in your app.
You end up with a model you control, built for your specific use case. It runs entirely on-device using Apple's Core AI framework, so your users can search without an internet connection, their queries stay private, and you don't have to worry about a provider changing your model or charging you for every search.
Features
- Keep your training costs under control. Set your own budget, see estimated costs before each paid step, and approve spending before your agent moves forward.
- Train a custom model without doing all the hard work. Your agent handles the complicated training process and helps you avoid costly mistakes, so you can focus on building search that fits your app.
- Know how well your model actually works. Compare your search results against existing options and test them yourself in the included Mac app before adding the model to your project.
- Bring your own model into your app. Get the Swift code to integrate your custom model into your iOS or macOS app, with private, offline search and no per-search API costs.
FAQs
How much will training cost?
It depends on the size of your list and the training options you choose. Your agent estimates the costs upfront, helps you set a budget, and asks for your approval before every paid step. If something would exceed your budget, it stops before spending more.
Will my search work offline?
Yes! Once trained, your model runs entirely on your users' devices using Apple's Core AI framework. No internet connection, no per-search API costs, and no sending private search queries to third-party servers. Only the initial training and optional cloud comparisons need an internet connection.
How do I know if my model is good enough?
You don't have to guess! The starter helps you test your model against existing search options, including three free alternatives. This way, you can see whether your custom model actually improves search for your app before integrating it.
What kinds of search can I build?
This starter is designed for small, fixed lists, like your app's settings, commands, or product categories. It supports short English-language searches on iOS 27 or macOS 27. If your list changes, you'll need to retrain your model. For large or frequently changing lists, the included guide helps you choose a better approach.
How long does training take?
The initial training steps took about 40 minutes in the first test run, plus time for reviewing results and making decisions. Your agent handles the complicated work, but you'll still need to review important choices and approve spending along the way. Actual training times will vary.