TextAdvanced

Context window budget for a long-running task

Viktor Submitted by Viktor Added 14 days ago
I'm building something that processes {{describe volume of material}} to produce {{output}}. Model context: {{limit}}.

Design the context strategy:
1. Budget the window: what must always be present (instructions, schema, invariants), what's per-item, and what's retrieved. Give approximate token allocations that sum below the limit with headroom.
2. Decide the decomposition: map-reduce, sequential with running state, or retrieval-per-step. Justify against the failure mode of each — lost cross-references, drift in the running summary, or missed context in retrieval.
3. If state carries forward, define its exact structure and a hard size cap, plus what gets dropped when it's exceeded and by what rule.
4. Specify what must never be summarised because precision matters — numbers, IDs, quotes, definitions — and how those are carried verbatim.
5. Say where information loss will occur and what it costs the final output. Be explicit rather than optimistic.
6. Define the checkpointing: where results are persisted so a failure at item 400 doesn't restart everything.
7. Give the verification step that proves nothing was silently dropped — a count, a checksum, a coverage report.

Don't assume a bigger model solves this.

How to use it

Point 7 is the one people skip. Silent drops in long pipelines are the hardest bug class to notice.

Compatible popular AI tools

These tools are mapped to this prompt based on their capabilities.

People who liked this prompt

1 community likes