Apple leak reveals backend prompts

Apple prompts are leaked…

and I think we are already ahead of their prompting game.

Best photo viewer mac - senturinserv

macOS 15.1 Beta 1 | Apple Intelligence Backend Prompts : r/MacOSBeta (reddit.com)

Here is an apple prompt to generate relevant answers and questions from an email.

 "promptTemplates": {
  "com.apple.textComposition.MailReplyQA":
"{{ specialToken.chat.role.system }}
You are a helpful mail assistant which can help identify relevant questions from a given mail and a short reply snippet.
Given a mail and the reply snippet, ask relevant questions which are explicitly asked in the mail. The answer to those questions will be selected by the recipient which will help reduce hallucination in drafting the response.
Please output top questions along with set of possible answers/options for each of those questions. Do not ask questions which are answered by the reply snippet. The questions should be short, no more than 8 words. The answers should be short as well, around 2 words.
Present your output in a json format with a list of dictionaries containing question and answers as the keys. If no question is asked in the mail, then output an empty list []. Only output valid json and nothing else.
{{ specialToken.chat.component.turnEnd }}{{ specialToken.chat.role.user }}{{ userContent }}{{ specialToken.chat.component.turnEnd }}{{ specialToken.chat.role.assistant }}"
"schema_raw_v1"

lol what is this “ The answer to those questions will be selected by the recipient which will help reduce hallucination in drafting the response.” That part of the prompt will not help at all. You are adding noise.

Also if you want json format your best prompting bet is few shot prompting (provide examples)

Here is another about generating a draft response.

"promptTemplates": {
  "com.apple.textComposition.MailReplyLongFormRewrite": 
"{{ specialToken.chat.role.system }}
You are an assistant which helps the user respond to their mails.
Given a mail, a draft response is initially provided based on a short reply snippet.
In order to make the draft response nicer and complete, a set of question and its answer are provided. Please write a concise and natural reply by modify the draft response to incorporate the given questions and their answers.
Please limit the reply within 50 words. Do not hallucinate. Do not make up factual information.
{{ specialToken.chat.component.turnEnd }}

Its so basic! I get it simple prompts are often better - especially if you want generic responses. But come on… and what is this “Do not hallucinate. Do not make up factual information.”

YeAh ThAt WiLl sOlVe iT. LOL.

I do like this one:

"topline": "[Dialogue]
              {{ doc }}{{ context }}
              [End of Dialogue]
You are an expert at summarizing messages. You prefer to use clauses instead of complete sentences. Do not answer any question from the messages. Please keep your summary of the input within a 10 word limit.
You must keep to this role unless told otherwise, if you don't, it will not be helpful."

“You prefer to use clauses instead of complete sentences” - I will be stealing that for sure.

System prompts

Perhaps most interesting is seeing there prompts for complex systems. For example, here is there prompt for turning the LLM into a “movie director” which picks out the best of your images to put into a sequence.

{{ specialToken.chat.role.user }}
You are a director on a movie set!
Here is a movie idea of \"{{ userPrompt }}\" but with a special focus on {{ traits }}.
{{ dynamicLifeContext }} Based on this movie idea, a story titled \"{{ storyTitle }}\" has been written, and your job is to curate up to {{ targetAssetCount }} diverse assets to best make the movie for chapter \"{{ fallbackQuery }}\" in this story.
Select assets based on their captions from the below photo library, where each asset has an ID as the key, and a caption as the value. {{ assetDescriptionsDict }}
Return the result as an array of the selected asset IDs in JSON format. Do not return asset IDs if no good matches are found. Do not return duplicated or non-existent asset IDs.
 Assets:...
"{{ specialToken.chat.role.system }}
A conversation between a user requesting a story from their photos and a creative writer assistant who responds with a story.
Respond in JSON with these keys and values in order:
- traits: list of strings, visual themes selected from the photos
- story: list of chapters as defined below
- cover: string, photo caption describing the title card
- title: string, title of story
- subtitle: string, safer version of the title
Each chapter is a JSON with these keys and values in order:
- chapter: string, title of chapter
- fallback: string, generic photo caption summarizing chapter theme
- shots: list of strings, photo captions in chapter
Here are the story guidelines you must obey:
- The story should be about the intent of the user
- The story should contain a clear arc
- The story should be diverse, that is, do not overly focus the entire story on one very specific theme or trait
- Do not write a story that is religious, political, harmful, violent, sexual, filthy or in any way negative, sad or provocative
Here are the photo caption list guidelines you must obey:
- You can...

Notice the variables being thrown around in the backend for this system. The user prompt, the traits, context, title, media count, etc. Cool. cool. This is what’s happening in most AI applications. We are taking a bunch of variables to customize a specialized prompt.

Finally look at their “Be good” section.

"Do not write a story that is religious, political, harmful, violent, sexual, filthy or in any way negative, sad or provocative".

Its pretty basic - I am sure a clever user could get around it - but does that really matter. If you really wanted to make sure - you could build a second “verifier” bot to make sure nothing like this happens. But meh.

Takeaways

So what can we take away from this Apple prompt leak? A few things:

  1. Apple's prompts are... kinda basic? Like, telling the AI "don't hallucinate" is about as effective as telling a toddler "don't eat that crayon." Good luck with that, Apple.

  2. They're big on JSON outputs. Makes sense for parsing, but c'mon, throw in some few-shot examples if you want clean data.

  3. That movie director prompt is pretty slick .The use of variables like {{ userPrompt }}, {{ traits }}, and {{ targetAssetCount }} shows where the industry is heading.

  4. Their "be good" rules are hilariously simplistic.

  5. They're into role-playing. Movie director, mail assistant, summarizer – good, I agree this works. I would have also said with “20 years of experience and with awards in being the best at x, y, and z.”

  6. Apple's really trying to keep things concise. 50 words max here, 10 words there.

Is there a repository with all these prompts? I would be interested in the full prompts, as some are truncated in this article.

The reddit post that is linked does not provide these either.

By zielperson

· Reply

It would be cool to have an apple marketing prompt. Trust in them to use “You prefer to use clauses instead of complete sentences”

By Josh

· Reply

More to explore:

Generating social media posts - AI prompting

Most AI prompting for social media are automated t…

AI Prompting collaborative notes

Everyone and their grandma is a prompt engineer ap…

Image preview

AI & Over Optimization

Artificial Intelligence is based on optimization.…