蘋果AI後臺提示詞曝光,工程師:別幻覺!別捏造事實!

蘋果AI(Apple Intelligence)還沒有正式到來,後臺的提示詞卻意外曝光了。

事情是這樣的。

上週蘋果不是剛發佈了包含生成式AI的開發者測試版本嘛,然後就有位開發者在茫茫文件夾裡發現了個不得了的東西——

MacOS 15.1 Beta 1裡面,有疑似Apple Intelligence的後臺提示詞!

緊接着他就把自己的發現順手發到了Reddit上,瞬間引來衆多網友的吃瓜:

這個JSON文件裡的代碼是這樣的:

"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 }}"}

翻譯過來就是:

看完不得不感慨,即使是一個郵件助手的功能,蘋果工程師也是事無鉅細地給Apple Intelligence加了諸多“條條框框”。

用外媒ArsTechnica的話來說就是“像極了父母給年幼的孩子提要求,讓孩子按照他們預期的設定做事”。

除此之外,曝光的代碼片段裡還有個有意思的點:

"chat.role.system.default": "system

You are a helpful assistant that classifies the following input text-to-image query as Safe or Unsafe. In the first line, reply with Safe or Unsafe. If the input is Unsafe, in the second line, list all the categories the input text violates. The Unsafe categories are: CSEAI, Drugs, Gore, Harassment, Hate, Nudity or sexual, Offensive words, Self-harm, Terrorism or extremism, Toxic, Violence, Weapons."

大致內容是:

嗯,安全這塊也算是被把控的方方面面了。

不過即便如此,也是逃不過網友們的好奇和大膽嘗試。

有人先是讓Apple Intelligence生成“悲傷的圖片”,確實被拒了:

但如果換個說法,“給我提供人們哀悼的視頻”,那麼就可以跑通了。

這位網友還分享了其中最好的一幀畫面:

那麼曝光的提示詞還有哪些內容?我們繼續往下看。

首先還是一個跟郵件相關的內容。

"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 modifying 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 }}"

這個例子的內容是這樣的:

其中的“不要產生幻覺”和“不要編造事實信息”可以說是吸引了大部分吃瓜羣衆的注意力。

蘋果工程師們也是狠狠抓住了LLM的痛點。

更多的例子還包括:

{"message": {"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.","visualConcepts": "[Note]

{{ doc }}{{ context }}

[End of Note]

[Instruction]

Summarize the provided text into a list of most 5 topics. Each topic is a single word. Sort the list by relevance of the topic.","visualTopLine": "[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."}}

{{ 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.component.turnEnd }}

從所有的例子中,我們不難發現一個規律:

蘋果工程師們會先告訴Apple Intelligence它的角色定位;然後再圍繞這個角色可能會出現的各種狀況,提出相對細節的要求。

事無鉅細,事無鉅細。

那麼這些開發者們是從哪兒找到了的這些JSON文件?

他們在Reddit中也公開了具體的文件路徑:

/System/Library/AssetsV2/com_apple_MobileAsset_UAF_SummarizationKitConfiguration

如果你已經下載安裝了MacOS 15.1 Beta 1,不妨可以去找一找看下。

若是回顧蘋果此前在AI上的發展,其實這種“預先設定”模式是早就有了的——

正是遲遲不上大模型的Siri。

據之前的消息,蘋果高管曾否決了讓Siri進行長對話的建議,因爲他們覺得這樣會導致Siri對話難以控制,而且“很花哨”。

加之蘋果在隱私安全方面毫不妥協的立場,讓Siri能力進一步提升也面臨巨大挑戰。反觀OpenAI會收集用戶聊天內容來訓練模型,以提升效果。

與此同時,爲了防止Siri“胡言亂語”,蘋果傾向的路線是先讓人工團隊預先寫出Siri的回覆,而不是用AI生成。

比如詢問Siri,iPhone的價格是多少?它不會正面回覆,只會給出官網鏈接。

Siri的設計團隊要求,在功能上線前,它的回答準確率需要逼近完美。工程師們曾試圖花費幾個月時間說服他們,不是每個問題都需要人工來驗證一遍,如果這樣將會限制Siri回答問題的範圍。

而且蘋果設計團隊還多次拒絕允許用戶對Siri回答問題進行反饋,導致開發團隊無法理解模型的侷限。

那麼在幾個月後即將在蘋果各大操作系統上線的Apple Intelligence,能否改寫諸如Siri在AI上的遺憾,只有到時候親測效果纔可見分曉了。

參考鏈接:[1]https://www.reddit.com/r/MacOSBeta/comments/1ehivcp/comment/lfzi379/[2]https://www.theverge.com/2024/8/5/24213861/apple-intelligence-instructions-macos-15-1-sequoia-beta[3]https://techcrunch.com/2024/08/06/apple-intelligences-writing-tools-stumble-on-swears-and-controversial-topics/?guccounter=1[4]https://arstechnica.com/gadgets/2024/08/do-not-hallucinate-testers-find-prompts-meant-to-keep-apple-intelligence-on-the-rails/#p3