AI engineering glossary · Prompt context engineering

What is sliding window history?

Sliding window history: A conversation strategy that sends only the most recent N messages or tokens with each request, letting older ones drop off. It bounds cost and size, though early details are forgotten unless summarised.

Level: intermediateTopic: Prompt context engineering

Sliding window history: an example

Keep the last 10 messages of a support chat; the customer's order id given in message 2 is lost unless stored elsewhere.

Related terms

More Prompt context engineering terms

Where you learn it

Sliding window history 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.