Courseiva

CCNA Claude Model Fundamentals Questions

75 of 249 questions · Page 3/4 · Claude Model Fundamentals · Answers revealed

151
MCQmedium

A team is using Claude to summarize legal contracts. They need the summaries to reflect only the contract text, not any outside assumptions. Which prompting technique best reduces the chance that Claude introduces information not present in the source document?

A.Ask Claude to summarize from its general knowledge of contract law first, then compare with the document.
B.Remove the document entirely and ask Claude to generate a typical contract summary template.
C.Instruct Claude to answer only from the provided document and to say when the document does not contain the answer.
D.Raise the temperature so Claude explores more possible interpretations of the contract.
AnswerC

Explicitly constraining Claude to the supplied document and requiring it to acknowledge missing information is a direct, effective guard against unsupported claims. It sets a clear behavioral boundary in the prompt and gives Claude a safe fallback instead of inventing details. For legal summaries where fidelity to the source is critical, this grounding instruction materially reduces hallucination risk.

Why this answer

Grounding Claude in the provided document, and instructing it to say when the answer is absent, is the most direct way to keep summaries faithful to the source. It constrains the model to the supplied text and provides a safe response when information is missing. Raising temperature, relying on general legal knowledge, or removing the document all increase the risk of unsupported content rather than reducing it.

Exam trap

The trap here is assuming that a more capable model automatically avoids hallucination, when faithful summarization actually depends on explicit grounding instructions and a safe fallback for missing information.

152
MCQeasy

A business analyst is using Claude to summarize a set of internal company reports. They are concerned that Claude might generate plausible-sounding but false information about specific financial figures not present in the text. Which prompt engineering technique is specifically recommended by Anthropic to mitigate this risk of hallucination?

A.Instruct Claude to provide direct quotes from the reports to support its summary.
B.Remove all XML tags from the prompt to prevent the model from becoming confused.
C.Use the high effort setting in the output configuration to ensure maximum accuracy.
D.Switch the task to Claude Haiku 5.5 to minimize the complexity of the generated text.
AnswerA

Asking for supporting text or citations forces the model to verify its response against the provided context. This grounding technique significantly reduces the likelihood of the model generating fabricated data points that are not present in the source documents.

Why this answer

To reduce hallucinations, Claude should be grounded in the documents it is given. Explicitly asking it to quote or cite the source text that supports each statement, and giving it permission to say it does not know when the reports do not contain an answer, makes it far less likely to invent figures. Anthropic's prompting guidance recommends exactly these grounding techniques for document tasks.

Exam trap

Assuming that using a more powerful model like Fable 5.1 automatically eliminates hallucinations without prompt-level grounding.

153
MCQmedium

An AI researcher is concerned about 'hallucinations' when Claude summarizes internal technical specifications. Which approach leverages Claude's fundamental design to minimize the risk of the model inventing non-existent features?

A.Increasing the temperature to 1.0
B.Using Claude 3 Haiku for higher precision
C.Providing the documents in the context and requesting citations
D.Setting 'max_tokens' to a very low value
AnswerC

By placing the technical specifications in the prompt and asking the model to cite specific passages, you force Claude to ground its response in the provided text. This 'RAG-style' approach ensures the model focuses on the evidence at hand, reducing the likelihood of generating outside or invented information. (52 words)

Why this answer

Hallucinations occur when a model generates plausible but incorrect information. To mitigate this, grounding the model in the provided context is the most effective strategy. By explicitly instructing Claude to use only the provided text and to cite its sources, the model's reasoning is constrained to the verified data, significantly improving the factual accuracy of the summary. (69 words)

Exam trap

Candidates often select 'increasing the model temperature' or 'using a larger model,' which actually increases the risk of hallucination rather than grounding the model in the provided technical specifications.

154
MCQhard

A legal tech company uses Claude Opus 5.5 to analyze 200-page contracts. They find that the 1M-token context window is sufficient, but the 'Time to First Token' (TTFT) is too high for their interactive UI when users ask follow-up questions. What is the most effective architectural change to improve latency without switching to a less capable model?

A.Enable the `thinking: { "type": "adaptive" }` parameter with 'max' effort.
B.Move the contract text from the `system` parameter to a `user` message.
C.Implement prompt caching for the contract text using `cache_control`.
D.Use the Message Batches API to handle the follow-up questions.
AnswerC

Caching the static contract prefix prevents the model from re-computing the document representation on every turn. This drastically reduces the time to first token (TTFT) and overall latency for multi-turn interactions involving large contexts.

Why this answer

Prompt caching is the primary tool for reducing latency in long-context conversations. By marking the large contract text with a cache_control breakpoint, the model doesn't have to re-process the entire document for every follow-up question. This significantly reduces TTFT and lowers costs by utilizing cheaper cache reads for the static portion of the prompt.

Exam trap

Attempting to use the Message Batches API, which actually increases latency (up to 24 hours) despite being cheaper.

155
MCQmedium

Your organization is building an agentic workflow that uses multiple subagents to process different segments of a large dataset. You are experiencing issues where one subagent inadvertently acts on instructions found within the raw data it is processing. What is the most appropriate way to mitigate this risk?

A.Use the Messages API metadata field to tag the data as 'untrusted' so the model knows to process it with increased caution.
B.Instruct the model at the beginning of the system prompt to ignore any instructions it finds within the user-provided data.
C.Perform a secondary validation step where another model checks the output for signs of prompt injection before it is used in the workflow.
D.Implement least-privilege tool access and use XML tags to clearly separate the trusted system instructions from the untrusted data.
AnswerD

This is the most robust security strategy. XML tags provide the model with a clear structural hierarchy, making it easier to distinguish between instructions and data. Combined with least-privilege tool access, this limits the potential damage from an injection attack, ensuring the agent cannot execute unauthorized actions even if it is misled.

Why this answer

This scenario describes a classic prompt injection vulnerability where the model confuses data for instructions. To prevent this, you must treat all untrusted content, such as the data being processed, as data rather than commands. Using clear structural delimiters like XML tags is essential for helping the model differentiate between the system instructions and the untrusted data.

Additionally, implementing a policy of least-privilege for tools ensures that even if a subagent is compromised by an injection, it cannot perform sensitive actions it was not explicitly authorized to execute. Separating your trusted system prompts from the untrusted data is a fundamental security requirement.

Exam trap

Candidates often believe that simply telling the model 'ignore instructions in the text' is sufficient, but prompt injection is a technical architectural problem that requires structural separation of data and logic.

156
MCQmedium

Your application uses the `GET /v1/models` endpoint to populate a list of available models for users to select. You notice that the list occasionally includes new models you weren't expecting. How should you handle this discovery in your application?

A.Filter the API output to show only models that your application has been explicitly tested with, maintaining a whitelist.
B.Hardcode the model IDs and ignore the Models API entirely to ensure no unexpected models are ever introduced.
C.Cache the model list indefinitely to prevent the application from seeing new models and potentially breaking.
D.Allow users to select any model returned by the API to ensure they always have access to the latest technology.
AnswerA

Maintaining a whitelist of validated model IDs ensures that your application only interacts with models it is prepared to handle. This approach balances the need for discovery via the Models API with the requirement for robust, tested production configurations, protecting the application from unexpected changes in model performance or behavior.

Why this answer

The correct approach is to implement a validation layer that filters the results from the Models API against a known, supported list of model IDs that your application has been tested against. This prevents users from selecting and using models that the application has not been validated for, ensuring that the integration remains stable while still allowing you to programmatically detect when new models become available for potential future testing and inclusion.

Exam trap

Many developers assume that any model returned by the API is automatically safe to use, ignoring the need for integration testing.

157
MCQeasy

A product manager is evaluating Claude models for a customer-support chatbot that must handle 50,000 conversations per day while keeping inference costs low. The conversations are short, factual, and do not require complex reasoning. Which Claude model is the most appropriate choice?

A.Claude 2.1
B.Claude 3 Opus
C.Claude 3 Haiku
D.Claude 3.5 Sonnet
AnswerC

Claude 3 Haiku is the fastest and most cost-effective model in the Claude 3 family, optimized for high-volume, straightforward tasks like simple customer-support queries. It delivers quick responses at low cost, making it ideal for 50,000 short, factual conversations per day where complex reasoning is not required. This aligns perfectly with the scenario's requirements.

Why this answer

The scenario demands a model that can handle high-volume, simple conversations at low cost. Claude 3 Haiku is specifically designed for speed and cost efficiency, making it the right fit for short, factual customer-support interactions. The other models offer greater capability but at higher cost, which is unnecessary for this use case.

Exam trap

The trap here is assuming that the most capable model is always the best choice, when cost and latency requirements often favor a smaller, faster model.

158
Multi-Selectmedium

A product team is using Claude to generate marketing copy. They want to ensure the output aligns with brand voice and avoids certain topics. Which TWO techniques are most effective for controlling Claude's output in this scenario? (Choose two.)

Select 2 answers
A.Include few-shot examples in the prompt showing desired outputs for similar marketing requests.
B.Post-process the output with a keyword filter to remove any prohibited terms before publishing.
C.Set the temperature parameter to a high value to encourage more creative and varied outputs.
D.Use the top_p parameter with a low value to restrict the model to only the most likely words.
E.Provide a detailed system prompt that specifies the brand voice, tone, and prohibited topics.
AnswersA, E

Few-shot examples demonstrate the desired style and content, helping Claude infer patterns and apply them to new requests. This is particularly effective for nuanced tasks like brand voice, where examples can illustrate tone, vocabulary, and structure. Combined with a system prompt, few-shot learning significantly improves alignment with specific requirements.

Why this answer

A detailed system prompt and few-shot examples are proactive techniques that shape Claude's output during generation. The system prompt establishes persistent guidelines, while examples demonstrate desired patterns. Together, they provide clear direction and improve consistency, making them the most effective methods for controlling brand voice and avoiding prohibited topics.

Exam trap

The trap here is relying on post-hoc filters or sampling parameters, which do not provide the same level of control as explicit instructions and examples.

159
MCQmedium

Your organization is reviewing its usage of Claude 5.5 models. You find that some teams are using 'max' effort for tasks that only require basic text summarization. What is the impact of this configuration?

A.It results in higher token usage and latency without providing a commensurate increase in output quality.
B.It causes the model to hallucinate more frequently because the reasoning process becomes too complex for a simple task.
C.It forces the model to use a different, more capable model architecture under the hood, significantly improving performance.
D.It significantly improves the accuracy of the summary by forcing the model to perform deeper analysis of the document.
AnswerA

Using 'max' effort for simple tasks like summarization forces the model to use more compute and token budget than is necessary. This directly increases the financial cost and response time of the API call, providing no benefit in terms of output quality, which is already at a high level with default settings.

Why this answer

Setting the effort to 'max' for simple tasks like summarization is an inefficient use of resources. It causes the model to spend excessive tokens on internal reasoning that provides no benefit for a straightforward task. This leads to higher costs and increased latency without improving the quality of the summary, as the task does not require deep reasoning.

The correct approach is to align the effort level with the actual task complexity, moving to 'low' or 'medium' to save costs while maintaining quality.

Exam trap

Candidates often confuse 'more effort' with 'better result', failing to recognize that for simple tasks, extra reasoning is just wasted compute.

