All jobs / AI engineer / LLM APIs

AI engineer interview question · 1–3 years

You turned on prompt caching for an assistant with a long system prompt and a dozen tools, but the provider’s usage report shows almost no cached tokens.

What do you look for?

The strongest answer

Something that changes near the start of the request: caching matches an exact prefix, so a timestamp or user detail in the system prompt, or tools sent in a different order, invalidates everything after it — I put stable content first and volatile content last

Why it works

Exactly — tools, then system prompt, then messages, matched byte for byte from the top. One changing value early on makes every request a cache miss.

What a good answer covers

Answers that fall short

Who gets asked this

More LLM APIs questions