Reliability
Keep reusable skill context cache-friendly
Arrange static instructions and task-specific data to preserve useful prefix reuse without weakening freshness.
Prompt caching can help when a skill repeatedly sends the same instruction and reference material. The engineering problem is to identify which parts are actually stable and to keep every run bound to current user data, tenant authorization, and the intended skill version.
Draw the boundary before rearranging content
A common request layout places stable skill instructions, schemas, and examples ahead of user-specific input. For prefix-based caching, exact shared prefixes matter, so incidental differences in ordering or timestamps can prevent a hit. Confirm your provider’s implementation and retention settings before assuming a request is eligible.
Treat templates and examples as versioned assets. If a reference changes every hour or carries restricted data, load it at the appropriate scoped step. Freshness and data access remain application decisions even when inference is faster.
Watch actual cache and cost metrics
Use provider usage fields when available. Compare cached input tokens, end-to-end latency, source retrieval cost, and task success over the same traffic mix. A high hit rate may reflect many small jobs while misses on a handful of long jobs dominate spend.
Keep authorization outside the cached prompt
Recheck access before each read or write against application state. When joining subsequent tool results, pass source versions or timestamps where they affect the outcome. A stable instruction can safely describe the policy to retrieve current data, but it cannot establish that a particular record is current or authorized.