OAI-SE Fine-Tuning vs RAG vs Prompt Caching MEDIUM
PRODUCTION SCENARIO
Marlowe Compliance sends the same 9,000-token policy document with every request and puts a fresh request timestamp before it. Usage shows cached_tokens of zero on almost every call.

Which change restores cache hits on the shared policy?

Answering here is anonymous. Nothing is saved unless you sign in.

Show answer and explanation

Answer: Move the timestamp below the policy block so every request shares the same opening prefix

Prompt caching matches a literal prefix, so the fix is ordering: stable policy text first, per-request values after. A prompt_cache_key partitions cache accounting between tenants and cannot create a hit when the prefix itself differs, a previous_response_id chain re-bills every earlier input token rather than caching them, and message roles do not create separate cache entries because the whole serialized prompt forms one prefix.
Free

Keep practicing OAI-SE

24 original OAI-SE practice questions, each with an explanation and a source link. No account needed.

Start free practice set → Timed, explained, free