Section Insights
Introduction to the Apple Intelligence Group Lab
Who are the panelists and what is the purpose of this session?
The session features a panel of experts from Apple's machine learning frameworks team, discussing new developments and addressing developer questions.
- The panel includes engineers from various teams at Apple.
- Developers are encouraged to ask questions and provide feedback.
- The session aims to enhance understanding of Apple's AI tools and frameworks.
Siri's Tool Intent Functionality
Can Siri interact with apps that are in the background?
Yes, Siri can interact with background apps under certain conditions, such as when the app is mentioned by name or is running a live activity.
- Siri's tool intent can be activated even when apps are not in the foreground.
- Specific conditions must be met for Siri to access background app functionalities.
- Developers should ensure their apps are indexed properly for Siri to recognize them.
Handling App Entities in Siri
What happens when a user taps on an app entity shown by Siri?
Tapping an app entity should trigger the corresponding open intent for that app, allowing it to run as expected.
- Siri is designed to open the app and execute the appropriate intent when an entity is tapped.
- If the expected behavior does not occur, it may indicate a bug.
- Developers should ensure their apps are configured to handle intents correctly.
Siri's App Intent Prioritization
How does Siri prioritize which app to use when multiple apps can handle the same request?
Siri uses various signals, including user behavior and interaction history, to determine which app to prioritize for a given request.
- User interaction history significantly influences Siri's app selection.
- Developers can improve their app's visibility by enhancing user engagement.
- Understanding Siri's decision-making process can help developers optimize their apps.
Dynamic Tool Creation and Localization for Siri
Can developers dynamically create tools for Siri, and how important is localization?
Currently, developers must define their tools at build time, but they can create flexible tools that utilize indexed entities. Localization of tool metadata is important for effective tool selection.
- Dynamic tool creation is not supported; tools must be predefined.
- Localization enhances Siri's ability to select the correct tool based on user requests.
- Quality of localized descriptions can impact tool selection accuracy.
Transcript
0:07 Hello, welcome to the Apple Intelligence Group Lab. I'm Ernie. I'm part of the evangelism team here at Apple. and I'm joined by a panel of experts from the machine learning frameworks team. I'd like to start off this morning with a quick round of introductions. Louie, why don't we start with you? >> Yeah, I'm Louie. I'm a an engineer on the foundation models framework team here at Apple. hi everyone. I'm Karina. I'm an engineer on the Core AI team.
0:35 >> Hi, I'm Roman. I'm an engineer on the App Intense framework team. >> Hi, I'm Leslie and I'm an engineer working on Siri. >> And my name's Michael. I run the App Intense core team. >> Awesome. Thank you, Michael. Thanks everyone for taking the time to be here today. In addition to those you see on screen, there's a team behind the scenes helping to triage all of your inbound questions. So, please keep them coming. If you have code specific questions or somehow we can't get to your question today, we'd really encourage you to bring your questions to developer forums at developer.apple.com/wforms.
1:11 We'll continue the discussion. If you have a bug or a feature request, we'd encourage you to go to feedbackass assistant.apple.com as we really want to focus on the questions that are going to help you the most. >> What do you mean bugs? We fixed them all this year, right? Yeah, there's actually bugs. We don't have bugs, but anyway. Okay, >> ideas are >> agreed. all right. So, we just announced the new Siri AI developer preview. Michael, can you tell us more about what we launched, what it means for developers who already use Apps?
1:43 >> Thanks, Ernie. We're very glad that all of you could join us live today. You are, after all, the reason we do what we do. We've been thrilled to see all of the adoption of our schema- based App Intense APIs from this year. designed for specific types of apps. With the developer preview we announced yesterday, we are taking the first step in expanding Siri's new capabilities like understanding personal context and natural language to every kind of app.
2:10 Yes, even yours. Using the new tool intent API, your existing app intents can become tools that Siri calls directly when people make requests. Siri can find your app's tools if your app is in the foreground or if it's named. You can also create custom app skills for Siri now, bundles with markdown files that help Siri master even complex app interactions. If you already use app intents in your app, you're already most of the way there. Just make your intents into tools and fill in language to describe them and their parameters.
2:43 Siri can also find content from any kind of app and act on it. All you have to do is create an entity to represent that content and index it into Spotlight using the indexed entity APIs. If you've already adopted those, you've already done the hard work here and we'd love for you to go test it out. We're also providing a powerful set of Xcode features for you to bring up and iterate on your Siri integration. The Siri integration advisor provides feedback on the shapes and descriptions of your tools and skills. And the Siri evaluations framework let you write scenarios to test and tune your tools and skills so they work no matter how people ask for them. Xcode now even includes a set of coding agent skills to take your app from no Siri to full Siri integration in no time at all. We would love for you to try all of this out in the iOS and Mac OS 27.3 betas. Since we're still refining the APIs, we are really looking forward to getting your feedback on them. Right now, you can test at desk and distribute using internal test flight with shipping to the app store coming this spring. Oh, and one last thing. You've told us that you want more control over the way your entities look in Siri AI. Well, we're introducing a new entity snippets API so the visual representations of your content can reflect the unique style of your app. You'll be able to ship these snippets to the app store when the 273 OSS are released. We are so excited to see what you're going to build. But first, time for questions.
4:09 >> Awesome. Thank you, Michael. Wow, that's that's exciting. I mean, what a big announcement. I mean, yeah, it's so great to to be in this world again here with us working with Siri. Okay, like Michael said, let's go ahead and get going with questions. Our first question, will users be able to provide their own written skills to influence how Siri AI handles specific tasks between multiple apps? You want to take a run? >> Sure. you should be able to provide written skills to influence how tools interact between each other in your app. but if your skill actually describes how it should be used with a different app, I think you should probably refrain from that.
4:56 >> Cool question on that. Like skills as in like being able to guide a more complex workflow. >> Exactly. Specifics. >> Yeah. You should be able to stitch together how multiple tools work with each other. Nice. >> Yeah, >> that's similar to like claude skills idea as well, right? Like aentic skills in general. >> Yeah, that's exciting. I can't tell you how many developers in our workshops have asked for this. So, a lot of very happy developers I know out there that we're we're now providing this. So, that's awesome. all right, next question. the new tool intent in Siri capabilities look promising. Do you expect this to replace the app schema domains? Do you expect the set of app schema domains to expand in the future?
5:40 Very good question. >> I can take that one. >> Yeah, Michael. >> So, as you can probably guess, we don't talk about future plans, right? >> but what I can tell you is that, app schemas are really great and really powerful for the domains that they do cover. if you work on an app that is focused around messaging, adopting an app schema will get you really broad capabilities with Siri and it will get it to you very will get you those capabilities very easily. because you don't have to do things like evaluate language that you've written for the model. All you need to do is implement the schema and it will work very reliably and very consistently across different invocation points. So they they are not going away and they're still an excellent fit for lots of apps.
6:20 >> You can also use them together, right? Like you might have an app intent that has a schema, but you could also create a new app intent maybe that doesn't have a schema. >> That's right. Yeah. And and you don't have to choose one or the other. It's often a complimentary thing. so if you are a calendar app you might want to implement the calendar schema but you might also write some additional appent that takes that same entity but does something custom with it something unique to your app that is totally reasonable.
6:45 >> Yeah I have to say too in the schemas you know we've done all the heavy lifting really you know a lot of great engineering work has been done so if you know a schema does work for what your app is trying to achieve by all means I I think you'll see a lot of saved time and value from using one of those schemas. So very cool. okay. Next question. Should app entity question or in parenthesis.generable be used when the entity is the only parameter of an intent and is it used anywhere else or should its properties be added directly to the intent in this case? Very good question.
7:22 >> I can try answering this one. so imagine that you have an intent that has all the parameters for creating a blog post and in that blog post you also have a option to add a poll. So let's think about like what kind of parameters would you add to that intent. There would be a title and the body of the blog post and the poll itself is going to be optional. So you don't have to actually fill in what are the options of that poll and like when it actually ends. So imagine that you want to group the all the poll information into its own entity and make it optional on that create blog post parameter sorry create blog post intent.
8:02 >> I'm curious like the general here is that similar to some of the generable that we've worked with foundation models in terms of guided generation constraints. is yeah the name is not a coincidence it has very similar it has a very similar role very similar name >> and the Siri will be able to actually fill in the properties of that generable entity >> that's really cool >> yeah really exciting >> and that's available through like core and foundation models as well on like constraint decoding and kind of generable in terms of outputting specific schema so that's like a consistent concept we have across frameworks >> yes >> that's great awesome all right next question for app entity types that use a schema domain. Does it matter if you add a custom title or description to a property?
8:48 >> I think if I remember correctly those are used in shortcuts but they are not used by Siri. So especially if you're implementing a property that the schema owns meaning that the schema defines you can add them for kind of visual treatment of shortcuts but Siri won't use them. >> So those are really strings to show in the UI right? Yeah, ex >> actually for the new tool intent schemas if you actually provide the title and description they will be used in Siri. Yes, that is different for for two intense >> I guess like they are used by the model themselves, right? Not just as like identify identifying but actually getting the model to be able to identify what tool to use better.
9:29 >> That's exactly right. That metadata is used by Siri to really understand what that parameter is going to be used for. And so it is quite important to you know review that title and description especially if you're adopting the new tool intent traits. >> Yep. And you you see the tools that we the the Xcode features we've added will guide you towards making those better. >> Right? If you're writing it to intent and you're like maybe I'm not giving quite the behavior I want often you can tweak those titles and those descriptions of the intent or the parameters and they will begin to they will perform better. Yeah, I think those are actually would be good recommendations for like bringing a custom model like tool calls and guided generation for foundation models as well because I I I don't think we provide specific guidance when you bring in like a open source model but I think those are pretty standard like how do you define a tool so that the model itself can retrieve it better. So we could borrow some like you guys' guidance.
10:22 >> Yeah, that's that's an excellent point. Great question. This next question I'm really excited about because we get asked it all the time. So, question is, what signals does Siri use to choose between my apps tools in a system app like calendar when a request overlaps both? Even with my app on screen, Siri want to calendar. Is indexing entities with index entity the recommended way to get considered? >> I see indexing.
10:52 >> I'd love to. So I think there are two parts to this answer. So I think for schematized intents like the ones that we released for calendar in 27.0 the foregrounded app does play a role in us like routing the request to your app. and that will work regardless of whether the user mentioned your app name or not. With the new tool intent API, there are a couple ways that the foregrounded signal comes into play. One is if you're foregrounded, then those tool intents are considered in context by Siri. And so Siri will consider your app's like custom tools that manage those calendar event entities as part of when when trying to process the user request. the second is when you when your app is in the foreground, you are able to expose entities on your views through the view annotations API and that will work now whether you annotate those views with schematized entities or non-skeematized ones.
12:01 >> Yeah, excellent. Great. Thank you for that response because definitely a question we get asked all the time is you know yeah how how does that decision get made? So thank you for that question. All right, next question. So tool intent is only for when the app is in the foreground, right? Can Siri call into tools for apps that are in the background as well? >> It can. >> Lesie, feel free to tell me where I'm wrong here, but there are several conditions that will bring your tool intensity into scope. one is the apps in the foreground. Two is the app is mentioned explicitly by name.
12:40 three is that the app is currently running a live activity. >> and four is that the app's entities are in context, usually from a search, >> right? So, if you use a custom notes app and you you index those entities and you ask Siri to retrieve that note by its name or by something in it, Siri finds the note. All of a sudden, your custom notes apps actions are also in play there. >> And if you want to archive that note or do whatever, you can. M >> does that sound right?
13:09 >> Yeah, that's exactly right. I think maybe the only thing I'd add is that the same kind of rules apply for skills as well. And >> so I guess >> that's awesome. Really powerful. All right, next question. How does Siri kind of similar to our previous question, but I think it has some unique aspects here. how does Siri decide between two apps that can handle the same request? And how does it rank our custom tools against Apple's built-in apps such as Notes or Mail? So similar to the previous question but a little different too. So very common question.
13:43 >> Yeah I so building I guess on the previous answer. So foreground is one signal that we use. So for schematized intents specifically foreground signal is one that we use. Interaction history is one that we use for schematized intents. but for tool intents we go through kind of the rules and signals that Michael already outlined just before. And interaction history it just means it means whether the app has been used basically and we look at both the we look at both like how often the user has launched or foregrounded the app but we will also look at your app's donations which is a really important point. So interaction donations are basically if you have an app intent that say opens a message and you ask and some the user ask Siri to open that message.
14:31 We'll of course automatically record that donation to say hey that happened >> and then we'll use that as a signal later on to to help prioritize your messaging app over another. However, if that happened within your app and the user is tapping around and chose by tapping around in your UI to open a message, Siri doesn't know it. And so it's a great idea to let Siri know about the fact that that happened. And the way you do that is using the intent donation manager >> APIs.
14:56 >> That's what she's talking about. >> Are these recommendations all documented? Because they would be really useful like to know the rules and and the prioritization. >> Yeah. there's some content in our dubdub talks from last year about this that Stephanie were seeing and then the the intent donation APIs are also pretty well documented in this. >> Yeah, a lot of great videos out there too from last year stepped up. Okay, next question. what's the recommended method to interface with Siri without indexing app data via Spotlight?
15:28 >> That's a good question. >> Let's see. so I don't I don't quite know if that is for if that's a question for the new tool intent stuff that we are releasing or the older schematized stuff. I think in general definitely the case that per indexing your entities with index entity is the preferred method here. If you can at all do it, highly recommend that you do. for schematized intense there are a number of domains which are designed to call your queries instead because we're aware that that not everybody can always index all of their content, right? For example, if you're working on a media app that plays audio, there's a query you can implement that instead of indexing all the audio because you probably have a large catalog and you can't index the entire world into the user's phone. Totally totally makes sense there. I think for tool intents the story is a little bit different where again indexed entity is still recommended. if you can do it you definitely should. but I think Lesie we have support for some of the some dynamic option provider and innumerable and stuff on those to retrieve entities as well. Right.
16:41 >> That's right. >> Do we support string query as well? >> not currently. And so to Michael's point we definitely recommend that you go through the indexed entity route where possible. >> Yeah. I guess like to jump in here in terms of like the model can produce an output but actually grounding it in something that is factual and like is the actual value that bas those those features all provide the grounding essentially right >> yeah this is this is like a I guess a finding question which is all about retrieval and I what you would call grounding yeah >> yeah I guess like you can bring in a lot of these open source models which can do tool calling but we don't have the mechanism like you'd have to implement in the application logic layer to validate that this is like the the valid value or like the valid entity that you're trying to call.
17:27 >> so I guess you guys are >> basically have provided all the implementations for >> app intense is very much a powerful layer of these models because it provides infrastructure like queries and entities to that creates that structure. So that structure doesn't have to be built custom for every developer for every tool which I think is a big value ad. >> Yeah. I wonder can that integrate with like Corey to bring even more powerful app experience like can Corey provide some of the I guess perform of the tool but the validation of of those tool parameters can be validated through app intense framework.
18:05 >> Yeah, actually that that brings up a good point that one of the things we realized as we brought up all of those tool intent infrastructure is you could do some really powerful things with it. it's it's more powerful than it initially looks. And like one of the things that you can do is you can take you can create a tool that takes a string which is basically a prompt, >> right? at one point a colleague of mine named it an NL tool, though that is not an official name. And so once you do that, you can take that prompt and you could put that into a foundation model call, >> into a query II call, into a server call to a different model, well, however you want. And that really unlocks a lot.
18:39 >> That's really >> once you realize you could do that. Yeah, that's awesome. >> That's great. Yeah, great stuff. All right, we actually have a question I believe is not about app intense and taii. So, >> all right. Yeah, it's getting wild and crazy here. >> can a navigation app run TTS inference on the neural engine while the screen is locked and audio is playing? Does the new background inference entitlement cover that? Yeah, I I think that's like a corei related question. Yeah. it I think that's a very specific question to the developers use case. I would say would want to check the background policies for the neuro engine to to comment on that. We'd have to basically look into this more. We could follow up in a separate thread.
19:30 >> yeah, that sounds great. Great question. So, please discussions come bring your question there and we're happy to follow up and get you a more detailed response. So, thank you for that question. All right, back to skills here. You keep mentioning skills. Is that skill.md? Do we just add this to the app for it to be in context same as the tool intent for an app? How do I reference this tool intent in the text so that Siri matches it up?
19:57 >> Want to take this one? >> Yeah, I'll take this one. >> Really good question. so in Xcode you go file and then create a new resource and then in that list of the resources that Xcode provides a list of the templates you should be able to select the new skills bundle. In that skills bundle it's basically a simple very simple structure where in the skills subfolder you list all your skills and provide the skill.md file.
20:22 that skill.md file has a YAML front matter and the markdown body. >> Mhm. what was the second part of the question? >> I think that let's see sorry here. Yeah, I think I moved on unfortunately from that question. So I don't >> Michael the thing you mentioned at the start too was that in Xcode there's now a skill to create those skills. Is that right? >> About a skill kill. yes. no there's a there are coding agent skills which you should definitely try out.
20:53 that will do all that will basically take a draft of this for you. you can you can ask them to take your app from zero serial adoption to fully serified. and we've tried this several times. It works incredibly well. It's very very cool and exciting. >> if you are using the Xcode assistant, you would just get them. So nothing special you need to do. Just ask. but if you are using quad or codeex or whatever other coding agent in the command line separately from Xcode, you do need to grab and install those skills. I can't remember the name now, but there's an XC run command line that that you can find which will dump those skills into the correct directory for your coding agent and it'll just pick it up.
21:36 >> Yeah, I would actually add on that to bringing in kind of the clawed skills we have brought into core models. So back to the previous question on like oh specifically about the hardware there there's some documentation like skills we've put out as well to basically help you like agentically target a specific hardware in terms of the specific layouts of the tensors. so I think these are all toolings we've brought into our stacks. >> Yeah, great question.
22:03 >> I remember the second part of the question. The question was how do you reference tools in that skill? That's a great question. so if your intent is called create blog post intent don't reference it like that use natural language so reference as a create blog post tool and u don't use the swift name in that skill.mmd file. >> Excellent. Excellent. All right. Next question here. all right. If two apps are open on an iPhone Duo, which will be used as the target for requests to be handled by tool intents, the last used or both? What if the two apps have been joined together explicitly by the user?
22:48 >> Yeah, I think one thing to mention here is that a foreground is not like an overwriting signal. So, if that you have multiple foreground apps, we're considering both apps when we are deciding which tool to use. >> Interesting. Excellent. Thank you for that. Next question. here's interesting. What What protections does Siri add when an app's own actions change data? So, I think what we'd recommend, feel free to to add folks, but I think what we'd recommend right now is you if you have an action that is potentially disruptive, or changes data in an irrevocable way, right? Or does something with a physical impact on the world like opening a garage door, say, we highly recommend that you confirm in that actions perform method that you want that the user wants to do this. you can write the language for that. and there's existing APIs request confirmation that you can call in the perform method to do so.
23:54 >> There's just like one line of code and then in the UI when you ask Siri to do it, it will like >> Siri will basically pause, ask the user, get an answer and then resume execution if if you get a yes and cancel it if you don't. >> Right. >> I guess like best practices is always like authorization happens at the application level logic. You can't depend on the model itself to guarantee anything, right? >> Yeah, that's good.
24:18 >> Great question. All right. Yet another Siri question. Big surprise, right? when Siri shows my app entities as results and someone taps one, what's supposed to happen? when my app is on screen even though my entity has an open intent, a URL representation and a spotlight index entry and none of them is called. Interesting. So, if if this happens on the Siri canvas, so in the Siri app, I would expect that if you tap on it, it'll open your enemy.
24:54 and that will mean it will run an open intent. It will try to find an open intent that takes that input and run it. if it happens in the dynamic island with Siri in the dynamic island, the same thing should happen there. if your app is open, I would actually still expect that it probably ought to run your open intent. if it doesn't, that's probably a worthwhile bug to file for us. >> That sounds like something worthy for feedback assistant.
25:20 >> Yeah, good feedback assistant one. Great. Thank you for that question. All right, another question here. I like this one because shortcuts we know have always played such a big part in the app intense ecosystem. So how much should we invest in app shortcuts phrases compared to letting Siri infer intent from entity definitions? >> Interesting. So, I think at this point the tool intent capabilities that we're releasing are capable of doing everything that the app shortcut phrase system can do just in a much more flexible natural languagey kind of way where you don't have to craft the explicit words you expect the user to say. and instead you just tell us what this thing does and we will take what the user says and map it, right?
26:07 so going forward, that's what I would lean towards specifically for the Siri interactions of your app shortcuts. Instead of having instead of handcrafting the phrases, you can take that same intent that is hooked up to your app shortcut. You can leave the app shortcut there. You can take that same intent and make it a two intent make sure that your entities are indexed and try it out. >> Awesome. Yeah, >> anything I'm missing? they could be a great foundation for some scenarios that you might write for Siri evaluations.
26:37 >> Oh, good idea. Yeah, >> if you are, you know, trying to port into a tool intent, it's great starting place. >> Those phrases that you've written are not wasted because you can directly turn them into scenarios. If you haven't played with Siri valuations yet, I highly recommend it. It is extremely it's a really interesting, very powerful set of APIs. and it's great not just for doing kind of your first sets of endto-end testing of like does this work in a golden perfect path but really for making your integration solid and robust because you can write many scenarios including obvious things people say and including not obvious people things people say. You can run them many times and you could tweak your tools and your language to make them increasingly perform better and better.
27:20 I'm curious like can you also see for instance like what are sets of tool calls that fit better for a specific use use case that you you'd want. So how granular I should make the tools be in this like evaluations framework would you be able to get those answers or iterate? >> Yes, I believe so. So the evaluations framework can assert on sort of whether or not certain tool calls have been made for that given request that you write in the scenario. So if you're trying to experiment with different tool tool intent shapes and like different combinations, that's definitely a great way to go.
27:54 >> I see. Nice. >> And it's very easy to get started with that. We have a Xcode skill for C evaluations and super easy just to ask Xcode to write your belts. >> Nice. >> That's great. Yeah. And speaking of the evaluations framework, we've got some really great videos from this year's Dubdc. Really incredible framework for working with foundation models and of course now with with Siri as well. So yeah, definitely something to to take a close look at and leverage in your development process here. Okay. next question, really good one. If someone is developing a new integration for an app that falls under the existing domains, should we adopt those or start fresh with this new setup?
28:35 >> very strongly recommend that please you adopt the existing domains. one thing you notice with the tool intent stuff is like I mentioned earlier and like the docs mentioned, there are a bunch of conditions that need to be true for the tool intent to get called. it's not always in scope, right? Your app has to be named or or or there's four things, but we think that covers a broad swath of of actual user kind of functionality, but the way that the schemas are called by Siri is different. They're callable at any time, right? without any app mentions, without any app foregrounding, without even results to seed them from search.
29:14 and therefore like very strongly recommend that if you are say a reminders app, you should start with the reminder schema. You can add to it, right? And we are very, you know, if there are any challenges with that, we're very happy to take your feedback on kind of in the area of these apps that that want both custom functionality and schematized. But definitely do not skip the schema and kind of use tool intense instead if you're solidly in the domain of that schema. There are many reasons why that's true.
29:41 >> We've also done a lot of hard work to make sure that schemas work very like excellent in Siri. So you don't have to write your own kind of skills files or provide any like titles or descriptions. We handle this for you. >> Yeah. >> Yeah. >> Really great stuff there. all right. We touched on this a little bit earlier, but question here is, how can we test Siri behavior? I've been in my tests. I've seen in my test the same type of voice request. Does not always behave the same? Maybe something has changed in iOS 27.3.
30:14 >> Great. let's see. So, two layers of testing, that that you probably want to think about for Siri. one is, the appetence testing framework which we just released at WWC. There is a great talk on it. and there's some good docs. it's designed to make sure that the basics of your implementation are right, which means when you call the app intent, does it do the right thing? Does it open the thing? Does it delete the thing or create the thing? it can also test queries, it can test spotlight indexing. It's really the kind of deterministic non-model part of the testing story. I highly recommend you start with that because it's going to be harder to bring up the rest if your foundation is shaky.
30:55 >> so test that, get that into your CI so it doesn't break. >> Once you have that done, you should test with Siri itself obviously like interactively, but you should also try the Siri evaluations framework. and that is really the basis for like these like non-deterministic kind of challenges of like how often does this work? It works sometimes. Does it work nine times in 10 or one time in 10? Does it work 98 times in 100 or two?
31:21 there's a big difference. but you know LLMs are nondeterministic fundamentally. and that's why Siri evaluations is built the way it is. It lets you run things multiple times. It aggregates data so that you can understand kind of at a statistical level how reliable this is rather than just being a yes, no, green, green or red you know kind of kind of answer. >> Yeah. And a large part of that is also about taking natural language input from the user, right? where sometimes it really is just ambiguous about what they really want to do given the many tool intents that you might have. so making sure that your evaluation covers that broadly goes a long way, right?
31:56 >> To get sort of that statistical signal of how well you're handling all of those different cases. >> There's there's definitely a process to to doing these evals, right? And you kind of start with the golden path of like does this work at all? If the user says exactly the right perfect thing and exactly the way we want, is it going to work? Yes. Good. Okay. I mean something is there >> but they won't always say that's only the beginning right then you broaden those out to be like what if they say it in an odd way what if they you know say this and not that >> like all the fuzzy testing you can do >> exactly >> yeah I would also come in with like there's the performance side as well right like tool design isn't just about what do you get the right tools but also like I guess end to end model execution do you do more round trips if you define your tools more granularly so I guess that you can also use Xcode instruments to like profile the entire like end to end latency, right?
32:44 >> Yeah. Yeah. Definitely great stuff. Definitely check out Siri evaluations. A lot of exciting new testing support there. All right. Next question. Is there a way to use app intent in parenthesis tool on an existing app intent where it can still be used with older OS releases. Instead of using the macro, can we just add a conformance to tool intent? >> Yes, that works. Yep. Can do that.
33:16 >> It works. The answer is yes. >> Succinct. >> Yeah. I know Xcode has that feature to see what a macro because tool intent it's a macro, right? >> It's a macro. Yeah. >> And Xcode has that feature to show what a macro generates, right? Because really macro in Swift is just generating how they found it. >> You click expand the macro. You can see what it generates. So you can >> and then you could like do that conditionally on an extension or something with availability.
33:40 >> Yep. Yeah. Awesome. Yeah. >> Yeah. Good stuff. Great question. Okay, next one. What's an app intense implementation that impressed you and what made it work well? I'm curious. What separates a clever one from a merely functional one? >> That's a good question. I'm sure we all have answers to that one. >> That is a curveball. >> Yeah. Like give an example is the question or >> Yeah. What an ampetent implementation that impressed you and made it work well.
34:06 >> Not one you wrote yourself, Michael. >> Yeah. Yeah. Right. I don't know. should we name third party apps? Is that should we look at first party apps instead? >> Yeah, I wouldn't name third party by name but maybe discuss. Yeah, be my suggestion there. >> you think about it. I guess in the first party world, you might want to check out notes on the new beta. I know some of the folks that worked on that and they did some really clever things. I think folks have already spelunked so I can say this. There's a skill in there.
34:40 >> Mhm. >> Which allows nodes to do text editing in a really interesting clever way and it it works pretty well and it's it's very cool. >> That's just one kind of recent example from the the Apple side of it. >> Mhm. Yeah. Yeah, I mean the thing to highlight there I think is that the same APIs and tool intents all those things that we now give to developers we also use that for our own apps on the OS right >> so yeah it's it's really opening up >> right yeah >> we do that for foundation models framework as well >> like first party and third party they adopt >> yeah exactly yeah yeah we as much as possible we we want to yeah dog food our own things >> right yeah for me I'd say some of the experiences where it really reduces the friction of the user are the great experiences. Like you're running through an airport, you're trying to find what your gate number is, that kind of thing.
35:27 Your hands are full with you know suitcases or your kids and you know Siri comes to the rescue with AppSense, right? So yeah, >> I can't say like even without naming specific like apps that that I've seen adopted. I'm already seeing folks send around adoption of two and 10 and it's it's like super cool and what I was hoping would happen is happening which is you folks do things that we couldn't imagine. that that happens every year. that's why this is so exciting.
35:53 >> so really looking forward to to seeing all the cool stuff. >> Yeah, totally. It'll be really great. All right, we actually have a question on foundation models, Louie. All right, finally got you going here. >> I knew I had to come in today. >> There you go. foundation model has a relatively small context window of 4,96. M >> is there a way to access a larger context window or best practices for running tools that would have data that would exceed this context size in a single request?
36:23 >> Is the context window size on PCC public? >> Yeah, I mean there's a couple questions in there. I think starting with the good news, we increased the context size from 4K to 8K this year on most devices. so that's the good news for the ondevice model for PCC. yeah, we we publicly documented that gives you 32K context size. so a lot more you can do with that. Now in terms of if if really you want to try something on device that requires even larger than 8K, I think bringing in custom models potentially with core AI but still using the foundation models framework, right? as the API, I think is a really natural way to do all sorts of custom things that you might want to do.
37:06 >> Yeah. to give an example like you can easily bring in Gemma 4 now which supports up to like 100k context depending on the hardware and kind of the the variant of the model you bring in and via Foundation models which we've hooked up with with the protocol you can basically look at what is my use case what are kind of the the tool cost I want to bring in that would require like more context window and then use one of our existing optimized hardware optimized recipes to do that Yeah. No, that's great. Good stuff.
37:39 okay. Next question. How does Siri determine which app intent to prioritize when multiple apps or system apps offer similar functionality? What factors influence its decision? And how can developers improve their apps visibility and selection accuracy? So, kind of similar to a previous question, but >> I I think yeah, I think we sort of answered this in that for schemas it is based significantly on user behavior. when I did the the talk on Tuesday at WWDC I worked on a time wrap and as an example and of course as as I was developing it I initially had to name it and then I stopped having to name it because Siri got to the point where I'm like set a timer and it was like yep I'm going to use your app and so something similar what happened here one thing developers can do to help is make sure you donate interactions that happen within your app because we I should say Siri can't see those, right? They're opaque to Siri unless you help out. and so by doing so, you essentially teach Siri how people use your app. and you give Siri that behavioral information that allows it to say, "Hey, like this user is constantly creating reminders in my app when they want to create a reminder. Really should consider potentially sending that to an app."
38:52 Again, that is not a guarantee. but it is a signal that Siri uses and one of the ones that is more under your control. >> Excellent. Good. Thank you, Michael. All right, another Siri question. how can Siri recover from failed interactions? A big problem with Siri is that it will just throw out request when an app doesn't support some aspect of the request. I asked a question, the route fails and Siri offers no recovery. My request is just dropped. A really good question. Yeah, >> take that one. Yeah, >> of course. so I think with especially with the new tool intent API and integrating with Siri AI, I think when a tool throws an error, the model will try to retry and find another way to succeed.
39:37 >> >> obviously if the tool itself is throwing the error and with a particular error dialogue, we will respect that dialogue and tell the user directly. but one thing that you can try is try to throw errors that maybe can suggest what what should happen next or whether there's an alternative way to do this. skills are also a great way if you're starting to see that the way that your tools have been exposed to the model like Siri is not behaving in this in the sequence that you expect. and so I would definitely try out a couple of those avenues first.
40:11 >> maybe two things to add here. Roman, do you want to maybe talk about error error throwing in in appetites because I don't know that everyone knows the right ways to do those? >> Yeah, there is a protocol called custom localized string convertible and if you conform your error to that protocol, you should be able to provide pro provide the localized string resource which represents the user visible error and if you throw that error will actually display that error to the user.
40:36 >> I see. and then just one thing about skills in general, you should, you should only use them if you need them, right? Which means you should really try to get your tools right first. >> it's not great if you're using a skill only because your tool is poorly designed, right, frankly, and the model isn't doing a good job calling it. You may want to consider like iterating on the shape and structure of your tools and on their language before you introduce a skill. but definitely use skills when you need specific things like coordinating multiple tool calls into a workflow, right? as an example, Finder has a cleanup feature now. where you can, you know, be looking at a folder and ask it to clean it up that is built using a skill.
41:20 because it's coordinating multiple tool calls in this complicated and opinionated way that is kind of designed by the Finder team. >> Interesting. >> Excellent. Great question. Thank you. All right. Next question also on Siri. when Siri says my app doesn't support that even though a matching tool intent exists, how can I see which of my tools Siri actually knows about? And how do I force it to pick up my tools again during development? That's a good question. Hear that a lot.
41:51 >> I don't know. Wesley, do do I don't think we have a way for our developers to dump that, right? >> I don't believe so. the Siri valve framework I think only asserts on whether the tool was called at all not whether or not Siri was looking at that particular tool. >> and so I think what I would recommend is definitely running that the Xcode Siri integration advisor first. Let's see if there's anything that it flags.
42:17 maybe it's metadata that's missing. one thing you can also try is, especially in local development, just prompting Siri saying like you want that particular tool to see if we're even able to call it. >> >> and another thing that you can try is to maybe add some of the search keywords to the intent description. M >> one thing that we see is like >> there may be many different synonyms or different ways that keywords that people tend to use to invoke that particular action and so you might want to add a couple of those variations there.
42:53 >> one thing I would also do a little bit of internals but something that will help you is look at the metadata in your app. if you open your app bundle you see that there's a folder in there called metadata.app app intense and inside there is something called extract that actions data if you open that it is just a JSON file and you can just read it and so sometimes if there's a problem with the app where something is not being extracted or for whatever reason we're not able to detect the tool maybe it's not being compiled where you thought right or something funny like that or maybe the availability is weird sometimes you could tell by looking at it there that is kind of the first thing to check >> and serial integration advisor should be able to do the same kind of right because it looks at the metadata itself.
43:37 >> Mhm. >> Yeah. Great, great points, team. I was to suggest, hey, great option, great option, too, is filing a feedback request. If you have some ideas, yourself on how maybe to approach this, we'd love to get your your insights on that. So, thank you for that question. all right, next question. I want to replace my old Siri kit intents. Aha, Siri kit. Here we go. I love this. and custom intent migrated app intent with new app intents for users on 27.3 and later. How do I make is discoverable version dependent and apply the same behavior to migrated Siri kit intents so they no longer appear in the shortcuts app?
44:19 >> Interesting. You want to explain? >> It's a really good question. for the custom migrated intents I think there's a protocol where you can say it's a deprecated intent it's not going to appear in the shortcut search and if the user has the intent in their library it will show up as a like this intent is deprecated and I think there's a way to provide a message that we're not >> yeah would availability help them here like if if they set a lower availability I'm not quite remember, but >> okay, this that's a very specific question. If the advice you've gotten so far doesn't help, a forum post would probably be a good idea. and we can see if we can zero in on that for you.
45:05 >> Yeah, that sounds great. All right. next question. How do you imagine internal visibility parameters being used? I can see it being useful for passing data between app intents especially when you mentioned by a skill. Are there other use cases you had in mind? >> It took me a second to understand what they were talking about but I think I understand. Roman, you want to take this? >> Sure. the skill is a good example. Essentially, you want to stitch two actions together and one action passes the entity and another action actually takes the entity and this is the way to preserve actually the data in that entity.
45:47 >> Michael, do you think what would be the other good use case for internal >> I don't know if do they mean parameters or do they mean properties? >> Properties or >> I think they mean properties, right? Okay. because I I don't think that's a public way to do internal visibility for intent parameters. I think that any purpose. Yeah. So these are these also really good for like widgets, >> right? you might have some information that you specifically want available if that entity is used in your widget but like as a as a parameter like for configuration or for interactivity, but you don't want Siri or shortcuts or other features to be able to see it. That's a lot of what that's for. It's essentially a way of saying hey this is for this is a field in my entity that is for me communicating with my code. It is not meant for shortcut Siri or other system features that discover right or just look at the whole thing. Please hide it from there. That's that's kind of what that API does.
46:45 >> But it also works in shortcut. So if you have two actions and again you pass the entity around between those two actions you should be able to pass the you will see as a developer >> but users in shortcut won't be able to kind of choose it. Yep. >> Right. >> Yeah. Excellent. All right, next question. How do you recommend testing Siri interactions across languages and accents, especially in multilingual markets like Southeast Asia? That's a good question. That's a really good question.
47:14 >> I don't know if I have great answers for that at the moment. Does anyone have thoughts? >> I think LMS are capable of using like different local and languages and they should be able to understand this fairly easily. That's my opinion. >> Yeah, I think I think we have found you often you can localize the language in your app intents, but that's only necessary necessary if you're showing them to users like if people will see them. because if it's really just for a model, models are very multilingual, right? Like they don't really have a problem reading something in French or German or what have you. in terms of accents, I think that's probably at a bit of a different level, right? That that isn't something you can probably control. That is more like an ASR recognition thing where you probably want to file feedback requests on us if you're seeing problems with an accent rather than it being something that you need to fix, right?
48:13 What's in your control is just handling diff writing different scenarios in different languages and with different kinds of phrasing. Right? If you think that even say among the English-speaking countries, folks in one country might phrase things differently than the other, you can write scenarios for all three and make sure that your language work that your tools and skills and everything work well for all of them. >> Excellent. Great question. Thank you for that question. okay, can we dynamically create skills or tools allowing users to define or customize what's available?
48:46 >> Take it. no, it's not currently possible and you need to provide all your skills and tools at the app build time. >> That is right. there's lots of very strong kind of safety security reasons why that's the case. however, you do have flexibility in how you shape your tools, right? And often you can get surprisingly dynamic behaviors even if you cannot literally completely recreate the tools. because tools can take entities, entities can be indexed and can be dynamically retrieved. There's a lot you can do even even if you can't dynamically change the tool shape itself.
49:26 >> Excellent. Great question. All right, next question. Does Siri AI read tool titles, descriptions, and add parameter descriptions in the devices language or only the app's development language? Must we localize tool and entity metadata for Siri to pick that right tool in other languages? Does description quality per language affect tool selection? Wow, a lot of good questions here. >> Great. Yeah. we do pull the intent, title, and description in the system language of the device. And so, as folks have mentioned here, the LM is, you know, surprisingly great with many languages. And so, we are able to handle that. I believe there was a second part to that question.
50:12 >> Yeah. So, must we localize tool and entity metadata for Siri to pick up the right tool in other languages? >> Oh, I see. it is a great idea to localize especially your intent title and description. because >> one of the things that we look at when trying to decide which tool to select is user's request. And so if the user's request is in a given language, it's great if your intent, title, and description are also in that matching language.
50:42 >> Yeah. >> I mean, in general, I think like more broadly, right, like with LMS and tool calls, if we use like chat templates for some of the open source models in terms of deciding what tool calls to to grab. So if for instance, it's like in a different language and you put it in the chat template, then that's it's more likely for the model to behave correctly, >> right? >> Yeah. >> Nice. Yeah. And also you need to be mindful that your app intent can show up in multiple surfaces.
51:06 >> So for example, if your tool intent works in Siri, you should also see what it looks like in shortcuts. >> Absolutely. >> And there the text is user visible, right? So there's a stronger incentive there to localized. >> Visible and localized. Yes. >> Yeah. That's great. Good question though. Wow. Loving these questions getting us work giving us a workout here, which is what we love. can we apply tool intent intent in parenthesis tool to existing app intents that run on older OS versions?
51:38 >> I think we took that one, right? >> Yes, it's possible you can just confirm. >> Check the check the video on demand. but yeah, you can >> you can Yeah, sounds good. Okay, I saw somewhere that Siri will be able to understand and pre- slug multiple app intent parameters at once instead of just one at a time like the current behavior with app shortcuts. How does one opt in to this behavior? Pre- slug multiple app intent parameters.
52:06 >> Yeah, I'm I'm not sure how to parse pre- slug, but just when you use a tool intent, >> that is how it will work, right? Siri is no longer limited like the app shortcuts system is where with an app shortcut you can only have one parameter and it needs to be kind of innumerable. We need to know all the options ahead of time. that's no longer the case. So Siri can fill in as many parameters multiple parameters and can fill them in generatively, right? It can it can write a string. It can do anything you anything it needs to there. obviously tons and tons of parameters, especially tons of required parameters will probably start to not work so well. which is why tool something like the Siri the Siri integration advisor that you can run in Xcode will give you feedback if your tool has a lot of parameters. that doesn't mean that it definitely won't work but when you have a lot it starts to be like it may not work well. So that's why we're we're giving you that advice. But yeah, you're definitely no longer limited to one and you're definitely no longer limited to >> a specific list for that parameter.
53:06 and nor do you have to opt in specially to this behavior. you just make use tool intent and that's the behavior you will get. >> Yeah. >> Is that because of kind of like the inference workload as well? So if you have like way too many parameters you have to pack that all in to the context before you even can do a model inference. Is that part of the consideration? >> >> definitely with the many parameters that's one of the concerns. Yeah.
53:29 >> I see. Yeah. I see. >> and if you have by the way a group of many parameters that you are repeatedly using right that's where generable entity can help or one of the areas where it can help. So pack those up into a general entity. Have that be one parameter. and then Siri will make the entity for you. And that's really useful if that same set shows up in like five different places so you don't have to keep repeating.
53:52 >> Awesome. Really good stuff here. All right. Next question. You can say the app should be named in the Siri request. Can we use synonyms if our app name is difficult to say in foreign languages for instance >> or difficult to identify by Siri? >> currently we don't support the app synonyms for tool intents. So not not not in 27.3. >> That would be a really good feedback >> feedback request. Yeah, I was just going to say so. Yeah, great question though.
54:20 awesome. Look forward to seeing your request on that. all right, next question. Oncreen awareness. when using on-screen awareness, Siri AI used to not be able to understand custom non-skema entities even though they were indexed. Is to calling the route to improve understanding what's on the screen? >> Interesting. So, I think as part of this preview, let's say, correct me if I'm wrong, that should change. >> you don't need tool calling for it.
54:52 Just by having an indexed entity, right, Siri will be able to understand it in find it in spotlight and understand it if it's on screen. you you all you need to do is adopt it run it on the new beta recompile against the new SDK and run your app either at desk locally in Xcode or with the internal test flight. >> That's it. >> That's exactly right. There's no no more of those schematized entity restrictions for on screen and spotlight.
55:18 >> That's great. All right, next question. Can we discuss how many app intents can be included in an app and what the relationship is between intense tools and how a user interacts with these systems in Siri AI? >> You should maybe take that first, but >> yeah, so I believe we do have a maximum limit on the number of tool intents that your app can ship. I believe that's 40 right now is where we landed. Yeah.
55:44 >> and what we do recommend is that you target your key capabilities of your app first and you know iterate on those the the shape of those tools run them through the AVL framework as we've been saying before you start expanding to other capabilities in your app since you do only have 40. So it does pay to prioritize there. >> as for the relationship like in our system tools are intense. Intents are tools. They're one and the same.
56:14 when a user has an interaction with Siri the the assistant Siri may run many tools slash intents in sequence to achieve a complex goal. >> Mhm. >> Right. >> I see. So like the more tools you might define Siri might try and do more things which kind of can possibly like make the inference a lot longer like time to first token. Yeah, there's that with the number of tool calls that you chain and also just having that number of tools shown to the model definitely is going to in some cases may confuse the model especially if they overlap or if there's something about the description that is kind of vague about why we would why we would want to call that particular tool. So that's why I say like it's definitely better to go with an iterative process so that it's like clear to the model first and you're confident that the model knows how to use that tool before you start adding new ones.
57:08 >> Yeah, >> that's part of why Siri evaluations is so important, right? Because it is designed for you to be able to iterate not just on the language, although you will certainly do that, but on the entire shape of your tool set, right? You may start out with 50 things, then you may be like actually I can reduce this to three and then you might be like, well that's reducing too much. I actually need five and maybe you ship with 10 and that will be the thing that works right like you you have to try these things and writing scenarios with Siri evaluation and trying it is a really good way to to get that done.
57:37 >> Yeah, totally agree. All right, next question. how do you suggest we educate the user about the availability of tool intents or app schema domains for our app? Very good question. >> Really good question. We we hear a lot of these kinds of questions in our workshops. >> Yeah, that's a good one. I think that is one of the challenges of of voice interfaces, right? It always has been. >> Mhm. >> It's no different now. I think we have seen apps do onboarding of various kinds saying, "Hey, we now have the ability to X. Here is a couple sample phrases that you might say."
58:16 that's >> something you should consider trying out. If you run into problems with with doing that, like you're missing any information, please let us know. That's a good again good feedback request. But that's that's kind of what I've seen most of the third party apps do. >> You can also ask Siri, right? What an app can do. You'd ask Siri like what can the notes app do? And it'll it will like tell you, I believe. >> Yeah, that's you 27.3. You can just ask Siri.
58:39 >> Yeah. >> Yes. >> Yeah. That's great. Great question. all right. We have a Corey AI question. I love it. >> Nice. >> Okay. Core AI seems like a big opportunity for the future. In our current testing, AI model and AI model C files appear to be compiled on device after download before use that requires 40 GB of free space for a 4 GBTE model and takes minutes. Is there a way to pre-ompile architecture slices to prevent this?
59:09 >> Yeah, that's a really good question. Actually a lot of the kind of bottleneck we see with shipping large language models is that you the kind of compilation process takes a lot longer than previous like classical machine learning models. So what you can do is ahead of time compilation that's actually a new feature we have with 27.0 like release. So you can basically specialize for the hardware ahead of time even before you bring it to your device. So, I know we're running out of time, but there's a lot of documentation. We have a dubdubdub DC video where we share more about that.
59:45 but yes, exactly. Like there there's a lot that you can take advantage of in Corey. >> Yeah, plus one of the great videos on Corey from this year's Dubdc really gets into the nuts and bolts of Corey. So, really exciting stuff. And like you said, Karina, unfortunately, folks, we are almost out of time. I know time flies. You're having fun. A lot of great questions. but again, you know, we're thankful that you've all joined us today. We hope that you found this to be really helpful. I also want to special thanks to our panelists. Thank you. Your very busy schedules. as well as all the folks working hard behind the scenes to make this happen today. So, as we mentioned earlier, if you didn't get we didn't get to your questions, please visit us at the developer forums at developer.apple.comforms where we continue we can continue the discussion and of course feedback assistant file any bugs or feature requests. we really do appreciate your bug reports and feedback.
60:40 >> Look forward to seeing what you develop with the the new developer preview. Have an awesome day.
Summary
- Introduction of the new Siri AI developer preview, enhancing Siri's capabilities for all apps.
- Developers can now use the tool intent API to make app intents callable directly by Siri.
- Custom app skills can be created using markdown files to facilitate complex interactions.
- Siri can now find content from any app, provided it is indexed properly using the indexed entity APIs.
- New Xcode features, including the Siri integration advisor and Siri evaluations framework, support testing and refining Siri interactions.
- Developers are encouraged to donate interactions to improve Siri's understanding of app usage.
- The importance of localization for tool titles and descriptions to enhance visibility in different languages.
- Developers can utilize existing app schema domains alongside new tool intents for better integration.
Questions Answered
Who are the panelists and what is the purpose of this session?
The session features a panel of experts from Apple's machine learning frameworks team, discussing new developments and addressing developer questions.
Can Siri interact with apps that are in the background?
Yes, Siri can interact with background apps under certain conditions, such as when the app is mentioned by name or is running a live activity.
What happens when a user taps on an app entity shown by Siri?
Tapping an app entity should trigger the corresponding open intent for that app, allowing it to run as expected.
How does Siri prioritize which app to use when multiple apps can handle the same request?
Siri uses various signals, including user behavior and interaction history, to determine which app to prioritize for a given request.
Can developers dynamically create tools for Siri, and how important is localization?
Currently, developers must define their tools at build time, but they can create flexible tools that utilize indexed entities. Localization of tool metadata is important for effective tool selection.