apple-intelligence

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Apple Intelligence Skills

Apple Intelligence技能

Skills for implementing Apple Intelligence features including on-device LLMs, visual recognition, App Intents integration, and intelligent assistants.
用于实现Apple Intelligence功能的技能,包括设备端LLM、视觉识别、App Intents集成以及智能助手。

When This Skill Activates

本技能的适用场景

Use this skill when the user:
  • Wants to add AI/LLM features to their app
  • Needs on-device text generation or understanding
  • Asks about Foundation Models or Apple Intelligence
  • Wants to implement structured AI output
  • Needs prompt engineering guidance
  • Wants camera-based visual intelligence features
  • Needs Siri, Shortcuts, or Spotlight integration via App Intents
  • Wants to expose app actions or content to the system
当用户有以下需求时使用本技能:
  • 想要为其应用添加AI/LLM功能
  • 需要设备端文本生成或理解能力
  • 询问关于Foundation Models或Apple Intelligence的相关内容
  • 想要实现结构化AI输出
  • 需要提示词工程指导
  • 想要基于摄像头的视觉智能功能
  • 需要通过App Intents实现与Siri、快捷指令或聚焦搜索(Spotlight)的集成
  • 想要向系统暴露应用操作或内容

Available Skills

可用技能模块

foundation-models/

foundation-models/

On-device LLM integration with prompt engineering best practices.
  • Model availability checking
  • Session management
  • @Generable structured output
  • Tool calling patterns
  • Snapshot streaming
  • Prompt engineering techniques
结合提示词工程最佳实践的设备端LLM集成。
  • 模型可用性检查
  • 会话管理
  • @Generable结构化输出
  • 工具调用模式
  • 快照流
  • 提示词工程技巧

visual-intelligence/

visual-intelligence/

Integrate with iOS Visual Intelligence for camera-based search.
  • IntentValueQuery implementation
  • SemanticContentDescriptor handling
  • AppEntity for searchable content
  • Display representations
  • Deep linking from results
集成iOS Visual Intelligence以实现基于摄像头的搜索功能。
  • IntentValueQuery实现
  • SemanticContentDescriptor处理
  • 可搜索内容的AppEntity
  • 展示表示
  • 从结果跳转至深度链接

app-intents/

app-intents/

App Intents for Siri, Shortcuts, Spotlight, and Apple Intelligence.
  • AppIntent protocol, parameters, perform()
  • AppEntity and entity queries
  • App Shortcuts with voice phrases
  • IndexedEntity and Spotlight indexing
  • Intent modes (background, foreground)
  • Interactive snippets with SnippetIntent
  • Visual intelligence integration
  • Onscreen entities for Siri/ChatGPT
  • Multiple choice API
  • Swift package support
用于Siri、快捷指令、聚焦搜索(Spotlight)和Apple Intelligence的App Intents。
  • AppIntent协议、参数、perform()方法
  • AppEntity与实体查询
  • 带语音短语的应用快捷指令
  • IndexedEntity与聚焦搜索索引
  • 意图模式(后台、前台)
  • 带SnippetIntent的交互式片段
  • 视觉智能集成
  • 用于Siri/ChatGPT的屏幕实体
  • 多选API
  • Swift包支持

Key Principles

核心原则

1. Privacy First

1. 隐私优先

  • All processing happens on-device
  • No cloud connectivity required
  • User data never leaves the device
  • 所有处理均在设备端完成
  • 无需云连接
  • 用户数据绝不会离开设备

2. Graceful Degradation

2. 优雅降级

  • Always check model availability
  • Provide fallback UI for unsupported devices
  • Handle errors gracefully
  • 始终检查模型可用性
  • 为不支持的设备提供备用UI
  • 优雅处理错误

3. Efficient Prompting

3. 高效提示

  • Keep prompts focused and specific
  • Use structured output when possible
  • Respect context window limits (4,096 tokens)
  • 保持提示词聚焦且具体
  • 尽可能使用结构化输出
  • 遵守上下文窗口限制(4096个token)

Reference Documentation

参考文档

  • /Users/ravishankar/Downloads/docs/FoundationModels-Using-on-device-LLM-in-your-app.md
  • /Users/ravishankar/Downloads/docs/Implementing-Visual-Intelligence-in-iOS.md
  • /Users/ravishankar/Downloads/docs/AppIntents-Updates.md
  • /Users/ravishankar/Downloads/docs/FoundationModels-Using-on-device-LLM-in-your-app.md
  • /Users/ravishankar/Downloads/docs/Implementing-Visual-Intelligence-in-iOS.md
  • /Users/ravishankar/Downloads/docs/AppIntents-Updates.md