Separate product behavior from the model that helps implement it.
1. Rules, ML and generative AI
A rule executes a condition you wrote. A learned model estimates a pattern from training. A generative model produces a candidate response. Use a rule for exact permissions and arithmetic; use a model where interpretation is useful.
2. Training versus inference
Training changes model parameters. Inference uses those parameters to answer an input. Calling a model from Kotlin is inference; sending a conversation history does not train a private model for your user.
3. The three Android AI workflows
You can add intelligence to an app, expose app capabilities to agents, or use coding agents to develop software. These have different users, permissions and failure boundaries. Pick one before selecting tools.
Worked scenario
A notes app can sort by date without AI. Summarizing an unstructured note may benefit from a model. Deleting notes must still use ordinary application authorization.
Apply it
Classify six proposed app features as deterministic, predictive or generative. Explain the cheapest adequate solution for each.
Check your understanding
You can explain inference and identify a feature that should not use a model. Explain the decision and show evidence from your implementation or design. If you cannot demonstrate it yet, revisit the relevant section before continuing.