Search⌘ K
AI Features

Cost and Long-Context Reasoning on the Spot

Explore how to measure and control AI system costs and ensure reliable long-context reasoning for forward deployed engineering roles. Learn techniques like token counting, prompt caching, batching, and effort tuning that optimize performance and cost in Anthropic FDE interviews.

Two questions come up in both the technical use-case screen and the final panel: “What does this cost at ten times the volume?” and “Will it stay reliable on long documents?” Interviewers want answers built from measured numbers. A candidate who says “it should be cheap” sounds like someone who has never sent a customer an invoice forecast.

The skill behind both answers is knowing which levers move cost and reliability on Claude and being able to measure each one. The examples use the expense-audit scenario with a realistic travel policy of about 5,000 tokens, the kind of long, unchanging document that sits in front of every request.

Context windows and their limits

A context window is everything a model can reference while it responds, including its own reply. All current Claude models, including Claude Sonnet 5.5 and Claude Opus 5.5, have a context window of 1 million tokens and can produce up to 128,000 output tokens in one response.

A larger window does not make every token equally useful. As a prompt grows, the model’s recall of details inside it degrades, an effect known as context rot. A rule buried in a very long prompt is more likely to be missed than the same rule in a short, focused one. Three habits keep long context reliable.

  • Put long documents first: Long material goes before the question, so the request ends with what Claude needs to answer.

  • Retrieve instead of stuffing: When a document set is much larger than any one question needs, retrieving the relevant parts beats sending everything.

  • Test at real size: Evaluations use documents as long as the customer’s real ones, because short test cases hide context rot.

Each of these decisions starts with knowing how large a request actually is. The policy ...