Create a study guide for me based on all things related to Foundation Model Framework
Asked on 06/14/2025
1 search
Here's a study guide on the Foundation Models Framework based on the content presented at WWDC:
Overview of the Foundation Models Framework
-
Introduction to the Framework
- The Foundation Models Framework provides access to an on-device large language model with a Swift API. It is available on macOS, iOS, iPadOS, and VisionOS, allowing for enhanced app features like personalized search suggestions and itinerary generation, all while maintaining user privacy since it runs offline and is built into the operating system.
- Meet the Foundation Models framework
-
Key Features
- Guided Generation: Allows for structured output in Swift, enabling developers to define data structures that the model can generate automatically.
- Tool Calling: Lets the model autonomously execute code defined in your app, enhancing its capabilities.
- Stateful Sessions: Built around the concept of sessions, allowing for custom instructions to guide the model's responses.
- Streaming APIs: Provides options for displaying responses incrementally, improving user experience by reducing perceived latency.
- Meet the Foundation Models framework
Deep Dive into the Framework
-
Sessions and Generable
- Sessions are central to interacting with the model, allowing for text generation and more complex outputs using the Generable feature, which helps in obtaining structured data.
- Deep dive into the Foundation Models framework
-
Dynamic Schemas and Tool Calling
- Dynamic schemas provide runtime control over the model's output, while tool calling enables the model to interact with custom functions, enhancing app interactivity.
- Deep dive into the Foundation Models framework
Prompt Design and Safety
-
Prompting Best Practices
- Effective prompt design is crucial for obtaining desired outputs from the model. This involves crafting clear and concise prompts and understanding the difference between instructions and prompts.
- Explore prompt design & safety for on-device foundation models
-
AI Safety
- The framework includes built-in guardrails to prevent harmful outputs. Developers are encouraged to implement additional safety measures tailored to their app's use case.
- Explore prompt design & safety for on-device foundation models
Practical Implementation
-
Code-Along Session
- A practical session demonstrating how to integrate the Foundation Models Framework into an app, focusing on prompt engineering, tool calling, and streaming output.
- Code-along: Bring on-device AI to your app using the Foundation Models framework
-
Developer Experience
- Insights into integrating the framework with Xcode, including using the Playground macro for live feedback and testing.
- Meet the Foundation Models framework
This guide provides a comprehensive overview of the Foundation Models Framework, covering its features, best practices for prompt design, safety considerations, and practical implementation tips.

Deep dive into the Foundation Models framework
Level up with the Foundation Models framework. Learn how guided generation works under the hood, and use guides, regexes, and generation schemas to get custom structured responses. We’ll show you how to use tool calling to let the model autonomously access external information and perform actions, for a personalized experience. To get the most out of this video, we recommend first watching “Meet the Foundation Models framework”.

Platforms State of the Union
Discover the newest advancements on Apple platforms.

Explore prompt design & safety for on-device foundation models
Design generative AI experiences that leverage the strengths of the Foundation Models framework. We’ll start by showing how to design prompts for the on-device large language model at the core of Apple Intelligence. Then, we’ll introduce key ideas around AI safety, and offer concrete strategies to make your generative AI features safe, reliable, and delightful.