Top Prompt Order for Max Cache Hits

Maximize cache hit rates by structuring prompts with the most stable content first, such as tool definitions and system instructions, followed by moderately stable reference documents, and placing dynamic elements like user queries last.

Sources

Open the full topic