FDEInterviews logoFDE/Interviews
RAG & Agent System Design / 51
hard★ EssentialAnthropicOpenAISierra

Build an agent that works a 500-page document over a long multi-turn session within a 200k-token context. How do you manage memory?

A 500-page doc is well over 200k tokens, and even if it fit, stuffing it in would rot the context. The real design is a working set in context plus an external memory the agent retrieves from and compacts into as it goes.

Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.

A 500-page doc is well over 200k tokens, and even if it fit, stuffing it in would rot the context. The real design is a working set in context plus an external memory the agent retrieves from and compacts into as it goes.

Unlock the other 466 answers · ₹2,000 / $25Your progress and mastery stay saved · 6 months · one payment · no auto-renew
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

The senior signal is treating the context window as a scarce working set, not a database: the full document lives in an external store, the agent retrieves what each step needs, and it compacts its own history into durable notes. Strong candidates distinguish what to keep verbatim (the task, decisions, open questions) from what to summarize or drop (resolved sub-tasks, raw tool output) and name context rot as the failure being avoided. Watch for candidates who just say 'use a bigger context' or 'summarize everything' without a keep-vs-drop policy.

DISCUSSION · 0

No comments yet — be the first to share your approach.