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.
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
- Stateless API
- Step-back prompting
- Stop sequence
- Structured extraction
- Structured output
- System prompt
- Task decomposition
- Template variable
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.