Claude Long-Context Prompts: Put Documents First
When prompting Claude with 20,000+ tokens of context, placing your instructions above the documents degrades retrieval accuracy. Official Anthropic documentation notes that placing long documents and inputs near the top of the prompt and putting your query and instructions at the very end can improve response quality by up to 30%.
<documents> <document index="1"><source>q3_financials.pdf</source><document_content>{{DOC_1}}</document_content></document> <document index="2"><source>churn_survey.csv</source><document_content>{{DOC_2}}</document_content></document> </documents> Using only the documents above, explain the primary drivers of Q3 churn. Place your final synthesis in <analysis> tags.Fill in the blanks (2)
Nobody has confirmed this prompt yet. If you try it, tell others whether it worked.
No comments yet.