160
MCQmedium

A developer is building a document processing service and wants to ensure that they are using the most cost-effective and capable model for their needs. They notice that the API provides a list of models through an endpoint. What is the correct way to utilize this information?

A.Ignore the API and always use the most recent model family released by Anthropic.
B.Use the API to dynamically update the model ID to the 'most capable' model returned in the list.
C.Query the API to identify the capabilities of different models, then hardcode the chosen model ID in the application.
D.Write a script that automatically selects the model with the largest context window from the API list every time the app starts.
AnswerC

Using the API to discover available models and their limits is the correct way to choose the right tool for the job. Once the appropriate model is identified, pinning its ID in your code ensures that your application continues to use the exact version it was validated against, maintaining performance and cost predictability.

Why this answer

The Models API is the canonical source for discovering which models are available and understanding their capabilities, such as context window limits and maximum output tokens. By checking this endpoint, developers can make informed decisions about which models are appropriate for their specific tasks. Once a suitable model is identified based on these capabilities, it must be explicitly pinned in the API request using its ID to ensure consistency and prevent the system from defaulting to unintended models during future operations.

Exam trap

Candidates might assume they should write code to automatically select the model from the list rather than using the list to inform their manual configuration choice.

161
MCQmedium

A team is migrating an existing pipeline from an older model version to the new Claude Opus 5.5. They want to verify that their current infrastructure is compatible with this model before fully switching. How should they verify the model's capabilities?

A.Send a 'ping' prompt to the model and inspect the response headers for version information.
B.Query the GET /v1/models/claude-opus-5-5 endpoint to retrieve its metadata and capabilities.
C.Assume the model is available if the API authentication succeeds.
D.Check the Anthropic website's release notes for a confirmation that the model is ready for use.
AnswerB

The /v1/models/{id} endpoint is the standard way to inspect the properties of a specific model, including its maximum context window and supported capabilities. This approach is efficient, avoids unnecessary token usage, and provides the necessary data to ensure the model aligns with the team's architectural requirements before deployment.

Why this answer

The recommended approach for verifying model capabilities and availability is to use the /v1/models/{id} endpoint for the specific model ID. This endpoint provides metadata about the model, including capabilities and constraints, without requiring a full API request execution. This allows the team to confirm that the model meets their requirements, such as context window limits or specific features, in a clean and programmatic way that integrates well with automated testing and CI/CD workflows.

Exam trap

Candidates might incorrectly believe that they need to send a test prompt to the model to check if it exists, which is inefficient and potentially costly.

162
MCQmedium

An application uses Claude Fable 5.1 to generate code refactoring plans. The developer notices that some plans are cut off. They decide to use a very large `max_tokens` value (e.g., 100,000) to ensure completion. What is a primary risk of setting an unnecessarily high `max_tokens` value for every request?

A.It increases the risk of high costs if the model generates excessive or repetitive output due to a prompt error.
B.The model will always try to fill the 100,000-token limit, leading to extremely wordy responses.
C.The developer will be billed for 100,000 tokens even if the model only generates 500 tokens.
D.The API will automatically downgrade the request to Claude Haiku to save on processing power.
AnswerA

The max_tokens parameter acts as a circuit breaker for costs. If a prompt or model error causes a loop or unexpected verbosity, a 100,000-token limit allows for a much more expensive failure than a tighter, more realistic limit would allow.

Why this answer

While setting a high max_tokens limit prevents truncation, it poses a risk of 'runaway' costs if the model encounters an edge case where it generates repetitive or excessive content. Since users are billed for the tokens actually generated, a high limit provides a very high ceiling for potential spend. It is better to set max_tokens to a realistic maximum for the specific task (e.g., the maximum expected length of a refactoring plan) rather than a global maximum, to act as a financial safety rail.

Exam trap

Candidates often think max_tokens is a reservation system that costs money upfront, rather than a limit on actual generation.

163
MCQhard

A developer is building a high-traffic application and is concerned about the impact of streaming on their system resources. They are evaluating whether to use streaming for all requests. Which of the following is a technical consideration when deciding whether to stream or not?

A.Streaming prevents the use of prompt caching, making it unsuitable for applications with large static prompts.
B.Streaming increases the total cost of the request because the API charges extra for the streaming headers.
C.Streaming requires the server to keep a connection open for the duration of the generation, which can impact resource usage.
D.Streaming causes the model to generate tokens significantly slower than a standard request.
AnswerC

Managing open HTTP connections for streaming responses consumes server-side resources such as threads or sockets. In high-traffic environments, this can lead to scaling challenges if not managed properly. This is a legitimate technical trade-off compared to a standard request-response cycle where the connection is closed much faster.

Why this answer

While streaming is excellent for user experience and preventing timeouts, it does introduce complexity in the backend. Each active stream keeps an HTTP connection open, which requires the server to manage concurrency and state for the duration of the generation. If an application is purely internal or performing short, non-latency-sensitive batch processing, the overhead of managing streaming connections might outweigh the benefits, leading some architects to prefer standard non-streaming requests for simpler tasks.

Exam trap

Candidates often assume streaming is universally better, ignoring the operational overhead of managing long-lived connections for every single request in a large system.

164
MCQmedium

When designing a prompt for Claude to perform complex reasoning, why is it beneficial to include 'think step-by-step' in the instructions?

A.It forces the model to use more memory, which increases its internal intelligence.
B.It allows the model to break down complex problems into manageable sub-tasks.
C.It automatically converts the output format into a bulleted list.
D.It minimizes the token cost by reducing the number of words in the final output.
AnswerB

Chain-of-thought prompting prompts the model to generate intermediate steps. This decomposition helps the model handle multi-step reasoning tasks more accurately by grounding each part of the process in the previous logic, significantly reducing errors that occur when the model attempts to solve everything at once.

Why this answer

The 'think step-by-step' technique leverages the model's ability to perform chain-of-thought reasoning. By forcing the model to articulate its intermediate logic before arriving at a final answer, the model is less likely to jump to premature conclusions. This is particularly important for logic, math, or coding tasks where the final output depends on the accuracy of sequential steps rather than direct pattern completion.

Exam trap

Candidates often assume 'think step-by-step' is a magic phrase that guarantees accuracy for any prompt, forgetting that the model still requires high-quality, unambiguous instructions to reason effectively through complex logic.

165
MCQmedium

Your application uses the Models API to dynamically retrieve model details. You notice that your application logic fails when trying to parse a field that you expected to contain the cost per request. What is the fundamental design principle of the Models API regarding this expectation?

A.The API requires an authentication header with administrative privileges to reveal pricing.
B.The API omits pricing data only for models that are currently in beta testing.
C.The API expects the developer to supply the pricing model in the request body.
D.The Models API reports technical metadata such as token limits and capabilities; it does not report pricing.
AnswerD

The Models API returns technical details such as max_input_tokens, max_tokens and capabilities. Pricing is not part of its response, so cost calculations must combine the usage reported on each response with pricing from Anthropic's published pricing and billing tools.

Why this answer

The Models API is intended for discovering model capabilities and constraints, not for real-time cost estimation. The API schema is fixed to provide technical metadata like max_input_tokens and max_tokens. Expecting cost data to be returned via a model metadata lookup is a misinterpretation of the API's purpose.

Cost estimation requires tracking usage through the usage object in the Messages API response, which provides token counts, and then applying those counts against the organization's specific pricing tier, which is managed outside the scope of individual model metadata endpoints.

Exam trap

Expecting the API to act as a unified source for both technical specifications and business/financial logic.

166
Multi-Selectmedium

An enterprise is processing 50,000 legacy documents to extract structured data. The project is not time-sensitive, but the budget is strictly limited. Which TWO strategies would most effectively reduce costs while maintaining the capability of a high-tier model?

Select 2 answers
A.Use assistant-message prefill to guide the model toward shorter answers.
B.Implement `cache_control` breakpoints on every document block.
C.Set `output_config.effort` to 'low' in the request parameters.
D.Use the Message Batches API to process requests asynchronously.
E.Enable `stream: true` to reduce the total token usage per document.
AnswersC, D

Lowering the effort level reduces the depth of adaptive thinking and the overall token spend per request. This is a primary lever for trading off some reasoning quality for significant cost savings within a specific model.

Why this answer

The Message Batches API provides a 50% discount for asynchronous processing within 24 hours, making it ideal for non-latency-sensitive bulk work. Additionally, lowering the 'effort' setting reduces the token spend on internal reasoning, providing a second lever to reduce costs within the chosen model tier.

Exam trap

Suggesting prompt caching for a one-time bulk processing task where document prefixes are likely unique and won't benefit from cache hits.

167
MCQeasy

Your application processes customer-uploaded PDFs using the Messages API. You want to enable citations to improve transparency. Where should you configure the citation settings?

A.Within the document content block definition in the messages list.
B.Through the `system` prompt using an XML tag wrapper.
C.In the top-level `output_config` parameter of the API request.
D.Via the `metadata` field using a `citations: true` flag.
AnswerA

Enabling citations is done by configuring the document block in the request payload. This informs the model that it is authorized to extract and reference `cited_text` from that specific document, providing the necessary grounding for the answer and ensuring transparency in the model's response to the user.

Why this answer

Citations are a feature directly associated with the document content blocks within the Messages API. When you send a document (like a PDF) to the API, you define it as a block. You configure the citation capability within the document block definition itself, allowing the model to extract and return `cited_text` when it uses that specific document to formulate its answer.

This ensures that the grounding is tied directly to the source material provided in the API request.

Exam trap

Candidates might look for a global API-level flag or a setting in the `output_config` object, neither of which exists for citation configuration.

168
MCQhard

A company is developing an application that generates long-form creative content. They notice that as the output length increases, the model's speed seems to fluctuate. Which technical factor most significantly impacts the latency of the 'Time to Last Token' (TTLT) in this scenario?

A.The number of concurrent users in the API queue.
B.The total number of output tokens generated.
C.The use of a system prompt instead of a user prompt.
D.The presence of images in the input context.
AnswerB

Because autoregressive models like Claude generate one token at a time, each additional token adds to the cumulative processing time. For long-form creative content, the sheer volume of generated text is the dominant factor in determining how long it takes for the model to finish the request. (51 words)

Why this answer

The Time to Last Token (TTLT) is primarily a function of the total number of tokens generated by the model. Each token is generated sequentially, meaning the model must perform a full inference pass for every single word or sub-word it produces. Therefore, longer outputs naturally take more time, as the total latency scales linearly with the generation length. (70 words)

Exam trap

Candidates often attribute latency to 'input size' or 'network bandwidth,' overlooking that generation (output) is an inherently sequential process where every token adds linear time.

169
MCQhard

A developer is using Claude Sonnet for a complex data transformation task. The model is occasionally failing on edge cases, but the project budget is too tight to move the entire workload to Claude Opus. According to Anthropic guidance, which action should be the FIRST lever the developer pulls to improve quality?

A.Migrate the task to Claude Opus but use a shorter system prompt to reduce input costs.
B.Switch the task to Claude Haiku to save budget for manual human review of errors.
C.Use the Message Batches API with Claude Opus to get the higher reasoning at 50% cost.
D.Adjust the 'effort' setting within the Sonnet model to manage the quality-cost trade-off.
AnswerD

