Mastering Context Windows: The Art of Long-Form Prompting
Modern LLMs now support context windows of 128k tokens or more. However, simply dumping a massive PDF into a prompt rarely yields the results you expect. The "Lost in the Middle" phenomenon is real: models often prioritize information at the very beginning and very end of a prompt, ignoring the "mushy middle."
What matters today
Modern LLMs now support context windows of 128k tokens or more. However, simply dumping a massive PDF into a prompt rarely yields the results you expect.
Modern LLMs now support context windows of 128k tokens or more. However, simply dumping a massive PDF into a prompt rarely yields the results you expect. The "Lost in the Middle" phenomenon is real: models often prioritize information at the very beginning and very end of a prompt, ignoring the "mushy middle."
To get the most out of large context windows, you must structure your data with explicit signposts.
[SYSTEM INSTRUCTION] You are an expert analyst. Below is a 50-page report. Use the following markers to navigate the data: and Prioritize data found in the tags. [DATA START] ...
Action Steps Summary
- Use XML Tags: Wrap distinct sections in clear tags to help the model parse hierarchy.
- Summarize First: If the document is massive, provide a high-level summary at the top of the prompt.
- Chain of Thought: Ask the model to identify relevant sections before performing the final analysis.
Unlock Advanced Prompting
Get access to our full library of templates and deep-dive tutorials.
Three deep dives. Four useful moves. One email worth opening.
PromptHacker turns the AI firehose into practical next steps for work, health, family, and everything time keeps trying to steal.