Randomized trial measures token cost of file uploads in LLM sessions, suggesting significant impact on model efficiency.
Large language models such as Anthropic's Claude operate on a context window, a fixed-size buffer of tokens processed on every inference call. When users upload files to a Claude session, those files are re-tokenized and re-processed on every subsequent turn. This paper presents an empirical investigation into the token cost of file uploads relative to total session token consumption. Across five file types (PDF, DOCX, XLSX, plain text, and Python source code), three file sizes, and four conversation lengths (5, 10, 20, and 40 turns), we measure the proportion of input tokens attributable to uploaded content versus user-generated messages. Our findings show that uploaded files account for 95–99% of cumulative input tokens in typical multi-turn sessions, substantially higher than the commonly cited 70% estimate. The paper includes cost modeling in USD (Claude Sonnet 4 pricing), eight empirical figures, and practical recommendations including prompt caching (which reduces file token costs by 84.2% at 20 turns), selective context injection, and document pre-summarization.
No takes yet. Share an insight, caveat, or question.
Kidus Yohannes (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: