All Questions
Ai Coding And Product Systems hard

A ChatGPT-style assistant has power users whose threads reach 120K tokens against a 128K context window. Per-turn cost keeps climbing, and users report the model ignoring constraints they set in the first few messages. What history strategy best fits?

  1. A Compact older turns into a rolling summary, pin system instructions and user-stated constraints verbatim, and keep recent turns raw.
  2. B Keep the full transcript in every prompt, since long-context models attend evenly and prefix caching makes re-reading old turns nearly free.
  3. C Use a sliding window that drops the oldest turns first so the prompt always fits, since recent turns carry nearly all the user's intent.
  4. D Move the whole thread into a vector store and retrieve the top few chunks per turn, dropping raw recent turns to save the most tokens.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions