# Context checklist

_What goes into the window, and where, decides the answer_  
@demotoprod · RAG · also LEVERS · October 2026

A 2023 study gave one chat model 20 documents. It scored 75.8% with the answer first and 53.8% with it tenth, below its 56.1% with no documents. The Production RAG checklist covers how many chunks to send. These four checks cover where text sits, how much goes in and what gets summarised.

**A context policy to paste and fill**

```
# Context policy. Set every limit from your own grid (check 1).
order: [task, documents, instruction, question]
budget_tokens:        # per call; log actual tokens next to each
  rules: RULES_MAX
  retrieved: RETRIEVED_MAX
  history: HISTORY_MAX
  tool_output: TOOL_MAX
old_tool_results:
  keep_full_last: N_CALLS
  stub_fields: [tool, status, id]
compact_history_at: half of tested maximum
state_note: [goal, decisions, open items, constraints]
```

- [ ] **1. Measure accuracy by position and length before you trust a window**

  **What happened.** In a 2023 study, accuracy was often highest when the answer sat at the start or end of the context and lowest in the middle. A 2024 benchmark of 17 models that all claim 32K tokens or more reports that only half keep satisfactory performance at 32K.

  **The check.**
  - Take 20 real questions; run each with the answer passage first, middle and last among filler text.
  - Repeat at your usual and longest prompt sizes; cap at the longest within 5 points of the shortest.

  ```
  # Pseudocode; the sizes are examples.
  for size in (4_000, 16_000, 64_000):
      for place in ("start", "middle", "end"):
          prompt = pad(question, answer_passage, place, size)
          grid[size, place] = accuracy(model(prompt), gold)
  ```

  Source: [Lost in the Middle: How Language Models Use Long Contexts, Jul 2023](https://arxiv.org/pdf/2307.03172v3)

  Source: [RULER: What's the Real Context Size of Your Long-Context Language Models?, Apr 2024](https://arxiv.org/abs/2404.06654)

- [ ] **2. Put documents first, then the instruction and the question last**

  **What happened.** A model API's guide says to put documents above the query for inputs of 20k+ tokens; queries at the end can improve quality by up to 30 percent in tests. In the 2023 study, a query before and after the documents made key-value lookup near-perfect and barely changed the trends in document QA.

  **The check.**
  - Order: one-line task, tagged documents, then the full instruction and the question last.
  - Run your old and new order on the check 1 questions; keep the order that scores higher.

  ```
  Task: answer from the documents only.
  <document source="a1">...</document>
  <document source="a2">...</document>
  Instruction: cite the source after each claim.
  Question: {question}
  ```

  Source: [Lost in the Middle: How Language Models Use Long Contexts, Jul 2023](https://arxiv.org/pdf/2307.03172v3)

  Source: [Prompting best practices, a model API provider's documentation, read 27 Nov 2026](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices)

- [ ] **3. Give every section a token budget and clear old tool output**

  **What happened.** In a 2024 study, average accuracy on reasoning questions fell from 0.92 to 0.68 by 3,000 tokens, far below the models' limits. It fell for every model even when the padding only repeated the key paragraphs. One API guide says curating the context matters as much as the space available.

  **The check.**
  - Give each section (rules, retrieved text, history, tool output) a token budget; log tokens per call.
  - Swap tool results older than the last few calls for a stub (tool, status, id); keep the output stored.

  Source: [Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language Models, Feb 2024](https://arxiv.org/pdf/2402.14848v2)

  Source: [Context windows, a model API provider's documentation, read 27 Nov 2026](https://platform.claude.com/docs/en/build-with-claude/context-windows)

- [ ] **4. Replace old turns with a short state note, not a replay**

  **What happened.** In a 2025 study of 15 models, performance averaged 39% lower when a task's details arrived over several turns rather than in one prompt, mostly through lost reliability. Its authors advise consolidating requirements into one instruction. An agent-engineering post describes compaction keeping decisions and unresolved bugs, dropping redundant tool output.

  **The check.**
  - Past half your tested maximum, swap the oldest turns for a note: goal, decisions, open items, constraints.
  - Run 10 saved long chats on the note instead of full history; add each lost fact to the template.

  Source: [LLMs Get Lost In Multi-Turn Conversation, May 2025](https://arxiv.org/pdf/2505.06120)

  Source: [Effective context engineering for AI agents, 29 Sep 2025](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)

Figures are each paper's own, on its tasks and models: what can happen, not what every model does. An afternoon per check is a planning estimate. The 5 points, the sizes and half the maximum are examples; set them from your own grid.

The live version of this list, with every source link, is at https://indica-tech.com/checklists/context-engineering/. The PDF is at https://indica-tech.com/checklists/lead-magnets/LEVERS-context-engineering-checklist-2026-10.pdf.

---

**Nitish Gautam — Indica Technology Ltd.** Founder-led AI engineering: demo to production, in regulated industries, on fixed scope.

Website https://indica-tech.com · Book a call https://indica-tech.com/#contact · hello@indica-tech.com

YouTube youtube.com/@demotoprod · LinkedIn linkedin.com/company/indica-technology · Instagram and TikTok @demotoprod

_Context checklist · October 2026 · @demotoprod_