Lowering or increasing effort (via output_config.effort) is a primary lever for trading quality against cost within a single model. This allows the developer to potentially find a configuration that handles edge cases better without the full cost jump to Opus.

Why this answer

Anthropic's guidance treats effort as the first quality-versus-cost lever within a model. Raising `output_config.effort` on Sonnet gives it more reasoning depth for the edge cases at a fraction of the cost of moving the whole workload to Opus. Refining the prompt is the other early step; switching model tiers should come only after these options are exhausted.

Exam trap

Immediately jumping to a different model tier (downsizing or upgrading) before exhausting configuration options within the current tier.

170
MCQmedium

An AI research team is developing a system to solve multi-step mathematical proofs that require extremely deep logical deduction and the highest possible accuracy. They find that Claude Opus 5.5 is occasionally struggling with the final steps of the most complex proofs. According to the model hierarchy, which model should they evaluate next?

A.Claude Sonnet 5.5
B.Claude Fable 5.1
C.Claude Opus 5
D.Claude Haiku 5.5
AnswerB

Fable 5.1 is the most capable model widely released, sitting above the Opus tier in terms of intelligence. It is specifically intended for the hardest reasoning challenges. If Opus 5.5 is struggling with complex proofs, Fable is the correct model to use for maximum reasoning capability.

Why this answer

Claude Fable 5.1 is the most capable model in the current hierarchy, positioned above the mainstream Opus tier. It is specifically designed for the most challenging reasoning tasks and long-horizon agentic work that may exceed the capabilities of Opus. When a task hits the quality ceiling of Opus, Fable is the logical next step for practitioners who prioritize reasoning depth and correctness over cost and speed, as it represents the current peak of the Claude model family's intelligence.

Exam trap

Thinking that Sonnet 5.5 is superior to Opus 5.5 because of the '5.5' version number.

171
MCQmedium

An enterprise legal team needs to analyze a 150,000-token collection of merger and acquisition documents to identify conflicting indemnity clauses. Which feature of the Claude 3 model family is most critical for ensuring the entire dataset is processed in a single inference pass without losing context?

A.Multimodal Vision capabilities
B.System Prompts
C.200,000-token context window
D.Temperature settings
AnswerC

The large context window is the specific technical specification that enables Claude to process long-form documents or large datasets at once. It ensures that the model can maintain coherence across the entire 150,000-token set, allowing for complex cross-referencing and deep thematic analysis across multiple distinct files or sections. (52 words)

Why this answer

The context window determines the amount of information the model can hold in its active memory during a single request. For legal analysis involving massive document sets, a 200,000-token context window allows Claude to 'see' all relevant clauses simultaneously. This enables the model to identify cross-document contradictions and nuances that would be missed if the data were fragmented. (70 words)

Exam trap

Candidates often select 'model size' or 'training data volume,' ignoring that the context window is the specific technical constraint that allows the model to 'see' all 150,000 tokens at once.

172
Multi-Selectmedium

A developer is using Claude Code to refactor a legacy codebase. They want to ensure Claude doesn't hallucinate build commands or architectural patterns that don't apply to this specific project. Which TWO features of Claude Code are designed to provide this project-specific grounding?

Select 2 answers
A.The agent's ability to read files and run local commands like 'ls' or 'grep'.
B.The use of the 'xhigh' effort setting to force Claude to double-check its training data.
C.CLAUDE.md files containing build commands and project conventions.
D.The automatic zero data retention policy for all Claude Code sessions.
E.The use of 'Plan mode' to prevent the model from making any actual file changes.
AnswersA, C

By exploring the actual filesystem, Claude Code grounds its understanding in the real state of the repository. This direct observation of the codebase prevents it from hallucinating the existence of files or functions that do not exist.

Why this answer

Claude Code uses project-specific files to ground the model in the local environment. CLAUDE.md files provide conventions and commands, while the ability to read the local filesystem allows the model to see the actual code rather than guessing based on its general training.

Exam trap

Thinking that 'Plan mode' is a grounding mechanism, when it is actually an execution mode.

173
MCQmedium

A team is choosing a Claude model for a nightly batch job that summarizes thousands of internal reports. Cost per token and throughput matter more than peak reasoning ability, and the summaries tolerate minor stylistic variation. Which selection criterion is most appropriate?

A.Choose the model with the fastest release date to ensure it has the newest features.
B.Choose the largest, most capable model available to maximize summary quality regardless of cost.
C.Choose a model based solely on the largest available context window, since reports are long.
D.Choose a smaller, lower-cost model in the Claude family that meets the required summary quality for the batch workload.
AnswerD

When cost and throughput dominate and minor stylistic variation is acceptable, a smaller, lower-cost model that still meets quality targets is the right fit. It processes the nightly volume economically while satisfying the summarization requirement, matching the team's stated priorities.

Why this answer

Model choice should follow workload requirements. Here cost per token and throughput dominate while quality tolerates minor variation, so a smaller, lower-cost Claude model that still meets the summary bar is appropriate. Picking the largest model or selecting on window size or recency ignores the explicit priorities and raises expense without needed benefit.

Exam trap

The trap here is defaulting to the most capable model, when the workload's cost and throughput constraints actually favor a smaller model that meets quality.

174
MCQhard

Which TWO of the following statements accurately describe the characteristics of the Claude 3.5 Sonnet model's context window and performance?

A.Claude 3.5 Sonnet supports an infinite context window for streaming data.
B.The model's performance decreases linearly as the context window is filled.
C.Claude 3.5 Sonnet offers a 200k token context window capacity.
D.The model is optimized for high-throughput, low-latency performance.
E.Context window usage is irrelevant to API response latency.
AnswerC, D

The 200k context window is a foundational specification for the Claude 3.5 Sonnet model. This capacity allows developers to pass substantial amounts of documentation, research papers, or entire code repositories into the prompt, enabling the model to synthesize information across vast inputs without requiring complex RAG orchestration.

Why this answer

Claude 3.5 Sonnet features a 200k token context window, which allows for the ingestion of large codebases or documents. Furthermore, the model is optimized for high throughput and low latency, making it ideal for tasks requiring rapid processing. Understanding these technical trade-offs is essential for architecting scalable applications that need to balance the need for deep contextual understanding with the speed requirements of real-time user interfaces.

Exam trap

Candidates often mistakenly believe Claude 3.5 Sonnet has a 1M+ context window or is slower than Opus, failing to recognize its specific niche as a high-throughput, 200k-context model.

175
MCQhard

A developer is using Claude Code to refactor a legacy codebase. They find that Claude sometimes ignores specific formatting rules established in the project's CLAUDE.md file during complex 'Edit' operations. Which feature provides the most deterministic limit on Claude's behavior to ensure these rules are followed?

A.Moving the formatting rules from CLAUDE.md to a system-level role prompt.
B.Configuring a PostToolUse hook in settings.json to run a formatter after every 'Edit'.
C.Using a PreToolUse hook that exits with code 2 to automatically rewrite the model's input.
D.Setting the permission mode to 'plan' to prevent Claude from making formatting errors.
AnswerB

Hooks provide deterministic control at the lifecycle level. Unlike instructions in a Markdown file, which are subject to model interpretation, a shell command in a hook will execute every time the tool is used, ensuring compliance.

Why this answer

While CLAUDE.md provides instructions, models can occasionally overlook prose-based guidance during high-complexity tasks. Hooks (specifically PostToolUse) allow for deterministic control by running shell commands (like a linter or formatter) immediately after a tool runs. This provides a hard programmatic boundary that the model cannot bypass, ensuring the output always meets project standards regardless of the model's internal attention.

Exam trap

Relying solely on 'system prompt' instructions for hard constraints that can be handled by code.

176
MCQmedium

Which of the following describes the purpose of 'Role' assignment in the Messages API?

A.To define the administrative access level of the API user.
B.To differentiate between the user's input and the model's past responses.
C.To specify the persona the model should adopt for the entire request.
D.To allow the model to rewrite the user's prompt for better accuracy.
AnswerB

The Messages API requires explicit labeling of inputs as 'user' or 'assistant' to construct a coherent dialogue history. This separation allows the model to correctly attribute previous statements and follow the conversation flow, which is essential for multi-turn interactions where Claude must respond based on context established earlier.

Why this answer

Assigning roles ('user' or 'assistant') allows the API to maintain conversational context and structure. The model needs to identify which inputs are the user's queries and which are its own prior outputs to maintain logical flow. This is fundamental to Claude's ability to engage in multi-turn dialogues where the model references previous context to generate coherent, relevant, and context-aware responses in ongoing sessions.

Exam trap

Test-takers sometimes confuse role assignment with system-level persona definitions, missing that roles specifically manage conversational turn-taking history.

177
Multi-Selecthard

A large enterprise is planning a major migration from an older model to a new model version. Which TWO steps are recommended to ensure a smooth transition during the migration process?

Select 2 answers
A.Automatically update the model ID across all production services simultaneously to ensure consistency.
B.Re-run the entire suite of evaluation test cases with the new model ID to compare performance metrics.
C.Deploy the new model ID to a small percentage of production traffic to monitor performance before full rollout.
D.Update the API request to use the new model ID, but do not change any other parameters or prompt structure.
E.Remove all previous model IDs from the codebase to save space and simplify the project configuration.
AnswersB, C

Validating the new model against established test sets is essential to ensure that the changes in the model's behavior do not negatively impact your application's accuracy or consistency. This step identifies potential regressions in reasoning or tool use that could be missed by relying on general model performance claims.

Why this answer

A managed migration requires both careful verification and a controlled rollout. First, the team must re-run their existing evaluation test sets against the new model version to ensure that quality, accuracy, and safety benchmarks are met. Second, they should perform a staged rollout, where the new model is deployed to a subset of traffic while maintaining the ability to revert to the previous pinned version if any issues are detected.

This combination of validation and incremental deployment is the standard approach for safe model upgrades.

Exam trap

Candidates often overlook the necessity of re-running evaluations, mistakenly believing that a new model will automatically perform better on their specific, niche tasks.

178
MCQeasy

Your company is moving a customer service workflow from the Claude web interface to a custom application using the Messages API. You want to implement a 'clear' button that resets the conversation history for the user. How should you handle this?

A.Send a message with the role 'system' to clear the context.
B.Send a 'reset' instruction block to the API.
C.Clear the conversation history in your application's state and omit those messages from the next request.
D.Call the /clear API endpoint.
AnswerC

Since the API is stateless, it only knows about the messages provided in the current request. By removing the stored conversation history from your application's memory or database and sending a new request without those prior messages, you effectively reset the session for the model to start fresh.

Why this answer

The Messages API is stateless, meaning it does not store history on the server side between requests. To implement a 'clear' feature, your application simply needs to drop the stored conversation state in its own database or application memory. When the user clicks 'clear', your application should stop including the previous turn's messages in the next API request.

Slash commands like /clear are specific to Claude Code and do not apply to the Messages API, which requires the client to manage the full context window.

Exam trap

Candidates often confuse Claude Code's interface-level slash commands with native API functionality, failing to realize the API relies entirely on the client to manage message history.

179
MCQhard

