Creating an in-universe AI computer in my app

Last year after Apple foundation models framework was introduced, I begin working on a separate test Playground project to see how to use the foundation model framework to create an AI computer in my app that only has knowledge of in universe content that comes from within my app.

Now with the OS 27 updates released I’m going back to work on that. I believe I can use the on-device system foundation model framework comfortably because I don’t think there’s a lot of content in my app that the AI has to know about

Do you have any advice for using instructions to tell the model to focus on only the knowledge boundaries from within my app universe or might there be new tools this year in using foundation models framework that might help me achieve the limited knowledge scope that I want the AI to recognize and respond to for my app users.

Answered by Frameworks Engineer in 892977022

Having a tool that can query a SwiftData database could help with knowledge like this. This way the context window can start small and the model can call your tool to get information needed as it progresses in the session.

Having a tool that can query a SwiftData database could help with knowledge like this. This way the context window can start small and the model can call your tool to get information needed as it progresses in the session.

Creating an in-universe AI computer in my app
 
 
Q