AI engineering glossary · Prompt context engineering

What is prompt caching?

Prompt caching (also called Context caching): A provider feature that stores the processed form of a long, repeated prompt prefix so later requests starting with the same text are cheaper and faster. It works best when stable parts such as the system prompt and documents come first and changing parts last.

Level: intermediateTopic: Prompt context engineering

Prompt caching: an example

A 20,000-token policy document placed at the start of every request is cached, so only the short question is processed fresh each time.

Related terms

More Prompt context engineering terms

Where you learn it

Prompt caching is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.