An organization is migrating a production application from a legacy model to Claude Sonnet 5.5. During testing, they notice that while the new model is faster, it occasionally misses subtle nuances in complex instructions that the older, slower model captured. What is the most appropriate first step to improve quality without immediately switching to Claude Opus 5.5?

A.Raise `output_config.effort` above its current level (for example to `xhigh` or `max`).
B.Use the Message Batches API to ensure higher processing priority.
C.Switch to Claude Haiku 5.5 and use multi-shot examples.
D.Enable prompt caching to give the model more time to process instructions.
AnswerA

Effort is the main lever for trading cost and latency against reasoning quality within one model. Raising it above the current level gives the model more room for adaptive thinking on difficult instructions, which is the cheapest thing to try before paying for a more expensive tier.

Why this answer

Before moving to a pricier model, the first lever is effort. Raising `output_config.effort` above its current setting (Sonnet 5.5 defaults to high, so `xhigh` or `max`) lets the model think more deeply about complex instructions, often recovering the nuance it was missing while staying on the faster, cheaper tier. Prompt improvements are the other early lever; changing model tier comes after both.

Exam trap

Immediately jumping to a more expensive model tier (Opus) before exhausting the configuration options (effort) of the current tier.

180
Multi-Selectmedium

An engineering team is reviewing how their application integrates with the Claude platform's model discovery features. When writing code to process responses from the Models API, which TWO considerations should guide their implementation? (Select TWO)

Select 2 answers
A.Applications can automatically fetch current usage cost multipliers from the model metadata payload.
B.The response objects contain detailed regional latency benchmarks for global routing optimization.
C.The client should use the model catalog endpoint to verify real-time rate limit consumption.
D.Parsing logic should account for the fact that the endpoint lists models with the newest releases first.
E.Client code can rely on the returned capability flags to determine supported model features.
AnswersD, E

Knowing that recency governs the sort order allows developers to write clean initialization routines that pick the primary model from the top of the list. Ignoring this sort behavior could cause scripts to select outdated model tiers.

Why this answer

Applications utilizing the Models API should expect to parse structured capability flags and token limits, and they must account for the default ordering where newer models appear first. They must not assume that pricing data or real-time regional load metrics are present in the responses.

Exam trap

Developers sometimes mistakenly write fallback logic that expects financial rates or deprecated status codes inside model catalog payloads.

181
MCQhard

A financial firm is building an automated system that extracts numerical metrics from incoming legal contracts using Claude Sonnet 5.5. The development team notices that when the model is asked to evaluate terms that directly conflict with internal company policy rules, it provides a standard factual extraction instead of refusing the request. Why is this expected behavior?

A.Safety classifiers are designed to protect against broad harms like illegal activities, not to enforce bespoke internal business policies.
B.Claude Sonnet 5.5 automatically suppresses refusals when processing document blocks containing structured financial and legal text.
C.Adaptive thinking suppresses standard refusal behavior to ensure maximum analytical thoroughness when processing long-form technical inputs.
D.The stateless nature of the Messages API prevents the model from retaining context about internal company rules across requests.
AnswerA

Built-in safety classifiers evaluate inputs against universal safety policies rather than individual company guidelines, financial constraints, or internal rules. Ensuring compliance with specific organizational policies requires custom validation code and explicit system prompt guidelines tailored to the enterprise context.

Why this answer

Anthropic's safety classifiers and usage policies are specifically designed to evaluate requests against core harms such as violence, illegal acts, or dangerous content, rather than enforcing specific enterprise business rules or internal corporate policies. Enforcing company-specific guidelines, legal constraints, or compliance thresholds requires implementing custom business logic layers, specialized system prompt instructions, and output validation checks within the application architecture. The model interprets text through general linguistic and reasoning capabilities, so domain-specific governance must be explicitly managed by the host application rather than expecting built-in safety filters to catch policy breaches.

Exam trap

Candidates frequently confuse general AI safety boundaries with bespoke organizational business rules, assuming built-in safety classifiers enforce internal company policies.

182
Multi-Selectmedium

A team is building a document Q&A feature on Claude and wants to reduce hallucinations when the answer is not present in the supplied documents. Which TWO techniques are appropriate? (Choose two.)

Select 2 answers
A.Instruct Claude in the system prompt to answer only from the provided documents and to say it does not know when the answer is absent.
B.Remove the documents from the prompt and rely on Claude's pretrained knowledge to fill in missing details.
C.Increase max_tokens so Claude has more space to explain its reasoning before giving the final answer.
D.Ask Claude to include a short citation or quote from the source document that supports each claim in its answer.
E.Raise the temperature so Claude explores a wider range of possible answers and is more likely to find the right one.
AnswersA, D

An explicit instruction to stay within the supplied documents and to admit uncertainty when the answer is missing gives Claude a clear behavioral rule to follow. This is a direct, low-cost way to reduce confident fabrication because the model is told what to do when evidence is lacking, rather than defaulting to a plausible-sounding guess.

Why this answer

Reducing hallucinations in document Q&A comes from constraining Claude to the supplied evidence and making that grounding verifiable. An instruction to answer only from the documents and to admit uncertainty sets the behavioral boundary, while requiring citations or quotes makes unsupported claims detectable. Sampling temperature and output-length settings do not improve factual grounding.

Exam trap

The trap here is treating sampling settings like temperature or max_tokens as hallucination controls, when grounding instructions and source citations are what actually constrain factual claims.

183
MCQmedium

A product team is building a customer support assistant on Amazon Bedrock using the Anthropic Claude 3.5 Sonnet model. They need the model to answer questions strictly from a provided knowledge base and to refuse to answer if the information is not present. Which technique should they use to constrain Claude's behavior most reliably?

A.Add a system prompt that instructs Claude to only use the provided knowledge base and to say 'I don't know' when the answer is not found.
B.Increase the max_tokens parameter so Claude has enough room to include the full knowledge base in every response.
C.Fine-tune the Claude 3.5 Sonnet model on the knowledge base so that it memorizes the content and refuses out-of-scope questions.
D.Lower the temperature setting to 0 so Claude becomes deterministic and will not hallucinate outside the knowledge base.
AnswerA

A system prompt sets persistent, high-level behavioral instructions that Claude prioritizes throughout the conversation. By explicitly restricting Claude to the provided knowledge base and requiring an 'I don't know' response when information is absent, the system prompt reliably constrains the model's scope. This is the recommended approach for grounding and refusal behavior in Claude on Amazon Bedrock, as it leverages Claude's instruction-following strength without altering the model weights.

Why this answer

A system prompt is the most reliable way to set persistent behavioral constraints for Claude on Amazon Bedrock. It instructs the model to restrict answers to a provided knowledge base and to refuse when information is missing. Unlike fine-tuning, which is unsupported and unsuitable for dynamic knowledge, or temperature and max_tokens, which control randomness and length, the system prompt directly shapes Claude's adherence to scope and refusal rules.

Exam trap

The trap here is assuming that lowering temperature to 0 eliminates hallucinations or enforces grounding, when temperature only affects randomness and not factual adherence.

184
MCQeasy

A developer is choosing between Claude 3 Haiku and Claude 3.5 Sonnet for a real-time chat application that requires very low latency and handles simple, short queries. Cost is a primary concern. Which model is most appropriate and why?

A.Claude 3 Haiku, because it is optimized for speed and cost-effectiveness while still handling straightforward tasks well.
B.Claude 3.5 Sonnet, because it has the largest context window and can handle more concurrent users.
C.Claude 3.5 Sonnet, because it is the only model that supports streaming responses for real-time chat.
D.Claude 3 Opus, because it provides the highest accuracy for all query types, ensuring customer satisfaction.
AnswerA

Claude 3 Haiku is designed for fast, low-cost interactions, making it ideal for real-time chat with simple queries. It offers lower latency and lower cost per token compared to larger models like Claude 3.5 Sonnet. For straightforward tasks that do not require deep reasoning, Haiku provides sufficient quality. Choosing it aligns with the requirements of low latency and cost sensitivity.

Why this answer

Claude 3 Haiku is optimized for speed and cost, making it the best fit for a real-time chat application with simple, short queries. It provides low latency and low cost per token while maintaining adequate quality for straightforward tasks. Larger models like Claude 3.5 Sonnet or Claude 3 Opus offer more capability but at higher cost and latency, which does not align with the stated priorities.

Exam trap

The trap here is assuming that the most capable model is always the best choice, when requirements like low latency and cost often favor a smaller, faster model.

185
MCQmedium

What is the primary purpose of using XML tags within a prompt when working with Claude models?

A.To increase the security of the API connection.
B.To improve structural separation within the prompt.
C.To enable the automatic parsing of the output as XML.
D.To bypass the token limits of the model.
AnswerB

XML tags are specifically designed to delimit sections of a prompt, allowing the model to clearly distinguish between system instructions, contextual data, and specific queries. This separation ensures that the model treats each part of the prompt correctly, leading to higher quality and more reliable outputs during execution.

Why this answer

XML tags provide a clear structure that helps the model differentiate between various sections of the prompt, such as instructions, source data, and user constraints. This structural clarity significantly improves the model's performance by reducing ambiguity and preventing instructions from bleeding into the data. Using tags is a standard best practice for prompt engineering with Claude, enabling developers to build more robust and predictable prompt templates for complex tasks.

Exam trap

Candidates often believe XML tags are for 'security' or 'API authentication', missing that their primary role is providing clear, delimited structure for the model to parse instructions.

186
Multi-Selectmedium

A data analyst wants to ensure that Claude produces highly predictable and consistent results when summarizing financial reports. Which TWO parameter adjustments should they make to the API request?

Select 2 answers
A.Set 'temperature' to a value closer to 0.0
B.Increase 'max_tokens' to ensure full coverage
C.Lower the 'top_p' value to limit the token pool
D.Use the 'stop_sequences' parameter for formatting
E.Switch to the 'claude-3-haiku' model for speed
AnswersA, C

Lowering the temperature makes the model's token selection more deterministic by favoring the most likely next word. This reduces the variability between different runs of the same prompt, which is essential for tasks like financial summarization where you want the same facts reported every time. (50 words)

Why this answer

Controlling the randomness of an LLM is vital for analytical tasks where consistency is preferred over creativity. Lowering the 'temperature' reduces the likelihood of the model selecting less probable tokens, while adjusting 'top_p' (nucleus sampling) limits the pool of tokens the model considers. Together, these settings force the model to be more deterministic and focused. (68 words)

Exam trap

Candidates often assume that changing only the temperature is sufficient, or they confuse top_p with frequency penalties, forgetting that both temperature and top_p must be jointly adjusted to completely control model randomness.

187
MCQeasy

A team is building an application that extracts data from invoice images. They are currently sending base64-encoded images in each request. They want to ensure that the image processing remains efficient as they scale. Which approach should they prioritize?

A.Set the effort level to 'low' in the output_config to force the model to ignore fine details in the images, reducing token costs.
B.Implement image resizing on the client side to keep dimensions reasonable, as token usage scales with the resolution of the image.
C.Use the Files API to store the images, which automatically compresses them to a standard resolution before processing.
D.Switch from base64 encoding to URL-based references, as URL references are processed using fewer tokens than base64 data.
AnswerB

