← All courses

EDGE FDE

Beginner

Reuse answers that are almost the same

Lower latency and battery use by returning a past answer when the new question is close enough.

Embedding similarity cache + hit-rate tracking for on-device sessions.

Build a small on-device cache that embeds the question, checks nearby past answers, and records hit rate. iOS 27 and macOS 27 only.

Lessons

  1. Why reuse a close answer
  2. Embed the question on the device
  3. Set a similarity threshold
  4. Track hit rate
  5. Wire the cache into a session

Key concepts

Takeaways

Agent briefs

Related courses

Route work to the right Apple model · Stream tokens and measure speed · Version prompts like product copy