Your multi-agent assistant repeatedly re-embeds the same large policy preamble, re-asks identical FAQ questions, and re-calls a slow product catalog tool with the same SKU list within a short TTL. Latency and token costs are high. Which caching strategy should you implement?
Select an answer to reveal the explanation.
Short Explanation
You need a layered caching strategy: prompt/prefix caching where supported, semantic caching for near-duplicate user questions, and response/tool-result caching with TTLs for stable catalog data. That cuts repeated tokens and slow tool calls without caching secrets or stale answers.
Full Explanation
Layered caching reduces token usage and tool load: prompt/prefix caching where supported, for large static system content, semantic caches for paraphrased, near-duplicate user FAQs, and response or tool-result caches with TTLs for idempotent lookups for stable catalog data. Multi-agent systems benefit when spokes share a cache of expensive retrievals under keys that include tenant and permission context. Disabling all caching to ensure every token is freshly generated even for identical requests ignores cost and latency goals. Caching user passwords and session tokens in a public CDN edge cache is a security anti-pattern. Storing only the first user message forever and reusing it as the answer to all future questions breaks correctness. Define invalidation when catalogs or policies update, and never cache authorized personalized results in a way that leaks across users.