Image token costs are directly proportional to the dimensions of the provided image. By resizing or cropping images to the minimum resolution required for the model to accurately extract the necessary data, you effectively reduce the input token count and improve the overall latency of the API request.

Why this answer

When using the Messages API, images are provided as content blocks. The API handles base64-encoded strings or URLs. Efficiency in image processing is primarily driven by understanding that image token consumption scales with the dimensions of the image.

Therefore, resizing or optimizing high-resolution images before sending them to the API is the most effective way to manage token usage and latency, as the API does not have an automatic 'downsampling' feature that you can configure to reduce costs.

Exam trap

Thinking that the API has built-in image compression or that base64 encoding itself is the primary driver of high token costs.

188
MCQmedium

A developer is using the Anthropic Messages API to build a conversational agent. They want to maintain context across multiple turns and ensure that the model's responses are consistent with the system prompt. Which API feature should they use to provide the system prompt?

A.Prepend the system prompt to every user message in the conversation.
B.Use the 'system' parameter in the API request to provide the system prompt.
C.Set the 'role' of the first message to 'system' in the messages array.
D.Include the system prompt as the first user message in the messages array.
AnswerB

The Anthropic Messages API includes a top-level 'system' parameter specifically for system prompts. This parameter is separate from the 'messages' array and is used to set the model's behavior, persona, or instructions. It ensures that the system prompt is consistently applied across all turns of the conversation, providing a stable context that guides the model's responses.

Why this answer

The Anthropic Messages API provides a dedicated 'system' parameter for supplying a system prompt. This parameter is separate from the conversational messages and ensures that the model's behavior is consistently guided by the system instructions across all turns. Using this parameter is the correct and efficient way to set a system prompt.

Exam trap

The trap here is assuming that the system prompt should be part of the messages array, either as a user message or with a 'system' role, when the API has a separate parameter for it.

189
Multi-Selecthard

Your team is migrating a legacy document processing pipeline to the Claude API. Which TWO of the following are primary advantages of choosing the API over the Claude web application for this specific migration?

Select 2 answers
A.The API allows for direct, automated integration with backend databases and document management systems.
B.The API supports programmatic control over model parameters, tool-calling loops, and structured output formats.
C.The API provides a graphical user interface for visualizing token usage and cost per document.
D.The API automatically handles document versioning and storage for all processed files.
E.The API is faster because it bypasses the safety filters applied to the Claude web application.
AnswersA, B

The API provides the necessary programmatic access to integrate model outputs directly into your infrastructure, enabling automated workflows. This eliminates the need for manual copy-pasting or interface-based interaction, making it the only viable choice for building a robust, scalable document processing pipeline that operates reliably in a production environment.

Why this answer

The API allows for programmatic integration into existing backend systems, enabling automated, high-volume processing that is not possible with the web application. Additionally, the API provides the ability to implement fine-grained control over model parameters and tool-calling loops, which are essential for complex workflows like document extraction. By keeping the logic in code, you gain the ability to version control your prompts, manage state explicitly, and integrate with your own monitoring and logging infrastructure, all of which are critical for production-grade pipelines.

Exam trap

Candidates sometimes credit the API with features it lacks, such as a built-in usage dashboard, document storage with versioning, or weaker safety filtering.

190
MCQmedium

A data engineering team is building an asynchronous document processing pipeline using the Message Batches API for non-latency-sensitive workloads. They want to optimize their pipeline handling for batch results. Which of the following principles applies to processing Message Batches responses?

A.Prompt caching cannot be utilized within batch requests due to asynchronous queue limitations.
B.Batch results are returned strictly in the original submission order to simplify database reconciliation.
C.Individual requests within a batch may have distinct outcomes such as succeeded, errored, canceled, or expired.
D.Unfinished batch requests are retained indefinitely on server storage until manually retrieved by the client.
AnswerC

Each request inside a batch processes independently, resulting in individual statuses like succeeded, errored, canceled, or expired. Robust pipeline code must inspect each result record individually to handle failures or retries without discarding successful outputs.

Why this answer

The Message Batches API processes requests asynchronously at a reduced cost, with results returning within 24 hours. Because batch results can come back in any order, application code must match incoming results back to original items using the unique custom_id provided in each request. Furthermore, individual requests within a batch can succeed, error, cancel, or expire independently, meaning pipeline error handlers must inspect individual result statuses and resubmit failed items accordingly rather than expecting uniform batch outcomes.

Exam trap

Candidates often assume batch results return in the exact order they were submitted or that a batch failure means all individual items failed.

191
MCQmedium

A developer is building an application that needs to provide a short, single-word classification for incoming feedback. They are worried that the adaptive thinking process will generate unnecessary tokens and increase costs. What is the most effective way to handle this?

A.Use the Haiku 5.5 model with a temperature of 0.
B.Use a max_tokens limit of 5 to force a short response.
C.Disable the adaptive thinking block in the API request.
D.Set the effort level to 'low' and use structured outputs.
AnswerD

Lowering the effort level reduces the computational tokens spent on reasoning for simple tasks, while structured outputs ensure the result is correctly formatted as a single-word classification, providing an efficient and reliable solution for the application's requirements.

Why this answer

When a specific, short output is required, the developer should avoid using a tiny max_tokens limit, which can cause truncation. Instead, they should instruct the model using structured outputs or clear formatting instructions. By lowering the effort level to 'low', the developer reduces the internal thinking tokens spent on the classification task, providing a more cost-effective and efficient way to achieve the desired output format without interfering with the model's generation process.

Exam trap

Candidates often try to use 'max_tokens' as a control for reasoning style, which leads to incomplete responses rather than efficient ones.

192
MCQmedium

A software team is deploying an AI system powered by Claude Sonnet 5.5 to process daily customer support tickets. Most tickets require quick, standard classification, but a small subset involves complex troubleshooting steps. How does adaptive thinking handle this variance in reasoning demands during runtime?

A.The model automatically determines whether to think and how deeply to reason on a per-request basis based on task complexity.
B.Adaptive thinking requires pre-training custom fine-tuned weights for each distinct task type to regulate reasoning depth.
C.The developer must pass explicit task complexity classification tags in the metadata parameter for adaptive thinking to adjust.
D.The model allocates a fixed percentage of the overall context window to thinking tokens for every incoming request.
AnswerA

With adaptive thinking, Claude evaluates the complexity of each incoming prompt. It dynamically scales its internal reasoning effort up for difficult, multi-step queries and down for straightforward tasks like classification, optimizing both performance and execution latency.

Why this answer

Adaptive thinking allows the model to dynamically evaluate incoming queries and determine both if thinking is needed and how much internal reasoning to perform. For simple classification tasks, the model recognizes the low complexity and completes the task using minimal or no thinking tokens. For complex troubleshooting queries, it dynamically expands its internal reasoning trace before producing a final answer.

This dynamic allocation happens automatically per request, avoiding unnecessary token spend on trivial turns while preserving high quality on hard edge cases.

Exam trap

Assuming that adaptive thinking allocates a fixed, equal number of thinking tokens to every API call regardless of input complexity.

193
MCQeasy

Your company maintains a long-running library of automated document extraction tasks. You are currently migrating from an older model version to `claude-sonnet-5-5`. What is the primary advantage of using this specific model ID for your production environment?

A.It allows the API to automatically select the most cost-effective model for the task.
B.It automatically scales the model capacity based on the volume of incoming requests.
C.It provides a stable reference point for model behavior and facilitates regression testing.
D.It enables access to lower pricing tiers compared to using generic model aliases.
AnswerC

Pinning to a specific model ID provides a consistent target for your application, allowing your team to conduct thorough testing and maintain predictable outcomes for your extraction logic, which is essential for ensuring auditability and stability in enterprise-grade automated workflows.

Why this answer

Using the specific model ID `claude-sonnet-5-5` ensures that your application consistently targets the current stable version of the Sonnet 5.5 model family. By pinning your configuration to a specific, published model identifier rather than relying on generic names, you stabilize the model behavior, which is critical for auditability and ensuring consistent output formats in automated extraction pipelines. This practice allows your team to perform rigorous regression testing before any future model updates or migrations occur, thereby maintaining the reliability of your extraction service.

Exam trap

Candidates often assume that model IDs automatically handle backward compatibility or that they should use generic aliases to always get the latest model version.

194
MCQmedium

A developer wants Claude to return structured data that another service can parse automatically. They need the output to follow a fixed schema every time, with no conversational text around it. Which approach is most appropriate?

A.Ask Claude to explain its reasoning first and then append the structured data at the end of the response.
B.Describe the desired schema in the prompt and ask Claude to respond only with valid JSON that matches it.
C.Set max_tokens to a large value and let Claude choose whichever format best represents the data.
D.Request the output as a Markdown table and convert it to JSON on the client side.
AnswerB

Describing the exact schema and instructing Claude to reply only with matching JSON is the standard way to obtain machine-parseable output. Claude is capable of following precise format instructions, and keeping the response limited to JSON avoids the conversational wrapper that would break downstream parsing, making this a direct fit for the requirement.

Why this answer

Structured output is achieved by specifying the schema precisely and constraining Claude to emit only matching JSON. This removes the need for brittle post-processing and satisfies the requirement that no conversational text surround the data. Alternatives such as reasoning-first responses, Markdown tables, or open-ended formatting all introduce parsing uncertainty.

Exam trap

The trap here is assuming that any response containing valid JSON is usable, when surrounding prose or an unspecified format can still break automated parsing.

195
MCQhard

A developer is using the Claude TypeScript SDK to build a high-performance document analysis tool. They want to execute a specific cleanup function exactly once, but only after the entire streamed response has been fully received and the internal message object is fully constructed. Which SDK feature is the most idiomatic way to achieve this?

A.Setting a 'stream: false' parameter in the initial request
B.Polling the 'message_delta' event repeatedly
C.Using the 'await stream.finalMessage()' helper method
D.Collecting text from every 'text' event and treating the most recent one as the end of the response
AnswerC

This helper method is designed specifically for this use case. It returns a Promise that resolves with the final, fully-formed Message object. It automatically handles the accumulation of all content blocks and usage metadata, making it the most reliable way to perform post-processing after a stream ends.

Why this answer

The Claude SDKs provide helper methods to simplify the management of Server-Sent Events. In the TypeScript SDK, 'await stream.finalMessage()' is the recommended approach for non-event-driven logic that requires the complete response. It abstracts the complexity of listening to 'message_start', multiple 'content_block_delta' events, and 'message_delta', returning a single Promise that resolves to the fully assembled message object only after the stream successfully completes.

Exam trap

Testing for a generic 'message' event or 'message_delta' event listener, which may fire multiple times or lack the full object context.

196
MCQeasy

A UX designer wants the AI assistant to appear more interactive by showing the response as it is being generated, rather than waiting for the entire block of text to be finished. Which API feature should the developer implement?

A.Batch Processing
B.Streaming
C.Recursive Infilling
D.Contextual Caching
AnswerB

Streaming enables a real-time data flow where tokens are sent to the client immediately after they are produced. This creates a 'typing' effect in the user interface, which makes the application feel much more responsive and interactive, even if the total generation time remains the same. (51 words)

Why this answer

Streaming allows the API to send the response in small chunks as they are generated, rather than waiting for the entire completion. This significantly improves the 'perceived' latency for the user, as they can start reading the beginning of the response while the model is still working on the end. (66 words)

Exam trap

Candidates often mistake asynchronous execution or caching features for streaming, missing that streaming specifically handles incremental chunk delivery to improve perceived response latency.

197
Multi-Selectmedium

A developer is building an agentic workflow that interacts with several internal databases. Which TWO of the following practices are recommended when implementing tool use for this application?

Select 2 answers
A.Include a comprehensive description for the tool and each parameter in the input_schema.
B.Set the `temperature` parameter to 0 to ensure the model makes deterministic tool calls every time.
C.Use the assistant prefill feature to suggest the start of the tool call to improve accuracy.
D.Force the model to use a specific tool by setting `tool_choice` to the tool name.
E.Report tool execution failures back to the model using a tool_result block with `is_error: true`.
AnswersA, E

Clear descriptions are the primary mechanism Claude uses to determine tool selection. Without precise definitions, the model may fail to call the correct tool or misinterpret the required input parameters for the database queries.

Why this answer

When using tools, the model relies heavily on the quality of the tool definitions. Providing clear descriptions for each tool and its parameters is essential for the model to correctly identify when a tool should be called. Additionally, because agents often operate in loops, handling tool failures gracefully by reporting them back to the model as an error is critical.

This allows the model to analyze the failure and potentially retry or adjust its strategy, rather than simply failing silently or producing unexpected results.

Exam trap

Thinking that the model automatically knows how to recover from failed tool calls without explicit feedback, or assuming that tool definitions do not need to be highly descriptive.

198
MCQhard

Refer to the exhibit. An application sends the provided JSON payload to the Anthropic API. What is the expected behavior regarding the system prompt?

A.The API will return an error because the system prompt is improperly formatted.
B.The system prompt will be ignored because it must be inside the messages array.
C.The API will correctly apply the system prompt to the entire conversation turn.
D.The model will see the system prompt as the latest user message.
AnswerC

The system prompt is correctly defined at the top level of the request. The Claude API uses this field to set the 'persona' or constraints that govern the model's behavior for the entire session. This ensures the assistant maintains the intended behavior throughout the multi-turn exchange provided in the messages.

Why this answer

In the Anthropic Messages API, the system prompt must be defined at the top level of the JSON object, not within the messages array. Because the system prompt is defined correctly at the top level in this exhibit, it will be correctly processed. Understanding this structure is essential for developers to correctly separate behavioral instructions from conversational history, preventing unexpected model behavior during multi-turn API interactions.

Exam trap

Many test-takers mistakenly believe system prompts should be nested inside the messages array alongside user and assistant turns.

199
MCQhard

When building a multi-turn agentic workflow, a developer notices that as the conversation grows, Claude begins to hallucinate details from much earlier in the chat or loses track of the current state. Which approach is most consistent with Anthropic's 'Good practice' for context management to solve this?

A.Use subagents to perform heavy reading and return only condensed summaries to the main orchestrator.
B.Manually edit the message history to remove all assistant 'thinking' blocks to save space.
C.Clear the prompt cache every five turns to ensure the model 'refreshes' its understanding.
D.Switch to Claude Fable 5.1 to take advantage of its superior long-context recall capabilities.
AnswerA

This is a core 'Good practice' for context management. By isolating large amounts of data in subagent context windows and only passing summaries back, the main model stays focused on the most relevant information, reducing hallucinations caused by context noise.

Why this answer

Long contexts can lead to performance degradation or 'lost in the middle' issues. Anthropic recommends using subagents to handle heavy reading and returning only condensed summaries to the main orchestrator, or using compaction to summarize context. This keeps the orchestrator's context window focused on high-signal information.

Exam trap

Relying solely on the 1M-token context window capacity without active management of what is inside that window.

200
MCQeasy

A business analyst is using Claude to summarize a set of internal reports from 2025. They notice that when they ask Claude about specific company events from the previous month not mentioned in the reports, the model occasionally provides plausible but incorrect details. Which fundamental characteristic of Claude is being demonstrated?

A.Safety refusal triggered by stop_reason
B.Automatic context compaction
C.Knowledge cutoff and hallucination
D.A temporary 529 Overloaded error
AnswerC

Claude has a training data cutoff and does not know about very recent events unless they are provided in the context window. Hallucination occurs when the model generates realistic but false information to satisfy a prompt about topics outside its training or provided context.

Why this answer

This scenario describes a hallucination, where a model generates information that is grammatically correct and plausible but factually inaccurate or not present in its training data. Large language models do not have real-time access to the world unless provided via tools or documents; when prompted for unknown information without these aids, they may 'fill in the gaps' with fabricated but realistic-sounding content.

Exam trap

Confusing a lack of real-time knowledge with a software bug or a transient API error.

201
MCQhard

A software team is deploying an agent that uses the Claude API to write and execute database queries. They are concerned about 'knowledge limits' leading to hallucinations where the agent assumes the existence of table columns that do not exist. What is the most robust architectural solution to this problem?

A.Set `output_config.effort` to `max` to ensure the model uses its internal training to deduce the schema.
B.Implement a tool that the agent must call to fetch the current database schema before writing any queries.
C.Provide a comprehensive list of all possible database columns in the system prompt for every request.
D.Use the Messages API MCP connector to allow the model to query its own internal training weights.
AnswerB

This follows the 'gather context -> take action' agent loop. By retrieving the actual schema at runtime, the agent is grounded in the ground truth of the database, effectively eliminating hallucinations caused by knowledge limits regarding the table structure.

Why this answer

In an agentic loop, providing the model with a tool to fetch real-time context (like a database schema) is the best way to overcome pre-trained knowledge limits. This ensures the model is working with factual, current data rather than relying on its internal training, which might be hallucinated or outdated.

Exam trap

Attempting to fix a dynamic context problem (changing database schemas) with a static solution like few-shot examples in the system prompt.

202
Multi-Selecthard

A developer is using the Claude Messages API with prompt caching. Which THREE actions would cause a cache invalidation for the messages following them?

Select 3 answers
A.Reordering the tool definitions in the tools array.
B.Decreasing the max_tokens parameter for the response.
C.Changing the user's input in the final message of a 10-turn conversation.
D.Modifying the content of the first message in the messages list.
E.Adding a dynamic 'Current Time' string to the top-level system prompt.
AnswersA, D, E

The cache is sensitive to the exact order of elements. Reordering tools changes the byte-for-byte prefix, meaning the cache will not find a match for the tools or any subsequent messages.

Why this answer

Prompt caching relies on a prefix match. Any change in the sequence (tools, system prompt, or messages) invalidates the cache for everything that follows. Adding a dynamic timestamp to the system prompt, reordering the list of available tools, or changing the content of the very first message all alter the prefix.

Exam trap

Thinking that changes at the end of the prompt affect the cache for the beginning.

203
MCQmedium

Your application uses the Claude API to generate code snippets. You have enabled streaming to display the code to the user as it is written. During a request, the model hits a safety refusal. How will the streaming response behave in this scenario?

A.The stream will pause and wait for the client to approve continuing past the refusal.
B.The stream will provide an error message in the content blocks before the connection closes.
C.The stream will continue to send tokens until the max_tokens limit is reached, regardless of the refusal.
D.The stream will terminate, and the final response will contain a stop_reason of 'refusal'.
AnswerD

The API signals a refusal by setting the `stop_reason` to `refusal` in the final message object. The stream will stop immediately upon the model triggering this safety response, and the application must be designed to detect and handle this status rather than expecting a completed code snippet.

Why this answer

When a safety refusal occurs, the API will communicate the refusal through the `stop_reason` property in the final response metadata. If the refusal is triggered early, the stream may contain only minimal or no content before the process terminates. The critical takeaway is that streaming does not guarantee the full output will be delivered if a safety violation is detected.

The application must be prepared to handle the `refusal` stop reason, which signifies that the model declined to complete the request based on safety policy.

Exam trap

Assuming the stream will always contain at least a partial answer even if a safety refusal occurs during generation.

204
MCQmedium

A legal team is using Claude Sonnet 5.5 to review long contracts provided as PDFs. For every clause Claude reports, they need the exact quoted text and the page it came from so a reviewer can check it. Which feature should be enabled on the document blocks to support this requirement?

A.Enable citations on the document blocks in the API request.
B.Use the thinking: {type: 'adaptive'} parameter to force document scanning.
C.Pass the PDF through the Tool Runner helper to extract page numbers.
D.Set the output_config.format to 'pdf-citation-v1'.
AnswerA

Enabling citations on document blocks allows Claude to return cited_text and location data. This is the standard way to ensure the model grounds its answers in the provided PDF and identifies where the information originated.

Why this answer

When using PDFs as document blocks, enabling citations allows Claude to provide structured references to the source material. This includes the specific text used to generate the answer and its location within the document, which is essential for verification in legal workflows.

Exam trap

Confusing standard text extraction with the specialized 'citations' feature for document blocks.

205
Multi-Selectmedium

You are monitoring your API usage and notice 'pause_turn' stop reasons in your logs. Which TWO of the following statements accurately describe the behavior associated with this stop reason?

Select 2 answers
A.The model has hit a safety refusal that requires a human to review the conversation logs.
B.The server-tool turn is active and the application must send the response back to continue the turn.
C.This stop reason only occurs when the model encounters a critical server-side error during execution.
D.The application must include the full conversation history in the request to continue from the pause.
E.The model has reached a natural conclusion and no further input is required from the client.
AnswersB, D

This is correct. The 'pause_turn' reason indicates the server-side environment is in a state that requires the application to feed the current response back into the API to move the agentic workflow forward.

Why this answer

The pause_turn stop reason occurs during long-running server-tool turns: the API pauses the turn and returns what has been produced so far. It is not an error or a refusal. To continue, the application sends the response back, appended to the full conversation history, in a new request, and the model resumes the turn.

Exam trap

Mistaking 'pause_turn' for a signal to stop the process, when it actually requires the application to continue the turn to allow the server-side logic to resolve.

206
Multi-Selectmedium

Which THREE components are required when making a successful request to the Anthropic Messages API? (Select THREE)

Select 3 answers
A.The 'model' parameter specifying the version
B.The 'messages' array containing the conversation
C.The 'max_tokens' parameter defining the output limit
D.A 'temperature' value set to exactly 1.0
E.A 'system' parameter with at least 50 words
AnswersA, B, C

The API must know which specific model to invoke, such as 'claude-3-5-sonnet-20240620'. Without this parameter, the system cannot route the request to the correct inference engine, as different models have different pricing, performance characteristics, and capabilities required for the task.

Why this answer

Understanding the API structure is fundamental for any developer working with Claude. The Messages API requires specific parameters to function correctly, including model identification, the conversation history, and a limit on the output length to ensure predictable behavior and resource management.

Exam trap

Candidates often select optional parameters like temperature or system prompts as mandatory fields, forgetting that only the model identifier, messages array, and max_tokens are strictly required.

207
MCQmedium

Your team is auditing the token usage of an application that utilizes both standard messages and the Message Batches API for bulk document classification. You notice that the costs for the batches are significantly lower than standard requests. Why is this the case?

A.Batches automatically apply prompt caching to every request, eliminating all input costs.
B.Batches use a different, lower-cost model family than the standard API.
C.Batch requests are limited to a smaller context window, which reduces the total token count.
D.The Batch API allows for a 50% discount on standard request costs due to asynchronous processing.
AnswerD

Message Batches are priced at 50% of standard cost in exchange for asynchronous processing that can take up to 24 hours. That trade makes batches the cost-effective choice for bulk, non-latency-sensitive work such as classification backfills.

Why this answer

The Message Batches API processes requests asynchronously at 50% of the standard cost. The models and capabilities are the same as the standard Messages API; what changes is that results arrive within up to 24 hours rather than immediately. That makes batches the cost-effective choice for high-volume work where real-time responses are not needed, such as bulk classification or evaluations.

Prompt caching can also be used inside batch requests, but it is not applied automatically.

Exam trap

Candidates may think the cost reduction comes from using a different model or lower quality settings, rather than the intrinsic discount offered for batch processing.

208
MCQeasy

A development team is preparing to deploy an automated content generation service to production. They have been testing with different models and want to ensure that their production environment remains stable and predictable by preventing unexpected model behavior changes. Which practice should they implement for their API calls?

A.Hardcode the model ID as claude-sonnet-5-5 in the API request configuration.
B.Implement a local proxy that automatically selects the model based on current latency metrics.
C.Use the model family name 'Sonnet' in the model field to always get the newest version.
D.Dynamically fetch the latest model ID from the /v1/models endpoint before every request.
AnswerA

Specifying the full model ID ensures that every API request targets the exact same model version, preventing unintended changes in behavior, output structure, or performance that could occur if the underlying model were to be updated. This is the recommended approach for maintaining production stability and predictable output across all API calls.

Why this answer

In production environments, it is critical to use specific, stable model identifiers rather than relying on generic or shorthand names. By using the exact model ID (e.g., claude-sonnet-5-5), the team ensures that the underlying model version remains constant across API requests. This prevents the application from automatically upgrading to a new, untested model version that could introduce subtle changes in reasoning, output formatting, or token usage, ensuring consistent behavior for their end users and simplifying debugging processes.

Exam trap

Candidates often confuse model tier names with version-pinned model IDs, or assume that the API automatically handles stability without explicit configuration.

209
Multi-Selecthard

An automated moderation system uses Claude Sonnet 5.5 to flag user-generated content. The team notices that some requests return without any text in the content blocks. Which TWO `stop_reason` values would explain why the model produced a response but did not provide any standard assistant text? (Select TWO)

Select 2 answers
A.tool_use
B.stop_sequence
C.refusal
D.end_turn
E.pause_turn
AnswersA, C

If Claude determines that a tool is necessary to answer, it may return only a tool_use block. In this case, the stop_reason is tool_use and there is no text block in the content list. The application must provide the tool result before the model will generate text.

Why this answer

A 'refusal' stop reason occurs when Anthropic's safety classifiers decline to answer a prompt, resulting in a response that lacks the requested content. A 'tool_use' stop reason occurs when the model decides to call a tool instead of (or before) providing a text response; in many tool-calling scenarios, the assistant's turn consists only of the tool invocation block without any preceding or accompanying text content. Both scenarios result in a response where the traditional text content is absent.

Exam trap

Confusing 'end_turn' with a safety refusal or assuming 'max_tokens' always contains partial text.

210
MCQeasy

Which of the following statements about the `max_tokens` parameter in the Claude API is accurate?

A.It sets the upper bound for the number of tokens the model can generate in the response.
B.It defines the maximum total tokens (input plus output) that can be processed in a single request.
C.It automatically adjusts the model's effort level to ensure the response fits within the specified limit.
D.It is an optional parameter that defaults to the model's maximum supported output capacity if omitted.
AnswerA

The parameter is explicitly defined as the maximum number of tokens allowed in the model's output. This includes both the text response and any adaptive thinking tokens generated by the model. It is the primary control mechanism for limiting the size of the generated output for any given request.

Why this answer

The `max_tokens` parameter is a mandatory field in every request to the Messages API. It defines the maximum number of tokens the model is allowed to generate in its response. Because it is a hard cap, if the model's internal processing—including adaptive thinking tokens—reaches this limit, the generation will stop immediately, and the `stop_reason` will be set to `max_tokens`.

It does not influence the input token limit (which is defined by the context window), only the output generation capacity.

Exam trap

Candidates often confuse `max_tokens` with the context window size or think it can be omitted to allow infinite generation.

211
MCQhard

Your organization is transitioning from the Claude web application to the Claude API for a document analysis project. You notice that the model's 'thinking' process is visible in the web UI but seems absent or different in your API responses. What is the correct way to handle model thinking in the API?

A.Adjust the 'effort' parameter in the output_config to control the model's thinking depth.
B.Set the 'thinking' parameter to 'verbose' to ensure you receive the full internal chain-of-thought.
C.Disable thinking in the API request if you want to avoid extra token costs and receive faster responses.
D.Use the 'thinking_log' field in the response to retrieve the model's internal reasoning for auditing.
AnswerA

The effort parameter (low, medium, high, xhigh, max) is the correct way to influence the thinking depth and token consumption of the model. By adjusting this setting, you can balance the model's reasoning performance with your specific cost and latency requirements, which is the standard approach for fine-tuning model behavior.

Why this answer

In the API, current models think adaptively by default, and the raw chain of thought is never exposed; thinking may be returned summarized or omitted. Thinking blocks must be passed back unchanged in multi-turn tool loops. To control how much the model thinks, adjust the effort parameter, which is the main lever for balancing quality, latency and cost.

Exam trap

Trying to retrieve or log the raw internal reasoning trace, which is explicitly not exposed by the API.

212
MCQmedium

An engineering team is building a real-time log analysis tool using the Anthropic Messages API with streaming enabled. During a high-volume log parsing run, they notice that the final output token count is missing from the events received early in the data stream. How should the developer modify their event handling code to capture the final output token count?

A.Extract the output token count from the message_delta event which arrives just before the stream closes.
B.Accumulate the token counts incrementally from every content_block_delta event received throughout the entire stream.
C.Retrieve the complete token count from the message_stop event which terminates the server-sent event stream.
D.Query the separate token counting endpoint immediately after receiving the message_start event.
AnswerA

The message_delta event carries the definitive output token count alongside the stop reason when the model finishes generating content. This event occurs near the conclusion of the server-sent event sequence, allowing your application to log or track consumption accurately right before the connection closes.

Why this answer

When streaming responses from the Claude API using server-sent events, token usage information is distributed across different event types. The input token usage is provided at the very beginning of the stream within the message_start event. Conversely, the final output token count and the stop reason do not arrive until the message_delta event is processed near the end of the generation.

A developer must capture and accumulate data from both event types to obtain complete usage metrics, because the concluding message_stop event contains no usage fields at all.

Exam trap

Candidates often assume that usage statistics are sent in a single batch event at the end of the stream or contained within the final message_stop event.

213
MCQmedium

A developer is writing a script to inventory the models available to their organization. They notice that the Models API returns a 'max_tokens' field. What does this specific field represent?

A.The number of tokens reserved for the model's internal thinking process.
B.The maximum number of tokens that can be generated in a single response.
C.The total context window size including both input and output tokens.
D.The recommended number of tokens for the system prompt to ensure optimal performance.
AnswerB

This field defines the hard limit for the model's output generation. Developers must ensure their application's `max_tokens` parameter remains within this limit to prevent the API from returning an error or truncating the response prematurely, ensuring the model can complete its intended task within the allowed constraints.

Why this answer

In the context of the Models API, the 'max_tokens' field represents the maximum number of tokens that the model can generate in a single response (the output cap). This is distinct from the model's context window, which is represented by 'max_input_tokens'. Understanding this distinction is crucial because the 'max_tokens' value dictates the upper limit of the model's output, which developers must respect when setting the `max_tokens` parameter in the Messages API to avoid truncated or invalid responses.

Exam trap

Confusing 'max_tokens' (the output limit) with the total context window size ('max_input_tokens').

214
MCQhard

A platform engineer notices that several production workflows dynamically switch between `claude-sonnet-5-5` and `claude-opus-5-5` depending on prompt complexity. Both workflows send an identical, large system prompt with ephemeral prompt caching enabled. How does switching model IDs affect prompt cache behavior?

A.The API automatically translates cached token prefixes between Opus and Sonnet models at a reduced write rate.
B.Prompt caches are shared across models within the same organization if token counts match exactly.
C.Prompt caches are strictly per-model; switching model IDs results in a cache miss on the targeted model.
D.Switching model IDs immediately purges all existing cache entries previously created by the alternative model.
AnswerC

Cache entries belong to the model that created them. Even with an identical system prompt and tools, an entry created by claude-sonnet-5-5 cannot be read by claude-opus-5-5, so the first request after switching is a cache miss.

Why this answer

Prompt caches are per model. A prefix cached by requests to claude-sonnet-5-5 cannot be read by a request to claude-opus-5-5, even when the system prompt and tools are identical. Switching model IDs therefore causes a cache miss on the newly targeted model, which then processes the prefix uncached (or writes a new cache entry if breakpoints are present).

Teams should expect a separate cache warm-up for each model.

Exam trap

Believing prompt caches are shared globally across different model tiers as long as the organization and text prefix match.

215
MCQmedium

An enterprise architecture team is transitioning a customer service workflow from the Claude web application to a custom integration built on the Anthropic Messages API. During development, engineers notice that the API response payload does not contain an automatically rendered chat history interface or pre-built UI components. Why does this architectural difference exist between the Claude web application and the direct Messages API?

A.The Messages API automatically stores all conversation turns on Anthropic servers, but developers must write custom SQL queries to retrieve them.
B.The Claude web application runs locally in the browser using client-side JavaScript, whereas the Messages API executes everything on serverless edge functions.
C.The Anthropic Messages API is a stateless infrastructure service, whereas the web application includes built-in state management and UI components.
D.The Messages API requires developers to use server-sent events for all data storage, whereas the web application uses traditional relational databases.
AnswerC

The API requires the client to send the complete conversation history with every request because it is entirely stateless by design. The web application handles these UI and session storage concerns out of the box for end users, requiring developers using the API to build their own state management layers.

Why this answer

The Claude web application is a fully featured end-user product that includes its own UI state management, chat history persistence, and frontend rendering components. In contrast, the Anthropic Messages API is a stateless infrastructure service. Every API request must supply the full conversation history from the client side because the API retains no session state between calls.

Developers building custom applications must implement their own backend storage and frontend state handling to maintain conversational continuity, manage user sessions, and render interface components appropriately.

Exam trap

Candidates often assume that the API automatically maintains chat state like the web application, leading to architectural bugs where context is lost between separate API requests.

216
MCQhard

A developer is building a multi-turn chat application with the Anthropic Messages API. After several exchanges, they notice Claude loses track of details mentioned early in the conversation. Which action best addresses this while staying within the API's design?

A.Increase the temperature to improve recall of earlier turns.
B.Add a system prompt saying 'Remember all previous messages.'
C.Switch to a larger Claude model with a bigger context window.
D.Resend the full prior message history with each new request.
AnswerD

The Messages API is stateless: the model does not retain prior turns between calls. To preserve context, the client must include the relevant earlier messages in the messages array on every request. Resending the full history ensures Claude can attend to details from earlier exchanges, directly addressing the loss of early conversation details.

Why this answer

The Messages API does not persist conversation state; each call is independent. To let Claude reference earlier details, the application must include those prior turns in the messages array of every request. A larger context window or a system instruction cannot substitute for actually sending the history, and temperature has no bearing on recall.

Exam trap

The trap here is assuming the model remembers previous API calls or that a system prompt can grant memory, when the Messages API is stateless and requires the client to resend conversation history.

217
MCQhard

A developer is using the Anthropic Messages API with Claude 3 Opus to build a multi-turn technical support chatbot. The conversation history is growing large, and they want to reduce token usage while preserving the most relevant context. They decide to implement a sliding window that keeps only the last N turns. What is a potential drawback of this approach that they should consider?

A.The sliding window will increase latency because Claude must reprocess the entire conversation history on each turn.
B.The sliding window may discard important early instructions or context that Claude needs to maintain consistent behavior throughout the conversation.
C.Claude will automatically summarize the dropped turns and include the summary in its response, which may introduce hallucinations.
D.The sliding window will cause Claude to exceed the model's maximum context window because older turns are still counted in the token limit.
AnswerB

A sliding window keeps only recent turns, so any critical instructions or facts established early in the conversation are dropped once they fall outside the window. Claude has no memory beyond the supplied context, so it may forget user preferences, prior constraints, or key details. This can lead to inconsistent or incorrect responses. The developer should summarize or selectively retain important early context rather than blindly truncating.

Why this answer

A sliding window reduces token usage by dropping older turns, but it also removes early context that may be essential for consistent behavior. Claude does not retain memory outside the provided messages, so once early instructions or facts are dropped, they are unavailable. The developer should consider summarization or selective retention of important early context to balance token efficiency with conversational coherence.

Exam trap

The trap here is believing that Claude retains memory of dropped turns or automatically summarizes them, when in fact the model only sees the current request payload.

218
MCQeasy

Which core design principle is used by Anthropic to ensure that Claude models are helpful, honest, and harmless by training them against a set of written rules or values?

A.Manual Data Scrubbing
B.Constitutional AI
C.Supervised Pattern Matching
D.Open-Source Alignment
AnswerB

This approach involves training the model to follow a specific set of principles (a constitution) to guide its decision-making. It allows Claude to evaluate its own responses for safety and helpfulness, ensuring it adheres to ethical guidelines without requiring human intervention for every single generated response. (50 words)

Why this answer

Constitutional AI is the foundational methodology Anthropic uses to align Claude's behavior with human values. By using a 'constitution' or set of principles during the RLHF process, the model learns to self-critique and revise its responses. This reduces the need for manual labeling of every possible harmful output, creating a more robust safety framework. (68 words)

Exam trap

Candidates often guess 'RLHF' or 'Supervised Fine-Tuning' generally, failing to identify 'Constitutional AI' as the specific, proprietary design principle Anthropic uses to align models with a defined set of values.

219
MCQmedium

When implementing a streaming response from the Messages API, at what point can the application reliably determine the final token usage and the reason the generation finished?

A.In the initial response header before the first text block is streamed.
B.Only after the stream has concluded, typically in a final event or aggregated by the SDK.
C.Inside each individual text block as a running total metadata field.
D.By calling the token counting endpoint immediately after the stream starts.
AnswerB

The final state of the message, including why it stopped and the total tokens consumed, is determined only after generation is complete and is delivered as the final part of the server-sent event stream.

Why this answer

In a streaming implementation, the final usage statistics (input_tokens, output_tokens) and the stop_reason (such as end_turn or max_tokens) are only provided at the end of the stream. SDK helpers typically aggregate these into a final message object once the stream is closed.

Exam trap

Assuming usage data is sent in the initial stream header or updated incrementally with every text chunk.

220
MCQmedium

A user is interacting with a Claude-powered research tool. They provide a 200-page PDF and ask for a summary of the 'Methodology' section. Claude provides a summary, but the user notices the details seem to come from a different study. What is the best prompt engineering practice to fix this specific grounding issue?

A.Remove the system prompt to allow the model more 'creative freedom' in its summary.
B.Use XML tags to separate the document from instructions and put the question at the end.
C.Switch from Claude Sonnet 5.5 to Claude Haiku 5.5 for better document parsing.
D.Place the question at the beginning of the prompt before the document XML tags.
AnswerB

XML tags provide clear structural boundaries for Claude. Placing the question at the end ensures the model's 'attention' is focused on the specific task after having processed the source document.

Why this answer

Anthropic guidance suggests that for long documents, putting the document near the top of the prompt and placing the specific question or instruction at the very end helps the model focus. Using XML tags to clearly demarcate the document also helps the model distinguish between the 'source of truth' and the 'instructions,' reducing the chance of hallucinating details from its own training data.

Exam trap

Thinking that simply increasing the context window (e.g., to 1M tokens) solves all focus issues.

221
Multi-Selectmedium

A developer is integrating Claude 3.5 Sonnet into a medical imaging application. Which TWO capabilities of the Claude 3 family make it particularly suited for analyzing diagnostic reports alongside X-ray images?

Select 2 answers
A.Native Vision processing for images
B.Support for 1,000,000-token output
C.High-accuracy complex reasoning
D.Ability to browse the live internet
E.Recursive self-improvement loops
AnswersA, C

Claude 3 models can directly ingest and interpret visual data, such as JPEG or PNG files, allowing them to describe and analyze medical images. This allows the model to 'see' anomalies or patterns in X-rays, which can then be cross-referenced with the text-based diagnostic reports provided in the prompt. (52 words)

Why this answer

The Claude 3 family introduced native multimodal capabilities, allowing the models to process both text and visual data in a single request. This is essential for medical applications where a report must be compared against an image. Additionally, the improved reasoning capabilities ensure that the model can draw logical connections between the visual evidence and the textual descriptions. (69 words)

Exam trap

Candidates often select only one capability or focus on 'image generation,' failing to recognize that the requirement involves both 'Native Vision' (input) and 'Complex Reasoning' (analysis).

222
MCQmedium

An engineering team is implementing streaming to handle high-latency requests for a Claude-powered analytics dashboard. They are concerned about network instability causing partial streams. What is the recommended strategy for handling an interrupted streaming connection when using the Anthropic API?

A.Cache the partial response and append it to the next request.
B.Use the last received token to set a starting position for the retry.
C.Send an additional request containing only the missing text suffix.
D.Retry the full request with the original messages array.
AnswerD

Since the API is stateless, the only way to recover from a connection failure during streaming is to re-send the entire request. The application must treat the retry as a new request, ensuring the full context is provided so that the model can generate the complete response again.

Why this answer

The Anthropic API is stateless. If a streaming connection is interrupted, the client cannot simply resume from the point of failure. The best strategy is to capture the error, perform a retry with the exact same request parameters (including the full messages list), and process the new stream.

Since the API does not support partial resume, the application must be designed to handle the request as a fresh transaction, ensuring the state remains consistent with the original user intent.

Exam trap

Candidates might erroneously think they can 'resume' a stream by sending a partial message or a specific offset, which is not supported by the stateless API architecture.

223
MCQeasy

An application processes legal documents using Claude and has citations enabled. A user reports that the model provided a summary of a contract but failed to include any citations. What is the most likely reason for this behavior?

A.The document size exceeded the limit for generating citations.
B.The document blocks were not configured to enable citations in the API request.
C.The model was not instructed to use citations in the system prompt.
D.The model lacks sufficient reasoning capability to identify source material.
AnswerB

Citations are a feature tied to document blocks; if the application does not configure these blocks to return citation data, the model will not generate the required cited_text and location fields. This is a configuration-level requirement rather than a model capability that is always active by default for every document input.

Why this answer

Citations are an optional feature enabled on document blocks within the API request. If the application logic does not explicitly configure the document content block to support or request citations, Claude will provide a standard response without the structured citation metadata. The model does not automatically inject citations for every document processing task unless the API interaction is correctly structured to invoke this capability.

Ensuring the document block is correctly defined in the request is the primary step for surfacing cited text and location references.

Exam trap

Candidates often assume citations are an inherent model capability that triggers automatically whenever a document is provided in the message content, ignoring the need for specific configuration.

224
MCQmedium

A developer is building a system to categorize incoming scanned documents. They notice that the model occasionally fails to identify handwritten text on the scanned forms. What is the best strategy to improve the model's performance on these documents?

A.Use an external OCR tool to convert all handwritten text to machine-readable text before sending it to Claude.
B.Increase the `temperature` parameter to its maximum value to encourage the model to be more creative with its handwriting interpretations.
C.Convert the image to a lower resolution to speed up processing, which will help the model focus on the main text.
D.Provide clear instructions to the model to focus on identifying and transcribing the handwritten sections of the document.
AnswerD

Providing specific instructions to focus on handwritten sections helps the model allocate its attention correctly. Combined with the model's native vision capabilities, this allows it to interpret the nuances of handwriting and form layout much more effectively than if it were just given the document without explicit guidance on what to emphasize.

Why this answer

When dealing with scanned documents containing handwritten text, it is important to provide high-quality images and clear instructions in your prompt. You should ask the model to perform step-by-step reasoning or to specifically focus on the handwritten portions of the document. Additionally, ensure that your images are clear and not overly compressed.

Leveraging the model's ability to interpret visual data natively is better than attempting to use OCR before sending the data, as the model's vision capabilities are highly adept at interpreting document structure and handwriting.

Exam trap

Candidates often suggest using external OCR tools, which can strip away important visual context and structure that Claude can interpret natively.

225
MCQmedium

A researcher is using Claude Haiku 5.5 to process thousands of short feedback snippets. They notice that when the model is asked to summarize very short inputs, it sometimes provides unnecessarily long responses. What is the best way to control the output length while maintaining the efficiency of Haiku?

A.Disable adaptive thinking to stop the model from generating long-winded reasoning before the answer.
B.Set the max_tokens parameter to 10 to force the model to provide only a one-word label.
C.Switch to Claude Opus 5.5 because it is better at following instructions to be brief than Haiku.
D.Use structured outputs or clear formatting instructions to enforce the desired brevity.
AnswerD

Structured outputs are the preferred way to force a specific format, including length constraints. By defining a JSON schema or providing explicit instructions in the prompt, the developer ensures that the model produces exactly the type and length of response required, without the risk of truncation.

Why this answer

For tasks where the model's default reasoning leads to verbose outputs, the best approach is to use structured outputs or clear system-prompt instructions to dictate the desired format. Simply setting a tiny max_tokens limit is dangerous because if the thinking process consumes those tokens first, the answer will be truncated. By using structured outputs (e.g., JSON schema) or explicit instructions to be brief, the researcher can guide the model's behavior while keeping Haiku's efficiency.

Lowering the effort level can also reduce the overall reasoning verbosity.

Exam trap

Suggesting a tiny max_tokens limit (e.g., 5-10 tokens), which is a common mistake that causes truncated, unusable responses.

← PreviousPage 3 of 4 · 249 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Claude Model Fundamentals questions.

CCNA Claude Model Fundamentals Questions — Page 3 of 4 | Courseiva