AI engineering glossary · Prompt context engineering
What is context truncation?
Context truncation: Cutting text so that it fits within the allowed input size, by dropping the oldest messages, the middle, or the end. It is simple but can remove important facts, so what to keep must be chosen with care.
Context truncation: an example
When a chat exceeds the limit, the app deletes the oldest turns but always keeps the system prompt.
Related terms
More Prompt context engineering terms
- Contrastive chain-of-thought
- Conversation buffer memory
- Conversation history
- Delimiters
- Developer message
- Directional stimulus prompting
- DSPy
- Dynamic few-shot selection
Where you learn it
Context truncation is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.