Back to full roadmap
topiccore
Long-Context Techniques
Structural tactics against 'lost in the middle' in 1M-token contexts.
3 hours2 resources1 prereqs
Tactics:
- Instructions at start AND end (critical rules in two places)
- XML / markdown sectioning — wrap each doc in a tag
- Short summary on top, detail below
- Narrow with "look only at sources: <ids>"
- End-anchored sampling — put the most critical info in the final user message
Test: Needle-in-a-haystack benchmark — can the model find a random fact in the context when asked?