AI / Claude Sonnet5 Interview questions
1. What is the difference between Claude Sonnet 5 and Claude Sonnet 4.6?
Claude Sonnet 5 is a drop-in upgrade for Sonnet 4.6, with three specific breaking API changes: adaptive thinking now runs by default on unconfigured requests, manual extended thinking (a fixed budget_tokens configuration) is rejected with an HTTP 400 error, and non-default sampling parameters (te...
2. How does Claude Sonnet 5 compare to Claude Opus 5 in capability and cost?
Both models share the same 1M token context window, 128k max output, and five-level effort framework (low/medium/high/xhigh/max, default high), but Opus 5 is priced meaningfully higher per token and generally scores higher on the hardest, longest-horizon reasoning and coding benchmarks. Sonnet 5 ...
3. Why does Claude Sonnet 5 run with thinking on by default?
On Sonnet 4.6, a request that didn't include a thinking field ran without any reasoning step at all; on Sonnet 5, that same unconfigured request now runs with adaptive thinking automatically, reflecting Anthropic's broader shift toward reasoning-by-default across its current model generation. Thi...
4. What is the difference between adaptive thinking and manual extended thinking?
Adaptive thinking is the mode Claude Sonnet 5 uses by default: the model itself decides how much to reason based on the task's apparent difficulty and the configured effort level, rather than following a fixed, developer-specified token budget for reasoning. Manual extended thinking, by contrast,...
5. Why does Claude Sonnet 5 reject non-default sampling parameters?
Setting temperature, top_p, or top_k to anything other than their default values now returns an HTTP 400 error on Sonnet 5, a constraint that had already been introduced for Opus-class models earlier and is now extended to the Sonnet tier for the first time with this release. This affects two dif...
6. How does the effort parameter differ between Claude Sonnet 5 and Claude Sonnet 4.6?
Claude Sonnet 5 introduces a full five-level effort scale, low through max, including a new xhigh level added between high and max that didn't exist as an option on Sonnet 4.6's more limited effort framework. On Sonnet 5, effort now works together with adaptive thinking to determine reasoning dep...
7. What is the difference between the xhigh and max effort levels?
Both xhigh and max sit at the top of Sonnet 5's five-level effort scale, above high, and both are associated with deeper reasoning and correspondingly higher token cost than lower levels. In practice, reporting from early usage suggests max effort on Sonnet 5 can approach costs comparable to Opus...
8. Why does Claude Sonnet 5's tokenizer change matter for migration?
Sonnet 5 uses a new tokenizer that maps the same input text to roughly 30% more tokens than Sonnet 4.6's tokenizer did, meaning token counts, cost estimates, and context-window capacity calculations calibrated against Sonnet 4.6 don't transfer directly. Because per-token pricing itself is separat...
9. How does Claude Sonnet 5's context window differ from Claude Sonnet 4.6's in practice?
The nominal context window figure, 1 million tokens, is the same maximum on both models, so on paper nothing has changed about the ceiling. In practice, because Sonnet 5's tokenizer produces more tokens for the same text, that 1M-token window holds meaningfully less actual text than it did on Son...
10. When should you disable thinking on Claude Sonnet 5?
Disable thinking, using thinking: {"type": "disabled"} , for latency-sensitive workloads where reasoning adds delay without a corresponding quality benefit - streaming chat, simple classification, routing, or straightforward lookups are commonly cited examples. It's worth noting that setting effo...
11. What is the difference between disabling thinking on Sonnet 5 and on Opus 5?
On Claude Opus 5, thinking: {"type": "disabled"} is only accepted at effort high or below - attempting to combine it with xhigh or max effort returns an HTTP 400 error, since Opus 5 requires thinking to stay enabled at its two highest effort levels. On Claude Sonnet 5, by contrast, thinking: {"ty...
12. Why does max_tokens now behave differently on Claude Sonnet 5?
On Sonnet 4.6, an unconfigured request produced no thinking tokens at all, so the full max_tokens budget was effectively reserved for the visible response text by default. On Sonnet 5, because adaptive thinking now runs by default on the same kind of unconfigured request, thinking tokens draw fro...
13. How does Claude Sonnet 5's prompting guidance differ from Claude Sonnet 4.6's for verbosity?
Claude Sonnet 5's response length is calibrated to the perceived complexity of the task rather than defaulting to a fixed verbosity level regardless of how simple or complex the request actually is. This is a more adaptive framing than treating verbosity as a single constant setting, and it means...
14. What happens when you set effort to low on a genuinely complex problem?
Setting effort to low does not guarantee shallow, wrong, or skipped reasoning outright - Sonnet 5 can still recognize that a problem warrants more careful thought and reason accordingly even at low effort, though generally less thoroughly than it would at a higher effort level. What's more likely...
15. When should you raise effort instead of prompting around shallow reasoning?
Raise effort directly, rather than adding compensating prompt instructions, when the observed problem is genuinely a reasoning-depth issue - the model is missing steps or reaching a shallow conclusion on a task that's objectively complex enough to warrant deeper reasoning. Prompting around the is...
16. How does Sonnet 5's agentic capability compare to Sonnet 3.5-3.7?
Sonnet 3.5, 3.6, and 3.7 were the models widely credited with kicking off the broader agentic AI era for Sonnet-class models - the first Sonnet generation to show genuinely impressive coding and tool-use skills at that price point. In the generations that followed, the clearest gains in agentic c...
17. Why is Claude Sonnet 5 described as narrowing the gap with Opus-class models?
Anthropic's own comparisons show Sonnet 5 posting a substantial improvement over Sonnet 4.6 across reasoning, tool use, coding, and knowledge work, with its overall performance profile described as close to Opus 4.8's despite the significant price difference between the two tiers. On at least one...
18. What is the difference between Claude Sonnet 5's cyber safeguards and its predecessor's?
Claude Sonnet 5 ships with real-time cyber safeguards enabled by default, specifically designed to detect and block dangerous cybersecurity-related usage as it happens, a capability called out explicitly as part of this release. Anthropic has stated it did not deliberately train Sonnet 5 for cybe...
19. How does Claude Sonnet 5's alignment profile compare to Claude Sonnet 4.6's?
Anthropic's safety assessment reports an overall lower rate of undesirable behaviors on Sonnet 5 compared to Sonnet 4.6, including specifically lower rates of hallucination, sycophancy, and cooperation with misuse attempts. Sonnet 5 is also described as generally safer to use in agentic contexts ...
20. When should you choose Claude Sonnet 5 over Claude Opus 5 for a coding task?
Choose Sonnet 5 for high-volume, well-scoped coding work - routine bug fixes, test generation, straightforward refactors, and feature builds - where the task doesn't require deep multi-file architectural reasoning and where per-request cost adds up meaningfully at scale. Sonnet 5 has also been re...
21. What is the difference between Claude Sonnet 5's Priority Tier support and Claude Sonnet 4.6's?
Claude Sonnet 4.6 supported Priority Tier, while Claude Sonnet 5 does not support it at all - a direct capability gap between the two versions, mirroring the same gap that exists between Opus 4.8 and Opus 5. This is a hard regression rather than a behavioral shift that can be worked around throug...
22. How does prompt caching behavior change when migrating to Claude Sonnet 5?
Prompt caching itself remains a supported feature on Sonnet 5, carried over unchanged from Sonnet 4.6 as part of the broader feature parity between the two versions. What does change is the underlying token counts: because Sonnet 5's new tokenizer maps the same text to a different number of token...
23. Why should you re-run token counting before migrating to Claude Sonnet 5?
Because the new tokenizer changes how the same text maps to tokens, any cost estimate, context-budget calculation, or max_tokens setting derived from Sonnet 4.6 token counts is no longer a reliable guide for Sonnet 5 - the underlying numbers have shifted independent of anything else about the mig...
24. What is the difference between migrating from Sonnet 4.6 versus from Sonnet 4.5 or earlier?
Migrating specifically from Sonnet 4.6 only requires handling the changes introduced with Sonnet 5 itself: adaptive thinking on by default, manual extended thinking rejected, non-default sampling parameters rejected, and the new tokenizer. Migrating from Sonnet 4.5 or an earlier version requires ...
25. How does Claude Sonnet 5 handle assistant message prefilling?
Assistant message prefilling - constructing a request that starts the assistant's response with predetermined text - returns an HTTP 400 error on Claude Sonnet 5, the same rejection behavior that was already true on Claude Sonnet 4.6. This means prefill rejection isn't a new Sonnet-5-specific bre...
26. When would you choose Claude Sonnet 5's xhigh effort over Claude Opus 5 entirely?
Choose Sonnet 5 at xhigh when a task needs meaningfully deeper reasoning than Sonnet 5's high effort provides, but the task still fits comfortably within Sonnet-class capability and doesn't specifically require Opus-level judgment on long-context or highly novel problems. This is generally the mo...
27. What is the difference between Claude Sonnet 5's response-length calibration and a fixed verbosity default?
A fixed verbosity default means a model tends toward roughly the same response length and level of detail regardless of whether the underlying task is trivial or genuinely complex, which can mean over-explaining simple requests or under-explaining complex ones. Claude Sonnet 5's response length i...
28. How does Claude Sonnet 5's tool-use behavior differ from Claude Sonnet 4.6's?
Anthropic frames Sonnet 5 as its most agentic Sonnet model yet, specifically calling out improved planning, tool use - including browsers and terminals - and the ability to run autonomously at a level that previously required larger, more expensive models. This reflects a substantive capability s...
29. Why doesn't lowering effort guarantee that Claude Sonnet 5 skips thinking?
Effort and the disabled/adaptive thinking setting are two separate, independently-configurable controls: effort influences how much the model reasons when it does reason, while whether it reasons at all is governed by whether thinking is left on (adaptive) or explicitly disabled. Because adaptive...
30. What is the difference between Sonnet 5 and Opus 5 on long-horizon coding?
On the hardest, longest-horizon coding benchmarks - the kind involving extended multi-step work across many files or a long agentic session - reporting shows Sonnet 5 trailing both Opus 4.8 and Opus 5 by a meaningfully wider margin than the gap seen on shorter, everyday coding tasks. This is cons...
31. Explain the execution flow of a Claude Sonnet 5 request that omits the thinking field?
The request reaches Sonnet 5 without any explicit thinking configuration, and because adaptive thinking is on by default for this model generation, the model automatically evaluates the task and decides how much reasoning it needs before producing a visible response, rather than skipping straight...
32. How can you optimize Claude Sonnet 5 costs given the new tokenizer?
Start by re-baselining, not assuming: run the token counting API against your actual representative prompts on Sonnet 5 specifically, since the roughly 30% token-count increase varies somewhat by content type, and an assumed flat multiplier can under- or overestimate the real impact for your spec...
33. How do you troubleshoot a new HTTP 400 error after migrating to Sonnet 5?
Check the request for non-default sampling parameters first - temperature, top_p, or top_k set to anything other than default values is one of the most common causes, and the fix is simply removing those fields rather than adjusting their values, since Sonnet 5 doesn't accept them at any non-defa...
34. Explain the internal difference between Claude Sonnet 5's effort parameter and its adaptive thinking mechanism?
Adaptive thinking is the mechanism that determines whether and how much the model reasons on a per-request basis, dynamically responding to what it perceives about the specific task's difficulty rather than following a fixed, pre-configured amount every time. The effort parameter functions as a c...
35. Which is better for a high-volume coding pipeline: Sonnet 5 or Opus 5?
For this specific workload shape - many requests, individually well-defined and bounded in scope, like routine bug fixes, test generation, or standard refactors - Sonnet 5 is generally the better fit, since its lower per-token cost compounds meaningfully at high request volume, and reporting sugg...
36. How do you troubleshoot a Claude Sonnet 5 response truncated at max_tokens after migration?
First determine whether the request is running with thinking enabled, which it will be by default unless explicitly disabled, since the most likely cause of new truncation after migration is thinking tokens now consuming part of a max_tokens budget that was previously reserved entirely for the vi...
37. Explain the lifecycle of a migration from Claude Sonnet 4.6 to Claude Sonnet 5?
The lifecycle begins with an audit of existing request-building code for the three specific breaking patterns: non-default sampling parameters, manual extended thinking configuration with a fixed budget_tokens value, and assistant message prefilling, since code containing none of these three patt...
38. How can you optimize Claude Sonnet 5's effort setting across a fleet of subagents?
Set a lower default effort, such as low or medium, on individual subagent calls specifically, reserving higher effort for the top-level orchestrating call that's actually making the higher-stakes planning and coordination decisions, since subagent-level work is often narrower in scope and less li...
39. How do you troubleshoot degraded reasoning quality on Claude Sonnet 5 at low effort?
First confirm whether low effort is actually appropriate for the task category involved, since low effort is specifically intended for tasks that don't require deep reasoning - if the observed degradation is on genuinely complex, multistep problems, this may not be a bug to troubleshoot so much a...
40. Explain the execution flow of Claude Sonnet 5's cyber safeguards during a request?
As a request comes in, before or alongside normal processing, Sonnet 5's real-time cyber safeguards evaluate whether the content involves dangerous cybersecurity-related usage - this runs as part of the model's default behavior rather than as an opt-in feature a developer has to separately enable...
41. Which is more cost-efficient on simple tasks: Sonnet 5 max or Opus 5 low effort?
Neither is actually the recommended choice for this scenario - for a short, simple task, the better move on either model is using a low effort setting on the model that's already well suited to simple tasks, rather than maxing out effort on the smaller model or reaching for the larger, pricier mo...
42. How can you optimize prompts migrating from Sonnet 4.6 to Sonnet 5?
Start by testing existing Sonnet 4.6 prompts largely as-is, since Anthropic's own guidance indicates Sonnet 5 performs well out of the box on them - the goal is a targeted tuning pass on known behavior shifts, not a full prompt rewrite from scratch. Review response-length expectations specificall...
43. Explain the internal working of Claude Sonnet 5's new tokenizer relative to Claude Sonnet 4.6's?
A tokenizer is the component that converts raw input text into the discrete token units a model actually processes and that usage is billed and budgeted against - changing the tokenizer changes how many of these units a given piece of text maps to, without necessarily changing anything about the ...
44. How do you troubleshoot silent cost increases after migrating to Claude Sonnet 5?
Separate the two independent contributors before assuming a single cause: the tokenizer producing more tokens for the same text, and thinking now running by default and consuming additional tokens on requests that previously ran with none at all - both can contribute simultaneously, and conflatin...
45. Explain the execution flow of a Sonnet 5 to Opus 5 escalation pipeline?
An incoming task first routes to Claude Sonnet 5 as the default handler, typically configured at a moderate effort level appropriate to the pipeline's typical task difficulty, since most requests in a well-scoped, high-volume pipeline are expected to be within Sonnet 5's comfortable capability ra...
46. How can you optimize Claude Sonnet 5's context window usage given the tokenizer change?
Recognize that the practical, usable capacity of the 1M-token window has effectively shrunk in text terms, since the same amount of actual content now consumes more tokens than it did on Sonnet 4.6 - budgeting context usage by document count or character count rather than by token count can signi...
47. Which is better for agentic multi-file refactoring: Sonnet 5 or Opus 5?
For agentic multi-file refactoring specifically, reporting consistently points toward Opus 5 as the stronger fit, since this task shape stresses exactly the capabilities where Opus 5's advantage over Sonnet 5 is reported as largest: holding more architectural context across files, making fewer er...
48. How do you troubleshoot manual extended thinking left over from Sonnet 4.6?
Locate every place in the codebase where a request sets thinking: {"type": "enabled", "budget_tokens": N} , since this specific configuration is rejected outright on Sonnet 5 with an HTTP 400 error - this is a search-and-remediate task rather than a subtle behavioral issue, since the failure mode...
49. Explain the lifecycle of test-time compute scaling on Sonnet 5's effort levels?
Test-time compute scaling refers to converting additional computational effort, spent at the moment a request is actually being processed, into better output quality, as opposed to improvements that come from changes made during the model's training process itself. On Sonnet 5, this happens throu...
50. How can you optimize a rollout plan from Sonnet 4.6 to Sonnet 5?
Begin with a small, representative slice of production traffic rather than a full cutover, selecting traffic that spans your typical range of task complexity and request patterns so the initial signal reflects real-world behavior rather than an unrepresentative subset. Instrument the rollout to s...