Prompt & Context Engineering·Question 60 of 68Quick-fire

How do you manage conversation history in a long chat without blowing the context budget?

Quick-fire answer from the Awesome Generative AI Guide (MIT)

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

You cannot keep appending forever, so you compress. Common tactics: keep the last few turns verbatim, summarize older turns into a running memory, and store durable facts (user preferences, decisions) in a structured memory you retrieve as needed rather than replaying the whole transcript. Prune aggressively and put the most relevant recent content near the end where the model uses it best. The goal is to preserve the information that changes the next response, not the literal history.

Full worked answer

You cannot keep appending forever, so you compress. Common tactics: keep the last few turns verbatim, summarize older turns into a running memory, and store durable facts (user preferences, decisions) in a structured memory you retrieve as needed rather than replaying the whole transcript. Prune aggressively and put the most relevant recent content near the end where the model uses it best. The goal is to preserve the information that changes the next response, not the literal history.

Learn more: Memory in agents (Agentic AI Crash Course)

What a good answer covers

  • You cannot keep appending forever, so you compress
  • Common tactics: keep the last few turns verbatim, summarize older turns into a running memory, and store…
  • Prune aggressively and put the most relevant recent content near the end where the model uses it best
  • The goal is to preserve the information that changes the next response, not the literal history

Key terms: Learn more

Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep