Courseiva

CCNA Claude Model Fundamentals Questions

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

76
MCQeasy

A financial services startup is building a high-volume sentiment analysis tool to categorize incoming customer support tickets in real-time. The primary requirements are minimizing operational costs and ensuring the lowest possible latency for simple classification. Which Claude model is most appropriate for this use case?

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

This model is the fastest and most cost-effective tier in the current lineup. It is optimized specifically for high-volume tasks that require low latency, such as classification and simple data extraction, where the deep reasoning of higher tiers isn't required.

Why this answer

Claude Haiku 5.5 is specifically designed for high-volume, low-latency, and cost-sensitive tasks. Since sentiment analysis of support tickets is a relatively simple classification task, Haiku provides the necessary capability while optimizing for speed and budget, making it the superior choice over more powerful but slower models like Sonnet or Opus.

Exam trap

Choosing Claude Sonnet by default because it is the 'balanced' model, ignoring that Haiku is specifically optimized for simple, high-volume tasks.

77
Multi-Selecthard

Your company is transitioning from the Claude web interface to a custom application using the Anthropic API. Which THREE of the following are key differences you must account for regarding session management and state?

Select 3 answers
A.The application must implement its own persistence layer for user-specific state.
B.The API requires the client to manage the full conversation history in each request.
C.The API automatically maintains a user's persistent memory across different sessions.
D.File references must be explicitly passed in the message content for every request.
E.The API automatically synchronizes with Claude Code settings for every user.
AnswersA, B, D

Since the API is stateless and does not store user state, your application must provide the logic for saving and retrieving user-specific data. This persistence layer ensures that every request to the model can be correctly contextualized with the user's history, preferences, and relevant file information as needed.

Why this answer

When moving to the API, you lose the managed environment of the web interface. You must handle conversation history, as the API is stateless and does not retain previous turns. You must also handle file references manually, as the API does not automatically link previously uploaded files.

Finally, you must implement your own logic for session-wide preferences or memory, as there is no built-in persistent user state within the API itself. These are all client-side responsibilities.

Exam trap

Candidates often assume the API inherits the 'intelligence' and persistence of the web app, forgetting that the API is a low-level service requiring full client-side state management.

78
MCQmedium

An engineering team is designing a RAG system using Claude 3.5 Sonnet. They need to ensure the model focuses exclusively on the provided context without hallucinating external knowledge. Which architectural approach best ensures high adherence to provided context?

A.Increase the temperature setting to 1.0 to ensure maximum creativity.
B.Rely solely on the model's internal training weights for domain-specific queries.
C.Use XML tags to structure the input and define strict instructions in the system prompt.
D.Reduce the maximum token limit to prevent the model from generating long, incorrect answers.
AnswerC

XML tags provide clear delimiters that help Claude distinguish between instructions and context documents. Combining this structure with a system prompt that explicitly restricts the model to only use provided information forces the model to ignore its internal knowledge, effectively reducing hallucinations and increasing factual grounding in the retrieved data.

Why this answer

Grounding models in provided context requires clear instructions via system prompts and specific document delimiting. By using XML tags to isolate the context and providing explicit constraints in the system prompt, you define the boundaries of the model's knowledge. This architectural pattern is crucial for enterprise applications where accuracy is prioritized over creative generation, minimizing the risk of the model relying on its internal pre-training data.

Exam trap

Test-takers frequently choose general prompting techniques instead of leveraging specific structural delimiters like XML tags combined with strict system constraints for precise context grounding.

79
MCQmedium

When dealing with extremely large documents, what is the best strategy to maximize Claude's accuracy in information extraction?

A.Send the document in multiple separate API calls.
B.Use XML tags to delimit document sections and ask the model to reference those tags.
C.Force the model to summarize the document before extraction.
D.Increase the temperature to 2.0 to force creativity.
AnswerB

XML tags provide structure that helps the model navigate the context window. By labeling sections and instructing the model to look within specific tags, you significantly improve its ability to locate relevant information and produce accurate, grounded answers, which is especially effective for very long or dense input files.

Why this answer

The 'needle in a haystack' problem refers to finding a specific fact within a large volume of text. By utilizing strategic XML tagging to chunk the document and instructing the model to search within those specific tags, you guide its attention. This is a vital skill for enterprise document processing, where models must parse through hundreds of pages of documentation to identify critical, specific data points without getting overwhelmed.

Exam trap

Test-takers frequently rely on the model to scan huge documents without guidance, forgetting to use structural delimiters to direct attention.

80
MCQmedium

Your team is building a system that processes sensitive data and requires auditability of every model interaction. You are concerned that using a generic model name might mask which version of the model actually processed a specific request. What is the correct way to handle this?

A.Send a separate API call to the /v1/models endpoint after each request to verify the current model state.
B.Include the model ID in the 'metadata' field of the request to ensure it is logged by Anthropic.
C.Check the 'model' field in the JSON response returned by the API to verify the model used.
D.Use a custom header in your request to tag the model version for your own logging systems.
AnswerC

The API response explicitly includes the `model` field, which identifies the exact model version that processed the request. Logging this value in your own internal database provides a definitive, immutable record of which model version was responsible for that specific interaction.

Why this answer

The API return object for every message contains information about the request, and the `model` field is always available to confirm which model was used to generate the response. By logging the `model` identifier returned in the response metadata alongside your internal request IDs, you create a robust audit trail that links specific inputs to the exact model version used. This ensures that you can perform accurate root-cause analysis if a particular model version exhibits unexpected behavior, satisfying enterprise-grade requirements for transparency and system traceability.

Exam trap

Candidates often think they need to send the model ID in the metadata field to track it, rather than simply reading the response object.

81
MCQeasy

What does the 'Temperature' parameter control when configuring a request to a Claude model?

A.The speed at which the model processes the input.
B.The probability distribution of the next token selection.
C.The maximum number of tokens the model can generate.
D.The number of concurrent requests allowed.
AnswerB

Temperature modulates the probability distribution of the next token. By scaling the logits before the softmax operation, it flattens or sharpens the distribution. This directly impacts the randomness of the model's output, allowing users to move between highly predictable, logical responses and more diverse, creative generation styles.

Why this answer

Temperature is a hyperparameter that controls the randomness or 'creativity' of the model's output. A lower temperature leads to more deterministic and focused responses, while a higher temperature increases the probability of selecting less likely tokens, resulting in more varied and creative text. This setting is crucial for tuning the model behavior for specific use cases, such as coding (lower) versus creative writing (higher).

Exam trap

Candidates often confuse temperature with token length limits or repetition penalties, failing to recognize its role in probability distributions.

82
MCQeasy

An analytics firm is migrating from an automated rule-based regex pipeline to Claude Haiku 5.5 for extracting sentiment and intent from customer feedback. Which capability represents a distinct strength of using an LLM over traditional regex matching?

A.Storing and caching user profiles indefinitely in API memory across completely separate stateless calls.
B.Providing zero-latency pattern matching with strictly identical output strings across consecutive API executions.
C.Guaranteeing fixed zero-cost computation regardless of input message volume or feedback text length.
D.Interpreting nuanced context, informal phrasing, and varied grammatical structures without hand-crafted syntactic rules.
AnswerD

LLMs excel at natural language understanding because they interpret semantics, colloquialisms, and context rather than matching exact character sequences. This enables Claude Haiku 5.5 to capture sentiment and intent across highly diverse customer phrasing without engineers maintaining brittle regex rule sets.

Why this answer

A major strength of modern LLMs compared to rigid, rule-based systems like regular expressions is semantic understanding and linguistic generalization. While regex requires explicit syntactic patterns and breaks when users use slang, misspellings, sarcasm, or varied sentence structures, Claude Haiku 5.5 can interpret context, infer conversational tone, and accurately classify sentiment across messy, unstructured natural language without requiring brittle, hand-crafted syntactic rules.

Exam trap

Confusing exact pattern matching efficiency with broad semantic interpretation and language understanding capabilities.

83
MCQhard

A developer is building a customer support chatbot using Claude. The chatbot must remember details from earlier in the conversation, such as the customer's order number and issue, to provide coherent responses. The conversation can last for many turns. Which implementation strategy best ensures Claude maintains context without exceeding token limits?

A.Summarize the conversation periodically and include the summary plus recent messages in subsequent requests.
B.Send the entire conversation history with each request, including all previous messages, to preserve full context.
C.Store the conversation in a vector database and retrieve relevant past messages based on the current query.
D.Rely on Claude's built-in memory feature to automatically remember previous interactions across sessions.
AnswerA

Summarizing older parts of the conversation condenses essential information into a compact form, reducing token usage while retaining context. Recent messages are kept verbatim for immediate coherence. This approach scales to long conversations and is a recommended pattern for managing context in Claude applications, balancing detail and efficiency.

Why this answer

Periodically summarizing the conversation and including the summary with recent messages keeps essential context within token limits. This method preserves coherence over many turns without unbounded growth. It is a standard pattern for long-running conversations in the Anthropic Messages API, ensuring Claude has the necessary background to respond appropriately.

Exam trap

The trap here is assuming Claude has persistent memory across API calls, when in fact each request must include all necessary context explicitly.

84
MCQmedium

When fine-tuning or optimizing prompts for Claude, what is the impact of excessive 'System Prompt' length?

A.It improves the model's ability to ignore user inputs.
B.It can lead to 'prompt drift' where the model loses focus on core instructions.
C.It causes the model to generate responses significantly faster.
D.It forces the model to use more creative, less deterministic tokens.
AnswerB

Extremely long system prompts can lead to a decrease in the model's ability to adhere to core constraints. As the length increases, the model may weigh instructions unevenly or lose track of critical directives, resulting in less consistent behavior and potentially lower quality responses compared to a concise, optimized prompt.

Why this answer

While Claude supports large context windows, excessively long system prompts can lead to dilution of focus, where the model may prioritize specific instructions over others or become less sensitive to the user's immediate input. Maintaining concise, high-impact system prompts is a best practice in AI engineering. It ensures the model remains responsive and accurate, reducing the noise-to-signal ratio and preventing degradation in instruction-following performance over time.

Exam trap

Candidates often assume that because models have large context windows, adding more instructions to the system prompt is always better, ignoring the risk of focus dilution and prompt drift.

85
MCQmedium

An application is designed to summarize long technical documents using Claude Sonnet 5.5. The team notices that when they increase the 'effort' parameter to its maximum level, the API response times increase significantly. What is the primary technical reason for this latency increase?

A.Higher effort increases the number of internal reasoning steps performed by the model, which adds to the generation time.
B.The API performs additional validation checks on the document content when effort is set to maximum.
C.The API automatically triggers a secondary model to review the output when effort is set to maximum.
D.The API forces a synchronous wait for all cached document parts to be re-indexed before the response begins.
AnswerA

Adaptive thinking requires the model to spend more time deliberating on complex tasks when effort is increased, and these internal processing steps are included in the generation time and the total token count of the final response.

Why this answer

Increasing the effort parameter instructs the model to perform more extensive adaptive thinking before generating an output. Since thinking tokens are processed as part of the model's generation process and count toward the total token budget, a higher effort level forces the model to perform more internal reasoning steps. This extra computation time is reflected in the increased latency of the API response, as the model must complete its internal deliberation before finalizing the response text that is returned to the user.

Exam trap

Assuming that higher effort only impacts token costs, or that latency is caused solely by the length of the final output, ignoring the underlying thinking process.

86
MCQmedium

An engineer is implementing a streaming client for a Python application. They notice that the SDK helper returns the final message object after the stream completes. Why is it still recommended to use the streaming API for long responses?

A.Streaming prevents HTTP connection timeouts by providing incremental updates that keep the network socket active throughout the generation process.
B.Streaming is required to enable the use of thinking blocks in the Claude Sonnet 5.5 model family.
C.Streaming allows the SDK to automatically retry requests if the model stops generating midway through a long response.
D.Streaming increases the maximum output token limit of the model, allowing for longer responses than would be possible with a standard non-streaming request.
AnswerA

Long-running requests for large amounts of content can easily exceed server-side or load-balancer timeout thresholds; streaming ensures that the server periodically sends data packets, keeping the connection alive until the full response is completed and the final message object is returned.

Why this answer

Even though the SDK helper provides a convenient way to retrieve the final accumulated message object, using the streaming API is critical for long responses to prevent HTTP timeouts. By consuming the stream as it arrives, the client maintains an active connection and demonstrates progress to the end-user. If the client waits for the entire generation to complete before receiving any data, the underlying network connection may time out due to inactivity, causing the request to fail prematurely despite the model successfully generating the requested tokens.

Exam trap

Overlooking the difference between the SDK's abstraction and the underlying network requirements for long-running operations.

87
MCQeasy

Your organization is scaling its use of the Claude API across multiple departments. You need to ensure that you can accurately attribute API usage costs to specific teams and workspaces. Which feature should you use to accomplish this?

A.Include a custom header in the API request that identifies the team, which will be reflected in the usage reports.
B.Assign separate workspaces to each team and use the API keys associated with those workspaces for all requests.
C.Use prompt caching to differentiate requests, as the cache usage will be reported separately for each team's cache.
D.Use the metadata field in the Messages API to tag each request with a team-specific identifier.
AnswerB

Workspaces are the correct way to isolate API usage, spend, and reporting. By giving each team a separate workspace, you can easily track their consumption and attribute costs accurately through the Admin API and usage reports. This is the intended administrative pattern for scaling Claude API usage within an organization.

Why this answer

The Claude API provides a clear mechanism for managing usage and costs through workspaces. By creating separate workspaces for different teams, you assign them their own unique API keys and isolate their usage and spend reporting. The metadata field, while available in the Messages API, is intended for opaque end-user identifiers (user_id) for abuse detection and is not a valid mechanism for cost attribution or team-based tagging.

Using workspaces is the standard administrative practice for governing multi-tenant API deployments within a single organization.

Exam trap

Candidates often incorrectly identify the 'metadata' field as a way to tag requests for internal cost-attribution, which is explicitly incorrect according to the API documentation.

88
MCQeasy

You are writing a script to inventory the models available to your organization using the `GET /v1/models` endpoint. You notice that the list changes when a new model is released. How does this affect your production applications that are hardcoded to use specific model IDs?

A.There is no impact, as your production applications continue to use the hardcoded IDs.
B.You must update your application configuration every time the Models API list changes.
C.Your production applications will automatically switch to the new model to take advantage of improvements.
D.The API will return a 404 error until you update your application to include the new model.
AnswerA

Hardcoding model IDs ensures that your application is decoupled from the list of models returned by the Models API. The list returned by the API is for administrative and discovery purposes, and changes to that list do not affect the routing of requests that use a valid, hardcoded model ID.

Why this answer

Hardcoded model IDs provide a stable contract between your application and the Anthropic API. When new models are released, they are added to the list returned by the Models API, but your existing hardcoded model IDs remain valid and functional. Your production applications will continue to use the specific model you have configured, completely unaffected by the addition of new models to the organization's available list.

Exam trap

Candidates often fear that the appearance of new models in the API list somehow 'invalidates' or 'overrides' their existing, hardcoded model references.

89
MCQhard

Your application sends a large set of tool definitions and a long system prompt, and you have enabled prompt caching for this prefix. If you add a new optional tool to the middle of your tool list, what is the impact on your prompt cache usage?

A.The cache remains valid because the API intelligently recognizes the addition of an optional tool as a non-breaking change.
B.The cache is unaffected because tool definitions are stored separately from the prompt messages and are not subject to standard cache invalidation.
C.Only the new tool definition incurs a cache creation charge, while the rest of the existing tools remain cached.
D.The cache for the tool definitions is invalidated, and you will incur a new cache creation charge for the modified prefix.
AnswerD

Prompt caching requires an exact match of the prefix. Inserting a tool into the middle of the list modifies the sequence, which breaks the cache match. Consequently, the API must re-process and re-store the entire updated tool list, resulting in a cache creation event.

Why this answer

Prompt caching works on a prefix match basis. Because the tool definitions are part of the cached prefix, changing the order or composition of the tools invalidates the cache for that segment and everything that follows it. By inserting a tool in the middle of the existing list, you alter the prefix, forcing the system to re-cache the entire sequence of tools and any subsequent system or message content, leading to a new cache creation charge.

Exam trap

Candidates often think caching is smart enough to handle insertions or reordering without invalidating the cache, but the API requires an exact prefix match.

90
MCQmedium

A company is building an 'Agentic Workflow' where Claude needs to autonomously browse a large codebase, run tests, and fix bugs over several hours. Which model tier is best suited for this long-horizon agentic work at an enterprise scale?

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

Sonnet 5.5 is the recommended model for everyday coding and agent work at scale. It provides the necessary reasoning capabilities for multi-step workflows while offering a better balance of speed and cost than the higher tiers, making it ideal for continuous enterprise agent operations.

Why this answer

Claude Sonnet 5.5 is explicitly identified as the tier that balances speed, capability, and cost, making it the primary choice for everyday coding and large-scale agentic work. While Opus or Fable have higher reasoning ceilings, Sonnet 5.5 is optimized for the iterative nature of agent loops (gathering context, taking action, verifying) at a scale that remains economically viable for enterprise-wide deployment in software development lifecycles.

Exam trap

Selecting Opus because agents sound 'complex', ignoring the 'scale' and 'everyday coding' guidance for Sonnet.

91
Multi-Selecthard

A developer is building an application that uses the Anthropic Messages API with Claude 3.5 Sonnet to generate structured JSON output for a data pipeline. They need to ensure the output is valid JSON and conforms to a specific schema. Which TWO strategies should they use to maximize reliability? (Choose two.)

Select 2 answers
A.Set the temperature to 1.0 to encourage Claude to explore different JSON structures and pick the most valid one.
B.Include a clear instruction in the system prompt that the response must be valid JSON matching the provided schema, and provide the schema in the prompt.
C.Increase the max_tokens to the maximum allowed so Claude has enough space to include all schema fields.
D.Use a prefill technique by starting the assistant's response with an opening brace '{' to guide Claude into generating JSON.
E.Use a stop sequence of '}' to ensure Claude stops immediately after closing the JSON object.
AnswersB, D

Explicitly instructing Claude in the system prompt to output valid JSON and providing the schema gives the model a precise target. Claude is trained to follow detailed formatting instructions, so this significantly increases the likelihood of schema-conformant output. It is a fundamental step in structured generation with the Messages API, and it works alongside other techniques like validation and retries.

Why this answer

To maximize reliability for JSON output with Claude 3.5 Sonnet, combine explicit schema instructions in the system prompt with the prefill technique of starting the assistant response with an opening brace. These two strategies directly guide the model toward valid, schema-conformant JSON. Other parameters like temperature, max_tokens, and stop sequences do not enforce structure and may even harm output validity.

Exam trap

The trap here is assuming that a stop sequence on a closing brace guarantees complete JSON, when braces can appear in nested structures and cause premature truncation.

92
MCQmedium

Your company uses the Claude web application for brainstorming and the Claude API for its production customer-support chatbot. A developer suggests using the web application's 'Projects' feature to organize the chatbot's system prompts. Why is this not a viable strategy for the production chatbot?

A.The web application's Projects do not support the advanced system prompt parameters required by the API.
B.The web application's Projects feature is deprecated and will be removed in the next release.
C.Using web-based projects introduces latency that would degrade the chatbot's performance.
D.The API does not have access to the web application's 'Projects' or their internal prompt storage.
AnswerD

The API is a distinct platform from the web application. Features like 'Projects' exist solely within the web UI for human users. There is no technical bridge or endpoint that allows an API request to retrieve instructions or prompts stored within the web interface, making them unusable for a chatbot.

Why this answer

The 'Projects' feature in the Claude web application is designed specifically for human users to organize their brainstorming and collaborative work. It is not an API-accessible feature and cannot be used to manage or deploy system prompts for a production chatbot. The API requires that system instructions and prompts be managed through your own application code, ensuring they are versioned, deployed, and updated as part of your software release process, rather than relying on a proprietary web-based interface.

Exam trap

Candidates often conflate the convenience of the web UI's project management features with the necessary programmatic requirements of an API-driven application.

93
Multi-Selecthard

A software team is optimizing a RAG (Retrieval-Augmented Generation) system using Claude Sonnet 5.5. They want to use citations to improve grounding but are concerned about latency. Which THREE actions would help manage latency or efficiency when using citations with large documents?

Select 3 answers
A.Use prompt caching for documents that are queried multiple times.
B.Disable the 'system' prompt to prioritize citation processing speed.
C.Implement streaming to display citations and text to the user in real-time.
D.Lower the 'effort' setting to reduce the depth of adaptive thinking.
E.Switch to 'claude-fable-5-1' to take advantage of its faster citation engine.
AnswersA, C, D

While citations don't change the input cost, prompt caching allows the model to skip the heavy lifting of re-processing a large document's tokens on subsequent requests. This significantly reduces the time-to-first-token, making the overall interaction feel much faster for the end user.

Why this answer

Latency in the Messages API is influenced by the amount of generation (output tokens) and the time to process input. Citations increase output tokens, which increases latency. Using streaming allows the UI to display parts of the answer and citations as they are generated, improving perceived latency.

Prompt caching reduces the time spent processing large documents that are reused across multiple queries. Finally, lowering the 'effort' level can speed up the model's processing time, though it may slightly impact the depth of reasoning used to find those citations.

Exam trap

Thinking that citations themselves reduce latency (they actually increase it by adding more output tokens).

94
Multi-Selecthard

An architect is evaluating the default configurations for the Claude 5.5 model family. Which TWO statements accurately describe the default 'effort' levels and thinking behaviors of these models?

Select 2 answers
A.Haiku 5.5 does not support adaptive thinking due to its speed focus.
B.Claude Sonnet 5.5 defaults to high effort.
C.Claude Opus 5.5 and Haiku 5.5 default to medium effort.
D.Thinking is disabled by default and must be enabled via the API.
E.All models in the 5.5 family default to the same effort level.
AnswersB, C

Sonnet 5.5 is unique in the family as it defaults to the 'high' effort setting. This ensures that its balanced capability is backed by a higher baseline of thinking depth for the everyday coding and agentic tasks it is typically used for in production.

Why this answer

All current Claude 5.5 models (Opus, Sonnet, and Haiku) use adaptive thinking by default, meaning the model decides when and how much to think based on the prompt. However, their default effort levels—which control the depth of this thinking—differ. Sonnet 5.5 defaults to 'high' effort, while both Opus 5.5 and Haiku 5.5 default to 'medium' effort.

This means that for Sonnet, 'high' is the baseline, whereas for Opus and Haiku, 'high' would be an increase over the default setting.

Exam trap

Assuming all models have the same default effort level or that thinking must be manually enabled.

95
MCQmedium

A developer is building a high-volume document classification pipeline using Claude Haiku 5.5. To manage operational costs, they want to understand how the choice of model parameters and request structure will impact their bill. According to the platform fundamentals, which factor represents a primary driver of cost within a single API request?

A.The total number of tool definitions provided in the tools parameter.
B.The wall-clock time the model takes to generate a complete response.
C.The number of distinct user and assistant turns in the message history.
D.The combined volume of input tokens and output tokens processed.
AnswerD

The Messages API calculates costs based on the number of input tokens sent (including system prompts and history) and the number of output tokens generated by the model. This is the standard metric for usage-based billing.

Why this answer

Cost in the Claude API is primarily driven by token usage, categorized into input tokens (the prompt and context sent to the model) and output tokens (the model's generated response). While prompt caching can reduce costs for repeated prefixes, the fundamental billing units for any standard request are the total volume of tokens processed and generated.

Exam trap

Misidentifying the number of tool definitions or the duration of the HTTP connection as the primary cost driver.

96
MCQmedium

Your application uses Claude Sonnet 5.5 for generating structured JSON reports. You notice that occasionally the JSON is incomplete because the model hits the max_tokens limit. Why is 'prefilling' the assistant message not a viable strategy to handle this?

A.The API strictly requires the assistant message to be empty at the start of a turn, and providing content causes a syntax error.
B.Prefilling forces the model to use 'low' effort, which degrades the quality of the structured JSON output.
C.Assistant-message prefilling is not supported on current models, and attempting it will return a 400 error.
D.JSON schema validation requires the model to generate the entire document from scratch, and prefilling breaks the validation logic.
AnswerC

The Messages API does not support prefilling the assistant message with partial text. If you include an assistant message in your request that contains partial text to be completed, the API will reject the request with a 400 error, as the assistant message must be generated by the model itself.

Why this answer

Current Claude models do not support assistant-message prefill, meaning ending the messages list with a partial assistant turn for the model to complete. Such a request returns a 400 error, so a truncated JSON report cannot be continued by sending the partial output back. The right fixes are to raise max_tokens (streaming large values), ask for shorter output, and use structured outputs to enforce the JSON schema.

Exam trap

Developers often confuse API capabilities with legacy chat interfaces or other LLM providers that allow prefilling to guide the start of a response.

97
MCQhard

A user is experiencing 'Model Refusal' when processing a document that contains sensitive (but safe) medical information. What is the most likely cause?

A.The document is too long for the context window.
B.The model's safety guardrails are misinterpreting the intent due to sensitive keywords.
C.The model has reached its internal limit for medical-related queries.
D.The API key has expired, triggering a default security lockdown.
AnswerB

Safety filters often trigger on high-risk topics like medical data. If the prompt does not clearly state the benign intent, the model may default to a refusal to avoid providing potentially harmful advice. Adding context that emphasizes the professional or research-based nature of the request often resolves this issue.

Why this answer

Claude has built-in safety guardrails designed to prevent the generation of harmful content. Sometimes these filters can trigger on sensitive topics even when the user's intent is benign. This is known as a false positive.

Recognizing this behavior is critical for developers to adjust their prompts to provide more clear, benign context, which helps the model's safety systems distinguish between dangerous content and legitimate, safe professional use cases.

Exam trap

Candidates often assume safe medical or legal texts will never trigger refusals, misinterpreting false positives as true safety violations.

98
MCQhard

A machine learning engineer is comparing Claude 3 Opus and Claude 3.5 Sonnet for a complex mathematical reasoning task. The task involves multi-step proofs and requires the highest possible accuracy. Cost is not a primary concern. Which statement accurately describes the trade-off between these models for this use case?

A.Claude 3.5 Sonnet is strictly more capable than Claude 3 Opus in all reasoning tasks.
B.Claude 3.5 Sonnet is always faster and more accurate than Claude 3 Opus, making it the best choice regardless of task complexity.
C.Both models have identical reasoning capabilities, so the choice should be based solely on cost.
D.Claude 3 Opus is designed for the most complex reasoning tasks and generally offers higher accuracy than Claude 3.5 Sonnet on such tasks, though at higher cost and latency.
AnswerD

Claude 3 Opus is the most powerful model in the Claude 3 family, intended for highly complex reasoning where accuracy is paramount. While Claude 3.5 Sonnet is faster and more cost-effective, Opus typically provides superior performance on the most challenging reasoning tasks. Given that cost is not a concern and accuracy is critical, Opus is the appropriate choice.

Why this answer

For a complex mathematical reasoning task where accuracy is paramount and cost is not a concern, Claude 3 Opus is the best choice. It is the most capable model in the Claude 3 family, designed for the most demanding reasoning tasks, and generally provides higher accuracy than Claude 3.5 Sonnet, albeit with higher cost and latency.

Exam trap

The trap here is assuming that the newest model (Claude 3.5 Sonnet) is always superior in every aspect, overlooking that Opus remains the top-tier model for the most complex reasoning.

99
MCQmedium

A healthcare provider wants to use Claude to summarize patient-doctor conversations. They are concerned about the model 'hallucinating' or making up medical facts. Which Claude 3 feature or design principle directly addresses this concern by ensuring the model is honest and admits when it doesn't know an answer?

A.Increased Context Window
B.Vision Support
C.Constitutional AI Training
D.High Tokens-Per-Second
AnswerC

Claude is trained using Constitutional AI, which includes principles that reward the model for being honest and harmless. This training process specifically targets the reduction of hallucinations by teaching the model to prioritize accuracy and to admit uncertainty rather than providing a false but confident-sounding answer.

Why this answer

Anthropic uses Constitutional AI and specific training techniques to ensure that Claude models are not just helpful but also honest. This reduces the frequency of hallucinations and encourages the model to be 'calibrated,' meaning it expresses uncertainty when it is not confident in its answer.

Exam trap

Candidates often confuse 'Constitutional AI' with 'Model Fine-tuning' or 'Data Masking,' missing that the honesty and uncertainty expression is a direct outcome of the Constitutional AI training process.

100
MCQhard

A researcher is using Claude to summarize a series of technical papers. They notice that sometimes the model provides a citation, but the cited_text block is quite long. Does the model perform any paraphrasing on this cited content?

A.Yes, but only if the document is longer than 10,000 tokens.
B.No, the model only provides the location of the citation, not the text itself.
C.Yes, the model paraphrases the text to match the tone of the response.
D.No, the cited_text is an exact extraction from the source document.
AnswerD

The cited_text returned in the citation block is an exact extraction from the source document provided. This ensures that the citation serves as a reliable, verifiable reference point for the user, as it represents the original source text without any modification or summarization by the model.

Why this answer

When citations are enabled, the cited_text returned in the citation block is extracted directly from the provided source document. The model does not paraphrase or summarize the cited text; it provides a direct, verifiable excerpt. This is a critical design feature that ensures the citation can be used as an objective check against the source document.

If a developer needs a paraphrased summary, they must request it in the response content, but the citation mechanism itself remains a faithful, literal reproduction of the source segment.

Exam trap

Developers often assume the model 'rewrites' or 'summarizes' the cited text to fit the context, which is incorrect.

101
MCQmedium

An automated workflow makes calls to the Claude Messages API and checks the `stop_reason` field of each API response. During standard operation, a response returns with a `stop_reason` of `stop_sequence`. What does this specific `stop_reason` value indicate about the response execution?

A.The response was stopped prematurely because the model reached the configured `max_tokens` ceiling.
B.The model encountered one of the custom string patterns specified in the request's `stop_sequences` array.
C.The request was intercepted and halted mid-generation by an automated safety filter.
D.The model naturally finished its turn and reached a natural conversational stopping point.
AnswerB

The API sets `stop_reason` to `stop_sequence` exclusively when model generation triggers a string provided in the `stop_sequences` parameter. This allows client applications to parse and process custom delimiter-based stopping conditions reliably.

Why this answer

In the Claude Messages API, a `stop_reason` of `stop_sequence` indicates that the model's generation reached one of the custom string patterns supplied in the optional `stop_sequences` request parameter. When Claude encounters a specified custom stop sequence, it immediately ceases generation and excludes the sequence itself (or truncates at that boundary) while setting `stop_reason` to `stop_sequence`. This differs from `end_turn`, which signifies standard natural completion, and `max_tokens`, which signals token limit cut-offs.

Exam trap

Confusing `stop_sequence` with `end_turn` or assuming `stop_sequence` indicates an unexpected API error or refusal.

102
MCQmedium

An application uses Claude Sonnet 5.5 to summarize extremely long legal transcripts. To avoid hitting the 1M-token context limit during a multi-turn conversation about these transcripts, the developer wants to use the 'compaction' feature. How should the application handle the model's response when compaction occurs?

A.The client should replace the entire previous history with a single user message containing the summary.
B.The developer must manually trigger a '/compact' command via the Messages API to generate the blocks.
C.The client must discard the compaction blocks and only store the final text response to save space.
D.The response content, including any compaction blocks, must be appended to the history unchanged.
AnswerD

Compaction is a server-side process that summarizes context when nearing thresholds. To continue the conversation effectively, the client must include the resulting compaction blocks in the subsequent 'messages' array sent to the API.

Why this answer

When the server-side compaction feature is triggered, the model returns a response that includes compaction blocks (summaries of earlier context). For the conversation to remain coherent and for the server to recognize the state in the next turn, the client must append these compaction blocks back into the message history unchanged.

Exam trap

Thinking the client should manually summarize the text instead of using the provided compaction blocks.

103
Multi-Selectmedium

A business is processing a backlog of 100,000 archived documents to extract structured data. The task is not time-sensitive, but the company wants to minimize costs and maximize throughput. Which TWO strategies should they use to manage the trade-off between latency and cost?

Select 2 answers
A.Use Claude Haiku 5.5
B.Use the Message Batches API
C.Set output_config.effort to 'max'
D.Set stream: true in the request
E.Use Claude Fable 5.1
AnswersA, B

Haiku is the fastest and most affordable model tier, making it the standard choice for large-scale data extraction tasks where cost-per-token is a primary concern and the task complexity is moderate.

Why this answer

For non-latency-sensitive bulk work, the Message Batches API offers a 50% cost reduction. Additionally, Claude Haiku 5.5 is the most efficient and cost-effective model for extraction tasks, making it the ideal choice for processing large volumes of structured data where high-level reasoning is not required.

Exam trap

Selecting 'streaming' as a cost-saving measure when it is actually a tool for perceived latency.

104
MCQeasy

Your application allows users to upload PDF contracts, and you have enabled citations to help users verify the model's claims. If a user asks a question about a specific clause and the model provides a citation, what does this guarantee regarding the source of the cited text?

A.The citation ID can be used to track the source document across multiple subsequent conversation turns.
B.Citations ensure that the model has verified the document's authenticity against a database.
C.The cited text is guaranteed to be a verbatim excerpt from the document provided in the request.
D.The model performs an external search of the user's uploaded library to verify the citation.
AnswerC

The citation feature is designed to ground the model's response by extracting specific snippets directly from the source document. When the model provides a citation, it confirms the information was found within the provided document block during that specific request processing cycle.

Why this answer

When citations are enabled for document blocks, the model is designed to ground its answer in the provided source material. The `cited_text` returned is extracted directly from the supplied document. It is important to note that these citations do not have persistent IDs across different API turns.

The guarantee provided is that the information was retrieved from the content of the document block provided in that specific request, ensuring the answer is tied to the provided context rather than the model's internal training data.

Exam trap

Candidates often confuse citations with persistent document referencing, assuming IDs exist that can be tracked across multiple conversation turns.

105
MCQmedium

Your team is debugging a system where Claude occasionally refuses to answer a request. The API response contains a 'refusal' stop_reason. How should you handle this scenario?

A.Analyze the stop_details provided in the response to understand the nature of the safety violation.
B.Automatically retry the request with the same parameters until the model stops refusing.
C.Bypass the safety filter by including a hidden system instruction that tells the model to ignore safety rules.
D.Convert the refusal into a standard 'end_turn' response by stripping the refusal flag in your application code.
AnswerA

Reviewing the stop_details is the correct way to handle a refusal. It provides insight into the specific safety category that caused the model to stop, allowing developers to make informed decisions about whether to modify their prompts, update their safety filters, or accept that the request is outside of allowed usage.

Why this answer

A 'refusal' stop reason indicates that Anthropic's safety classifiers have triggered, preventing the model from generating content due to safety policy violations. When this occurs, the model will not provide an answer. Applications should check the stop_details field within the response to identify the category of the refusal.

It is important to note that these refusals are not based on your specific business rules, but rather on global safety standards. You should log the refusal category for auditing purposes and potentially adjust your system instructions if the refusal appears to be a false positive for your specific use case.

Exam trap

Candidates often assume that 'refusal' means the model failed to follow instructions, leading them to try and 'fix' the prompt by being more demanding, which rarely works for safety-related triggers.

106
MCQeasy

A team is designing a dashboard that displays the status of ongoing Claude API requests. They want to show a 'Processing' indicator while the model is thinking but before any text is returned. How can they achieve this with streaming?

A.Poll the /v1/models endpoint to check if the model is currently busy before initiating the streaming request.
B.Wait for the message_stop event, which indicates that the model is currently in the thinking phase and has not yet produced output.
C.Send a separate HEAD request to the API to confirm the server is responsive before opening the streaming connection.
D.Monitor the stream for the message_start event, which confirms the request has been received and the model has begun its processing cycle.
AnswerD

The message_start event is the initial packet sent by the API; receiving this event is the definitive signal that the request was successful and that the model is actively working on the response, making it the perfect trigger for a 'Processing' status update.

Why this answer

When streaming is enabled, the API sends a message_start event immediately upon receiving the request. By listening for this event, the application can confirm the request is being processed. If the model is using adaptive thinking, there might be a delay before the first text block is generated.

The application can display a 'Thinking' or 'Processing' status as soon as the stream starts and maintain it until the first content_block_delta event containing text is received, providing a responsive experience to the end-user.

Exam trap

Assuming the stream is empty until the first text token is generated.

107
MCQeasy

Your application uses the Models API to dynamically retrieve information about available models. Which of the following details will you find returned by the API for a specific model ID?

A.The maximum input token limit, maximum output token limit, and supported model capabilities.
B.The recommended temperature and top_p sampling parameters for the model's default configuration.
C.A list of all previous versions of the model and their respective retirement dates.
D.The current cost per one million input tokens and the estimated latency for the model.
AnswerA

The API response reliably provides the architectural limits for input and output tokens alongside a list of capabilities, allowing the application to validate request payloads before sending them to the Messages API for processing, ensuring compliance with the model's specific constraints and preventing unnecessary errors during execution.

Why this answer

The Models API, specifically the GET /v1/models/{id} endpoint, is designed to provide metadata about a model's capabilities and constraints. It returns the maximum input token capacity (max_input_tokens) and the maximum output token limit (max_tokens) for that specific model. This allows developers to programmatically adjust their application logic to fit within the model's architectural boundaries without hardcoding these values.

It does not provide pricing information or historical performance metrics, as those are managed through other administrative channels.

Exam trap

Assuming the Models API returns dynamic pricing or real-time cost-per-token data, which is not provided by the API.

108
MCQhard

A data engineering team is using the Claude API to process a large dataset of historical logs. They notice that their usage report shows high counts for `cache_creation_input_tokens`. What does this indicate about their implementation?

A.The system is processing requests that are too short to be cached, so the API is defaulting to standard input token billing.
B.The prefix of the requests is changing too frequently, causing the system to write new cache entries instead of reusing existing ones.
C.The team has reached the maximum number of allowed cache breakpoints and is now being charged for additional creation cycles.
D.The system is successfully hitting the cache for most requests, which is why the creation tokens are appearing in the usage report.
AnswerB

A high volume of cache creation tokens indicates that the prefix of the API request is constantly changing. Because prompt caching requires an exact match, these changes force the API to write new data to the cache, resulting in higher costs than if the system were successfully hitting existing cache entries.

Why this answer

High `cache_creation_input_tokens` indicate that the system is frequently writing new data to the cache rather than reading from an existing one. This usually happens when the prefix of the request is constantly changing, preventing the model from matching an existing cached state. To optimize costs, the team should identify which parts of their prefix are dynamic and move them to the end of the prompt, ensuring the core, reusable parts of the prompt are cached effectively.

Exam trap

Candidates often mistake high creation tokens for a sign of efficient caching, when in reality it signals that the cache is being constantly overwritten or missed.

109
MCQmedium

A developer is building a high-stakes financial analysis platform. To ensure auditability and consistent model behavior during quarterly report reviews, they want to pin their application to the specific Opus 5.5 model version. If the developer discovers that a newer model version has been released, what action should they take regarding their model ID configuration?

A.Remove the model ID from the configuration to allow the API to default to the most recent version.
B.Update the model ID to the newer version immediately to benefit from performance improvements.
C.Keep the model ID set to 'claude-opus-5-5' until the new model has been fully tested and validated.
D.Switch to a generic model alias to ensure the system is always running the latest available version.
AnswerC

Maintaining the current, validated model ID ensures that your application continues to behave as expected. By not automatically switching to a newer version, you protect your production environment from unexpected changes in output style or reasoning logic until you have completed your own rigorous evaluation and quality assurance verification process.

Why this answer

In a production environment where model behavior must be strictly controlled, you should explicitly keep your model ID set to the specific version you have tested and validated. When a new model version is released, you should not automatically update your configuration. Instead, you must conduct a thorough evaluation of the new model, re-run your existing test sets, and only update the model ID in your codebase after you have confirmed that the new model meets your quality and safety requirements.

Exam trap

Candidates often assume that 'latest' or automatic updates are standard practices, ignoring the risk of breaking regression tests or changing output styles in production.

110
MCQmedium

When evaluating your prompt's susceptibility to hallucinations, you plan to use an 'LLM judge' approach. What is the most important element to include in your evaluation test set?

A.A set of extremely long documents to test the model's context window limits.
B.A set of questions that require the model to use its own training data.
C.A set of questions that are guaranteed to have answers in the source documents.
D.A set of questions that have no answer in the provided source documents.
AnswerD

Including questions that cannot be answered by the source material is the only way to measure if the model adheres to its instructions to avoid hallucination. This tests the model's honesty and its ability to respect the bounds of the provided context.

Why this answer

An effective evaluation set must include 'trick' cases where the answer is not present in the provided context. If the test set only contains questions with answers in the context, you cannot measure the model's tendency to hallucinate when it should say 'I don't know'. Including these negative test cases is essential for robust evaluation.

Exam trap

Creating evaluation sets that only contain positive examples where the answer is known and present in the source.

111
MCQhard

You are auditing the token usage of an application that uses the Message Batches API for non-latency-sensitive document classification. You notice that some requests in the batch are failing. How should you handle these failures to ensure all documents are processed successfully?

A.Identify the requests that failed or expired in the batch results and resubmit only those specific requests.
B.Automatically re-submit the entire original batch file to the API to ensure all requests are attempted again.
C.Wait for the 24-hour expiration period to pass, which will trigger an automatic retry of all failed requests.
D.Increase the `max_tokens` for the entire batch to ensure that failures caused by truncation are avoided in the next run.
AnswerA

The correct way to handle failures in the Message Batches API is to inspect the results for each `custom_id`, identify the failed ones, and create a new, smaller batch containing only those specific requests for processing.

Why this answer

When using the Message Batches API, the results are returned as a collection where each individual request is marked as succeeded, errored, canceled, or expired. Because each request is independent, you should inspect the results to identify which specific requests failed and then resubmit only those failed requests. This is the standard operational pattern for batch processing, as it allows for granular recovery without re-running the entire batch, which would be inefficient and costly.

Exam trap

Candidates often think that they must re-run the entire batch or that the API will automatically retry failed requests, neither of which is the correct procedure.

112
MCQmedium

Your organization has a policy that all production deployments must use a specific, audited model version. A developer wants to test a new model version for an upcoming release. What is the correct way to handle this?

A.Ask the API to automatically select the best model version for the task, including the new one.
B.Update the production system to the new model ID and monitor the logs closely for any issues.
C.Use a separate workspace or API key to test the new model version in an isolated environment.
D.Hardcode a conditional check in the application that switches to the new model ID only for specific user IDs.
AnswerC

This is the correct approach for maintaining governance. By isolating the new model version in a non-production workspace, the developer can conduct their tests without risk to the production environment, while still allowing for proper review of the new version's performance.

Why this answer

Governance requires that production and experimental environments remain strictly separated. By using different API keys or workspaces, the developer can test the new model version without impacting production traffic. This ensures that the production environment remains on the approved, audited version while providing the developer with an isolated space to gather performance data on the new model version, which can then be presented for approval during the next governance cycle.

Exam trap

Allowing experimental model IDs to be mixed with production traffic under the assumption that 'just one request' won't matter, or failing to audit the new model version before use.

113
MCQeasy

An application processes customer image uploads to provide accessibility descriptions. A developer notices that the token cost for processing images varies significantly between different uploads. What is the primary reason for this variance?

A.Token usage scales based on the pixel dimensions of the image provided in the content block.
B.Each image upload incurs a fixed base token cost plus a variable fee for the file size in kilobytes.
C.The API applies a dynamic compression algorithm that charges more for high-contrast images.
D.The API charges a premium for base64-encoded images compared to images provided via a URL.
AnswerA

Image token usage is calculated based on the dimensions of the image, as the model processes the visual data. Higher resolution or larger physical dimensions increase the number of tokens required to represent the image, which directly impacts the input token count for the API request.

Why this answer

In the Claude API, images are not billed at a flat rate. The token consumption for an image block is directly dependent on the dimensions of the image. Larger images with higher resolutions require more processing and thus consume a higher number of tokens compared to smaller, lower-resolution images.

This is a fundamental characteristic of how vision capabilities are implemented within the Messages API, ensuring that resource usage scales proportionally with the visual information being provided to the model for analysis.

Exam trap

Candidates often assume images have a fixed token cost regardless of size or mistakenly think that only the file size in bytes influences token consumption.

114
MCQmedium

Which of the following describes the correct behavior of the Anthropic API regarding the 'system' prompt?

A.It is ignored if a user message is also provided.
B.It can be dynamically changed during a single request.
C.It provides foundational behavioral instructions to the model.
D.It is automatically appended to the end of the user message.
AnswerC

The system prompt serves as the anchor for the model's behavior, establishing the identity, rules, and context that the model adheres to. By separating these instructions from user input, it ensures that the model maintains its intended focus, reducing the risk of 'jailbreaking' or deviation from instructions.

Why this answer

The system prompt is designed to set the behavior, persona, and constraints of the model before it processes user-provided inputs. It is treated with higher priority than the user message, making it the ideal place for defining core safety guidelines or operational instructions. Correct utilization of the system field is a fundamental security practice, as it helps enforce behavioral boundaries consistently throughout the conversation, regardless of user attempts to influence the model.

Exam trap

Candidates often confuse the system prompt with user messages or memory storage, mistakenly thinking it dynamically changes based on user input during the conversation rather than remaining a fixed, high-priority foundational instruction.

115
MCQhard

Your application retrieves model details using the Models API and caches the results to improve performance. You notice that your application sometimes attempts to use a model ID that is no longer returned by the API. What is the most appropriate strategy for handling this?

A.Implement a cache-invalidation logic that re-fetches the model list upon encountering a model-not-found error.
B.Disable the feature until the model is re-added to the API.
C.Hardcode a list of 'backup' model IDs to use if the primary model is missing.
D.Ignore the missing model and continue using the stale ID until the next deployment.
AnswerA

This is the most robust strategy. By detecting when a model ID is no longer valid, your application can proactively refresh its knowledge of available models. This ensures that the system automatically recovers from changes in model availability without requiring manual updates or application restarts.

Why this answer

Model availability can change, and relying on stale cached data is a common source of runtime errors. When your application detects a 404 error or a missing model ID during the discovery phase, it should invalidate its cache and re-fetch the current model list from the Models API. By implementing a robust cache-invalidation strategy, your application ensures it always operates with the most current and valid model information, maintaining uptime even when model versions are retired or deprecated.

Exam trap

Candidates often suggest manual intervention or hardcoding fallbacks, which do not scale well in dynamic cloud environments.

116
MCQmedium

A developer is building a high-volume document analysis pipeline using the Message Batches API. To ensure efficiency and cost-effectiveness, which practice should be followed when handling the results?

A.Process all batch results immediately upon receipt to avoid HTTP timeouts.
B.Use the custom_id field to correlate each result with the corresponding input document.
C.Resubmit the entire batch if any individual request within the batch fails.
D.Assume the API returns results in the same order as the requests in the batch file.
AnswerB

Because batch processing is asynchronous and results are returned out of order, the `custom_id` provides a reliable identifier to associate the output from the API with the original data, ensuring that the application can correctly route or process the generated results for each specific document.

Why this answer

The Message Batches API is designed for non-latency-sensitive bulk processing. Since results are returned in any order, the developer must use the unique `custom_id` provided in the request to map the results back to the original documents. This approach decouples the submission of work from the processing time, allowing the system to scale efficiently.

Furthermore, results are available for 29 days, and failed requests should be retried individually rather than re-submitting the entire batch, which preserves resources and simplifies the error-handling lifecycle.

Exam trap

Candidates often assume batches return results in the order they were submitted or that they can be used for real-time, low-latency requirements.

117
MCQhard

An AI researcher is auditing the usage of Claude models across different departments to ensure compliance with company policy. They find that one team is using a version-pinned ID, but they are also using a parameter that is no longer supported by the current model. What should the team do?

A.Keep the parameter to ensure that the request remains identical to how it was originally configured.
B.Wrap the request in a try-catch block to ignore errors caused by the unsupported parameter.
C.Switch to a different model ID that still supports the legacy parameter.
D.Remove the unsupported parameter and update the request to follow current API standards.
AnswerD

Removing unsupported parameters is necessary to ensure the API call remains valid and continues to function correctly. Keeping dead or unsupported parameters can cause errors, unexpected API behavior, or security vulnerabilities, so cleaning up the configuration is a critical part of maintaining a stable and compliant production application.

Why this answer

When a parameter becomes unsupported, the team must update their API requests to remove it, as keeping it can lead to API errors or unexpected behavior. Furthermore, this is an opportunity to re-evaluate the model configuration, ensuring that the pinned model ID is still the correct choice for the task and that all other parameters align with the latest best practices. Maintaining clean, compliant code that follows current API specifications is essential for long-term stability and security within an enterprise environment.

Exam trap

Candidates might think they should keep the parameter to maintain 'backward compatibility', even if it is no longer supported by the API.

118
MCQmedium

An infrastructure monitoring tool sends periodic HTTP requests to the Models API to verify API availability and monitor endpoint health. Which HTTP method and path combination is valid for listing available models?

A.GET /v1/models/list
B.POST /v1/models
C.POST /v1/models/list
D.GET /v1/models
AnswerD

The standard endpoint for discovering available models is `GET /v1/models`. It returns a list of model objects accessible to the API key, sorted chronologically with the most recently released models listed first.

Why this answer

Listing models is a read-only operation on the models collection, so the request is GET /v1/models. It returns the models available to the API key, newest first. Don't confuse it with POST /v1/messages, which is used to generate responses.

Exam trap

Confusing the HTTP method used for message generation (POST) with the method used for resource listing (GET).

119
MCQhard

Your team is auditing the API usage of several applications that interact with the Models API. One application frequently queries the /v1/models/{id} endpoint for the same model ID. Why is this potentially redundant or inefficient?

A.The endpoint returns different metadata for the same ID depending on the user's location.
B.The endpoint requires a special administrative API key that is not available to standard applications.
C.The /v1/models/{id} endpoint is deprecated and will soon be removed from the API.
D.Model metadata is essentially static, and frequent re-fetching is an inefficient use of API resources.
AnswerD

Model capabilities and token limits do not change dynamically. Fetching this information once and caching it locally is a best practice. Frequent querying adds unnecessary network latency and API overhead, which can be easily avoided by implementing a simple local caching mechanism for the metadata.

Why this answer

While the /v1/models/{id} endpoint provides accurate and current metadata, model capabilities and limits generally do not change frequently. Repeatedly querying this endpoint for the same model ID adds unnecessary API calls. A more efficient pattern is to cache the model metadata within the application after the first request, refreshing it only occasionally.

This reduces the load on the API and improves the application's responsiveness by avoiding redundant network requests for static or slow-changing information.

Exam trap

Failing to recognize that model metadata is relatively static and doesn't require real-time lookup for every user request.

120
MCQmedium

A software engineer is integrating document processing into an existing Claude API application. The team needs to allow users to ask questions about 50-page PDF documents. Which content block structure in the Messages API is correct for passing document contents directly in the API call?

A.Pass the raw PDF binary string directly inside a standard 'text' content block
B.Set the content block type to 'image' and pass the PDF converted into a single multi-page base64 image string
C.Set the content block type to 'file' with a file_path pointing to the local filesystem location
D.Set the content block type to 'document' with a source object containing the media_type and base64 data
AnswerD

The Messages API natively accepts PDF files via content blocks of type 'document'. The source parameter specifies data format, media type, and the encoded content, allowing Claude to parse and analyze the PDF document structure correctly.

Why this answer

When working with the Claude Messages API, non-text inputs such as PDFs and images are passed inside the content array of a message object as typed blocks. For PDF files sent directly in the payload, the block type must be set to 'document'. The block includes a source object specifying the media type (such as application/pdf) and data encoding (such as base64).

Using incorrect block types like 'file' or 'image' will result in API request validation errors.

Exam trap

Assuming all non-text binary inputs use the 'image' type block or generic 'file' block instead of the specific 'document' block type.

121
MCQhard

A developer is building a system that processes sensitive financial reports and needs to ensure that Claude's reasoning process remains auditable and that the system adheres to strict data policies. Which of the following is true regarding model reasoning and auditability?

A.The developer should log the input messages, the tool calls, and the final output as the primary evidence for auditability.
B.The developer must set the 'effort' to 'max' to ensure that all reasoning steps are included in the 'thinking' block for the audit log.
C.The developer can enable the 'raw_thinking' flag in the API request to capture the full chain of thought for compliance logging.
D.The developer can use the 'thinking' parameter to explicitly request a step-by-step reasoning trace that is returned as part of the content block.
AnswerA

Since the raw internal reasoning is not exposed, the only verifiable evidence of the interaction consists of the inputs sent to the API, the tool calls made, and the final response content. This is the standard approach for maintaining auditability in applications that use the Claude API.

Why this answer

On current models, the thinking process (adaptive thinking) is handled by the model and is not exposed as a raw, human-readable trace. The API returns summarized thinking blocks, and the raw chain of thought is never exposed. Therefore, attempting to log a detailed internal reasoning trace is not possible.

For auditability, the developer should focus on logging the inputs, outputs, and the tool-use sequences, rather than trying to capture the internal thought process, which is abstracted away by the model's design.

Exam trap

Believing that the internal reasoning trace is accessible for auditing or compliance reporting.

122
MCQmedium

A developer is implementing a feature where users can click a citation in the UI to jump to the relevant section of the source PDF. Why is the location information returned with each citation (such as page numbers) critical for this implementation?

A.It identifies the specific user who uploaded the document for security auditing.
B.It is used by the API to automatically verify if the cited text is accurate.
C.It enables the UI to map the citation to the specific section of the source document.
D.It helps the model track how many times a document has been referenced across sessions.
AnswerC

The location field provides the precise reference required to bridge the gap between the model's output and the original document structure. This allows the application to implement accurate navigation features, such as deep-linking to the relevant document segment.

Why this answer

The location field in the citation response provides the necessary metadata for the application to link the assistant's claim back to the specific part of the document. Without this field, the application would only have the quoted text, which might appear multiple times in a long document. The location information allows the UI to map the model's citation directly to a page or segment, enabling the jump-to-section functionality that is essential for a user-friendly and verifiable document review tool.

Exam trap

Candidates might confuse the location field with a persistent document ID or a custom indexing system.

123
MCQmedium

Your application uses Claude Sonnet 5.5 to perform sentiment analysis on customer feedback. You want to ensure the response is always a simple 'Positive', 'Negative', or 'Neutral' label. What is the best way to achieve this?

A.Instruct the model in the system prompt to 'only answer with the label, no other text'.
B.Use an assistant-message prefill to start the response with the expected label.
C.Use `output_config.format` to define a JSON schema that limits the response to one of the three labels.
D.Set the `max_tokens` parameter to 5 to force the model to stop after the label.
AnswerC

Defining a JSON schema that restricts the model's output to a specific set of allowed values is the standard, robust way to ensure that your application receives exactly what it expects. This removes the need for cleanup or parsing and guarantees that the response format is consistently followed.

Why this answer

The most reliable way to force a specific, constrained output is to use `output_config.format` with a schema that restricts the response to the desired enumeration of values. This approach is superior to asking the model in the system prompt, as it provides a hard constraint that the model must follow. It prevents the model from adding unnecessary conversational filler, such as 'The sentiment is positive', which would otherwise require additional parsing logic in your application code.

Exam trap

Candidates often think that a very short `max_tokens` limit is a good way to force a short answer, but this can lead to truncated responses if the model decides to generate any introductory text.

124
MCQmedium

Refer to the exhibit. A developer is testing the vision capabilities of Claude 3.5 Sonnet. Based on the provided JSON request, which statement accurately describes how the model will process this input?

A.The model will fail because images must be sent in a separate system prompt.
B.The model will analyze the image and text together to provide the receipt total.
C.The request will error because Claude 3.5 Sonnet does not support base64 images.
D.The model will ignore the text and only provide a description of the image.
AnswerB

Claude 3.5 Sonnet is a multimodal model that can process text and image blocks simultaneously. By providing the image data and the text question in the same message, the developer allows the model to use its vision capabilities to extract the requested information from the receipt.

Why this answer

The Claude API supports multimodal inputs by allowing a mix of text and image content blocks within the messages array. In this specific configuration, the model receives both a base64-encoded image and a text query, enabling it to apply its vision capabilities to answer a specific question about the visual data.

Exam trap

Candidates often assume the model requires a separate 'Vision API' or 'OCR tool', failing to realize the native multimodal capability of the standard Messages API.

125
MCQeasy

A backend service queries the Anthropic Models API (`GET /v1/models`) to retrieve the list of models accessible to the organization. In what order does the API present the array of models in its response?

A.Most recently released models first.
B.Grouped by context window capacity from smallest to largest.
C.Alphabetically by model identifier string.
D.Ordered by pricing tier from lowest cost to highest cost.
AnswerA

The Models API automatically orders the returned list of models chronologically with the newest model releases appearing first. This allows client applications to easily identify recent updates and access top-of-list model definitions programmatically when displaying options or evaluating platform support.

Why this answer

The Anthropic Models API retrieves active model descriptors sorted chronologically, putting the most recently released models first in the list. This standard ordering ensures that applications listing available models or selecting defaults naturally encounter the latest available model versions at the top of the dataset. Developers relying on this ordering can inspect the first element when identifying recent releases, though explicitly specifying exact model IDs in application code remains best practice for deterministic behavior.

Exam trap

Assuming models are sorted alphabetically by model ID or grouped by capability tier.

126
MCQhard

A developer is using Claude Code to refactor a legacy codebase. They notice that Claude occasionally suggests using libraries that were deprecated after its training cutoff. Which feature of Claude Code is specifically designed to provide the model with up-to-date project conventions and 'knowledge' to prevent these outdated suggestions?

A.The /review slash command.
B.CLAUDE.md memory files.
C.The prompt caching 'ephemeral' type.
D.The Files API with persistent file_id references.
AnswerB

CLAUDE.md files are automatically loaded into context by Claude Code. They are the intended location for storing project-specific instructions, conventions, and constraints that help the model stay grounded in the project's actual requirements.

Why this answer

CLAUDE.md files serve as the 'project memory' for Claude Code. By placing build commands, architectural patterns, and specific library versions in these files, the developer provides immediate, high-priority context that grounds Claude's suggestions in the current state of the project, effectively overriding or supplementing its older training data.

Exam trap

Confusing the Files API (for message attachments) with CLAUDE.md (for project-wide memory).

127
MCQhard

A legal analytics platform repeatedly analyzes a 200-page reference contract (PDF) against hundreds of different individual user queries throughout the day. To optimize performance and API cost, the team decides to use the Files API to host the document. Which statement accurately describes how token billing works when using file_id references across multiple API requests?

A.File references consume output tokens instead of input tokens during subsequent API calls
B.The Files API automatically caches input tokens for 24 hours without requiring any cache control headers
C.The document's content is billed as input tokens on every API request that references its file_id unless prompt caching is implemented
D.Uploading via the Files API incurs a one-time processing fee, making subsequent requests referencing file_id free of input token charges
AnswerC

Referencing a stored file via file_id simplifies network payload sizes, but the underlying tokens are still processed during each completion request. Prompt caching must be applied to lower the input token cost of repeated calls.

Why this answer

Uploading a file via the Files API avoids sending the file's raw payload bytes repeatedly over the network. However, referencing a file by its file_id in subsequent Messages API calls still processes the document's content through the model for each request. Therefore, input tokens associated with that document are billed on every API call referencing the file_id.

To reduce token billing costs for reused documents, developers should combine file references or document blocks with prompt caching.

Exam trap

Confusing byte-transfer optimization (Files API) with token-cost elimination, falsely assuming Files API hosting makes subsequent document token usage free.

128
MCQhard

A developer is writing a Python worker service that interacts with the Anthropic Messages API during long-running background tasks. Which of the following best describes why checking the `stop_reason` field is a critical best practice in production code?

A.It automatically triggers the SDK's built-in retry mechanism when connection timeouts or rate limits occur.
B.It ensures the application handles different completion states like tool execution, token limits, and natural finishes appropriately.
C.It calculates the exact dollar cost of the request by multiplying token counts against cached pricing tables.
D.It forces the API to clear its internal conversation memory cache to save storage space on server nodes.
AnswerB

Inspecting the stop reason allows the code to dynamically decide whether to execute a tool, increase token limits, or process the final answer text. This programmatic branching prevents unhandled execution states from crashing downstream components.

Why this answer

Checking the `stop_reason` field is vital because it tells your application why Claude stopped generating text, allowing your code to branch correctly based on whether the model finished naturally, encountered a tool call, hit a token cap, or was refused. Without checking this field, an application might attempt to parse truncated text as complete JSON or fail to handle mandatory tool execution loops, leading to brittle workflows and unexpected runtime failures.

Exam trap

Candidates often assume that every API response contains fully realized final text, ignoring the risk of truncation, mid-stream tool calls, or safety refusals.

129
MCQmedium

A customer service workflow uses Claude Haiku 5.5 to answer technical queries about a proprietary internal software framework released last month. When asked how to install the software, Claude generates instructions describing a non-existent package on public package registries. What fundamental model limitation caused this hallucination?

A.Claude Haiku 5.5 automatically suppresses technical documentation unless adaptive thinking is explicitly configured to high effort.
B.The framework was developed after the model's training data cutoff and is proprietary, meaning Claude has zero parametric knowledge of its existence.
C.The Files API was used to upload the installation guide, which automatically hides file content from Claude unless indexed by Anthropic.
D.The Messages API returned a safety refusal because proprietary package installations violate Anthropic's general code execution policy.
AnswerB

Language models possess fixed pre-training knowledge boundaries and have no inherent awareness of private, proprietary internal systems or events post-dating training. In the absence of provided documentation, the model predicts probable installation commands based on public open-source patterns.

Why this answer

Claude's pre-trained parametric knowledge is strictly bounded by its training cutoff and does not include proprietary software or events released after that period. When asked about unfamiliar private software frameworks without any retrieved documentation, the model relies on general naming conventions and web development patterns learned during training, leading it to invent plausible but entirely fictional installation steps. Supplying the actual documentation via RAG or prompt context is required.

Exam trap

Assuming Claude has native browsing capability or live access to proprietary company repositories out of the box.

130
MCQeasy

A developer wants Claude to always respond in a strict, terse style and never use emojis, regardless of how users phrase their requests. Where should this persistent behavioral instruction be placed in a request to the Anthropic Messages API?

A.In the assistant's first turn as a pre-filled response.
B.In the system parameter, as a top-level instruction that applies to the whole conversation.
C.Appended to every user message as a trailing reminder.
D.As a metadata field attached to the request payload.
AnswerB

The system parameter is designed for persistent, cross-turn instructions such as tone, persona, and formatting rules. Placing the terse-style and no-emoji directive there applies it to every assistant turn without repeating it in each user message. This is the recommended way to enforce consistent behavior in the Messages API and keeps user turns focused on their actual questions.

Why this answer

Persistent behavioral rules such as tone and formatting belong in the system parameter of the Messages API. The system prompt is applied across all turns, so the terse, no-emoji requirement does not need to be repeated in each user message. Appending reminders, pre-filling an assistant turn, or using metadata do not provide the same durable, conversation-wide control over Claude's behavior.

Exam trap

The trap here is treating the system parameter as optional and instead repeating style rules in every user message, which is token-wasteful and less reliable than a single persistent system instruction.

131
MCQhard

A researcher is developing a tool to compare historical documents. They notice that the citations returned by the model do not contain persistent IDs that they can use to map citations across multiple API turns. Why is this the case?

A.The API is stateless, and citations are generated dynamically within the context of each individual request.
B.The citation feature is currently in beta and will support persistent IDs in future API versions.
C.The citation mechanism requires the use of the Files API to enable cross-turn tracking.
D.The researcher failed to provide a unique identifier in the document block metadata.
AnswerA

Because the Messages API does not retain conversation state between calls, it cannot assign or maintain persistent IDs for citations. Every request is processed in isolation, so citations are generated relative to the specific document context provided in that exact request, ensuring consistency within the turn but not across turns.

Why this answer

The Messages API is stateless, meaning it does not maintain a persistent identity or index for specific document segments across separate requests. Each API call is treated as an independent transaction. Consequently, the citation feature is designed to provide immediate grounding within the context of a single response.

There is no mechanism to generate, track, or store citation IDs that would persist across multiple turns, as the model does not have a persistent internal memory of specific document offsets between distinct API invocations.

Exam trap

Candidates frequently assume that because Claude can 'see' the document, it must have a fixed coordinate system or ID map for the document content that persists across turns.

132
MCQeasy

A business analyst is using Claude Sonnet 5.5 to process a series of 800,000-token technical reports. When the model generates a response, the analyst notices the 'stop_reason' is 'max_tokens' even though the response seems incomplete. Based on the model specifications, what is the most likely cause?

A.The model's adaptive thinking process consumed the remaining context window before the text could finish.
B.The system prompt was too long, causing the input to be truncated before the model could start writing.
C.The total context window of 1M tokens was exceeded by the combination of the report and the response.
D.The response hit the output limit set by the request's `max_tokens` value (output is capped separately from the 1M context window, at most 128K tokens).
AnswerD

`stop_reason: max_tokens` means generation stopped because it reached the output ceiling: the `max_tokens` value in the request, which can never exceed the model's 128K output maximum. That ceiling is separate from the 1M context window, so plenty of context can remain while the output is still cut off.

Why this answer

Current models such as Sonnet 5.5 have a 1M-token context window but a separate output ceiling: the `max_tokens` value set on the request, which can be at most 128K. When `stop_reason` is `max_tokens`, generation reached that ceiling and the text is truncated. The fix is to raise `max_tokens` (streaming for large values) or continue the response in a follow-up request.

Exam trap

Confusing the 1M-token context window (input + output) with the 128K-token output-only limit.

133
MCQmedium

An engineering team is reviewing API response logs for a Claude-powered customer support application. They notice that a response returned a `stop_reason` of `end_turn`. What does this specific stop reason indicate about the model's completion?

A.Claude finished generating its response naturally and reached a complete stopping point.
B.The request was blocked by safety classifiers due to a violation of usage policies.
C.The response was truncated because it exceeded the configured maximum output token limit.
D.Claude has generated a tool use request and is waiting for the application to run the function.
AnswerA

The stop reason `end_turn` explicitly signifies that the model finished its task organically without running out of allocated space or needing external tool intervention. This is the normal conclusion for successful requests.

Why this answer

The stop reason `end_turn` indicates that Claude successfully completed its generation naturally and reached a stopping point on its own accord. This is the standard and expected outcome for a healthy response where the model finished answering the user query without hitting token limits, triggering a tool use, or encountering a safety refusal. Developers should verify this stop reason before attempting to process the final content blocks in the response body.

Exam trap

Candidates often confuse `end_turn` with an error state or assume it means the maximum token threshold was breached, forgetting that it represents normal, successful completion.

134
MCQmedium

Your application uses the Anthropic SDK to stream responses from Claude for a document summarization feature. You are currently using a helper method that returns the final message object. You want to implement a progress bar that updates as the model generates the summary. How should you modify your implementation to achieve this?

A.Enable prompt caching for the document to speed up generation, which will naturally reduce the time the progress bar needs to be displayed.
B.Continue using the SDK helper but periodically poll the API for the current output_tokens usage to update the progress bar.
C.Calculate the expected token count based on the input document size and use a timer in the UI to estimate the progress bar's movement.
D.Switch to a low-level event stream handler that processes incoming deltas to monitor the generation and update the UI incrementally.
AnswerD

Implementing a stream handler allows the application to intercept and process individual events as they arrive from the server. By tracking the content_block_delta events, the application can maintain an accurate count of generated tokens or simply monitor the stream activity, enabling a responsive and accurate progress bar that reflects the model's actual output generation speed.

Why this answer

While SDK helpers are convenient for simple tasks, they often abstract away the streaming events, returning only the final, complete response. To track progress and update a UI element like a progress bar, you must bypass these high-level helpers and consume the underlying server-sent events directly. By iterating over the stream of message deltas, you can track the number of output tokens being generated in real-time.

This allows you to map the model's output progress to a progress bar, providing clear feedback to the end user regarding the status of the ongoing summarization task.

Exam trap

Assuming that SDK helpers provide hooks into the middle of the streaming process, or trying to calculate progress based on input tokens rather than the actual ongoing output generation.

135
MCQmedium

A developer is using Claude Sonnet 5.5 to perform complex code refactoring. They find that the model is providing correct answers but taking longer than desired to generate the full output. Which configuration change serves as the most effective first lever to reduce latency and cost without switching to a less capable model?

A.Disable streaming in the API request.
B.Lower the effort level in output_config.
C.Switch to Claude Haiku 5.5.
D.Decrease the max_tokens parameter to 1024.
AnswerB

The effort setting (low, medium, high, etc.) controls thinking depth and token spend. Lowering it is the primary way to trade off some reasoning intensity for faster, cheaper responses within a single model.

Why this answer

The effort parameter within output_config allows users to trade quality/depth against cost and speed within the same model. By lowering the effort level (e.g., from 'high' to 'low'), the model reduces its internal thinking depth, leading to faster token generation and lower overall token spend while maintaining the core capabilities of the chosen model tier.

Exam trap

Switching models immediately when latency is high, rather than tuning the effort parameter first.

136
MCQeasy

Your application monitors the `stop_reason` field in the API response. You receive a response where the `stop_reason` is `max_tokens`. What is the most appropriate action for your application to take?

A.Accept the truncated response and parse only the completed portion of the text.
B.Retry the request with a higher `max_tokens` value.
C.Retry the request with the same parameters, as the truncation might be a transient server-side error.
D.Log the response as a failure and wait for the model's cache to clear before retrying.
AnswerB

Increasing the `max_tokens` value provides the model with a larger budget to complete its generation. This is the correct way to handle a `max_tokens` stop reason if you require the complete output that was previously truncated.

Why this answer

When the API returns a `max_tokens` stop reason, it explicitly indicates that the model's output was cut off because it reached the limit defined in your request. To obtain the full, intended response, you must increase the `max_tokens` value in a subsequent request. Simply retrying with the same parameters will result in the same truncation.

You should never assume the content is complete if the stop reason is anything other than `end_turn`.

Exam trap

Candidates often think that a retry with the same parameters will yield a different result, or that they should ignore the stop reason if the text looks 'mostly' finished.

137
MCQmedium

Your team is debugging a streaming implementation where the application occasionally hangs. You suspect that the client is not correctly handling the transition between streaming and tool use. What happens to a streaming response when Claude decides to call a tool?

A.The stream delivers the tool use blocks and then ends with a stop_reason of tool_use.
B.The stream pauses and resumes automatically after the tool result is provided by the client.
C.The stream remains active to allow the model to wait for the tool output before continuing.
D.The stream continues to send events until the client sends a tool_result in the same stream.
AnswerA

When Claude requires a tool, it concludes the current response stream with a `stop_reason` of `tool_use`. This signals the client that the generation is complete for this turn and that the client must now perform the tool execution and return the results in a subsequent API call.

Why this answer

When Claude determines that a tool call is necessary, it stops generating text and returns a `tool_use` stop reason. In a streaming context, the stream will deliver the content blocks leading up to the tool use and then terminate that specific response stream. The client must then execute the tool locally and return a new request containing the tool results.

The API does not 'pause' the stream to wait for the tool; it signals the end of the current turn.

Exam trap

Thinking the stream remains open while the code executes the tool, or that the API waits for the client to provide tool output before closing the stream.

138
MCQeasy

Your team is evaluating the use of effort levels in Claude Sonnet 5.5. You are currently using the default setting. A lead engineer suggests that to improve the accuracy of a critical reasoning task, you should increase the effort to 'high'. Why is this recommendation potentially misleading?

A.High effort is the maximum possible setting and cannot be increased further.
B.Effort levels only apply to Opus 5.5 and have no impact on Sonnet 5.5 performance.
C.Increasing effort always decreases accuracy because it forces the model to hallucinate more.
D.Sonnet 5.5 already defaults to high effort, so changing it to high has no effect.
AnswerD

Since Sonnet 5.5 is already configured to high effort by default, setting it to high again does not change the model's reasoning depth. To achieve better accuracy, the team needs to choose a higher effort level, such as xhigh or max, to trigger deeper thinking processes.

Why this answer

Claude Sonnet 5.5 defaults to a 'high' effort level already. Increasing the effort to 'high' would not result in any change in behavior or reasoning depth. To improve accuracy on a critical task, the engineer should consider raising the effort level above the current default, such as to 'xhigh' or 'max', or evaluating whether a more capable model tier like Opus 5.5 is required for the task's complexity.

Exam trap

Failing to check the default effort level for the specific model tier being used, leading to redundant configuration changes.

139
MCQmedium

A product team is building a customer-support assistant on Claude. They want Claude to answer only from a fixed set of help-center articles and to refuse any question outside that scope. They also need to update the article set frequently without retraining a model. Which approach best meets these requirements?

A.Lower the temperature to 0 and rely on Claude's built-in knowledge of common support topics to produce consistent answers.
B.Fine-tune a Claude model on the current help-center articles so that it memorizes the answers and cannot go off-topic.
C.Use a very large max_tokens value so Claude has room to reproduce entire help-center articles inside each response.
D.Place the help-center articles in the system prompt and instruct Claude to answer only from those articles, then update the system prompt when the article set changes.
AnswerD

Putting the approved articles in the system prompt gives Claude authoritative grounding for every turn, and the instruction to stay within scope is enforced by the model's instruction-following behavior. Because the system prompt is supplied at request time, the team can swap in updated articles instantly without any model training, which directly satisfies the frequent-update requirement.

Why this answer

Grounding Claude in the approved articles through the system prompt satisfies both the scoping requirement and the need for frequent updates, because the content is provided at request time rather than baked into the model. Fine-tuning is poorly suited to a changing knowledge base, temperature does not enforce scope, and max_tokens only affects output length.

Exam trap

The trap here is assuming that fine-tuning is the right way to give Claude a specific, changeable body of knowledge, when prompt-time grounding is what actually enables fast updates and strict scoping.

140
Multi-Selectmedium

A software team is building an automated medical receipt parsing service that processes multi-page scanned documents and complex diagrams. They are designing the API payload to send multimodal inputs to Claude Sonnet 5.5. Which TWO input formats are natively supported for content blocks in the Anthropic Messages API? (Select TWO.)

Select 2 answers
A.Raw unencoded binary byte streams appended directly to the HTTP POST body root
B.A `document` content block referencing a `file_id` uploaded via the Files API
C.Base64-encoded string data within an `image` content block
D.A direct file path string referencing a file on the client's local hard drive
E.An MP4 video block containing embedded image frames
AnswersB, C

The Files API allows developers to upload documents once and reference them by `file_id` inside `document` content blocks across multiple requests. This standardizes payload structures and avoids repeatedly uploading large file byte arrays in every API turn.

Why this answer

The Anthropic Messages API natively supports multimodal inputs inside standard content blocks. Images can be supplied via base64 encoding or accessible image URLs within `image` content blocks. PDF documents and long text files are natively supported as `document` content blocks using base64 encoding, document URLs, or a `file_id` managed by the Files API.

Exam trap

Confusing supported API formats with legacy endpoints or assuming raw file streams can be sent as raw binary in the main message body without content block descriptors.

141
Multi-Selecthard

A product manager is comparing the cost models and resource administration of using Claude web/team subscription plans versus the Anthropic Messages API for an enterprise department. Which TWO statements accurately reflect the cost and billing differences between these two consumption models? (Select TWO)

Select 2 answers
A.Claude web app enterprise/team plans typically utilize a fixed per-seat periodic subscription model for human users.
B.Message Batches API requests are billed at a flat monthly enterprise license fee rather than per-token consumption.
C.The Messages API is billed on metered token consumption based on actual input, output, and caching usage.
D.The Claude web application requires developers to submit credit card payments based on the exact input token count of each uploaded file.
E.The Claude Messages API allows organizations to purchase unlimited flat-rate tokens under an annual seat license.
AnswersA, C

Claude web and desktop app subscriptions are priced on a per-user seat basis (e.g., monthly or annual subscriptions per seat), granting human users interactive access within regular application boundaries without calculating individual token fees.

Why this answer

The Claude web/team applications operate under a fixed seat-based subscription model (a recurring fee per user per month), making costs predictable regardless of daily message variability (subject to standard interactive usage caps). In contrast, the Messages API operates purely on metered token consumption, where organizations pay directly for exact input, output, cache read/write, and batch tokens processed across their applications.

Exam trap

Assuming API usage can be billed on a flat per-user license or that web subscriptions meter every token consumed.

142
Multi-Selectmedium

A developer wants to use prompt caching to reduce the latency of a multi-turn chatbot that uses a large static knowledge base. Which TWO actions would help maintain high cache hit rates?

Select 2 answers
A.Append the current date and time to the very top of every system prompt
B.Randomize the order of tools in the tools list to prevent model bias
C.Mark the end of the static knowledge base with cache_control { "type": "ephemeral" }
D.Place the large static knowledge base at the beginning of the system prompt
E.Use the Message Batches API for the chatbot turns
AnswersC, D

Explicitly marking a breakpoint with cache_control tells the system exactly what part of the prefix to store in the cache, ensuring that the heavy static content is saved for future turns.

Why this answer

To maintain a high cache hit rate, the prefix (tools, system prompt, and early messages) must remain identical. Putting stable content like the knowledge base at the beginning and ensuring volatile content (like a current timestamp) is placed after the cache breakpoints prevents the cache from being invalidated prematurely.

Exam trap

Placing dynamic data like the current time or user-specific metadata at the top of the system prompt.

143
MCQmedium

Your application uses Claude Opus 5.5 to perform complex reasoning. You notice that the model often returns a `stop_reason` of `tool_use`. What does this indicate about the API interaction?

A.The model has encountered an error while trying to generate a response and is asking for a tool to fix it.
B.The model has reached a point where it requires an external tool to proceed with the current task.
C.The model is indicating that the tool definition provided in the request is invalid or malformed.
D.The model is signaling that it has finished using all available tools and is now providing the final response.
AnswerB

When Claude reaches a decision to use a tool, it sets the stop_reason to `tool_use`. The model pauses its generation to wait for the application to execute the tool and return the result. This is the intended behavior for agentic workflows where the model needs to interact with external systems.

Why this answer

A `stop_reason` of `tool_use` means that Claude has decided to invoke a tool that you have provided in the definition. The model has paused its generation and is waiting for your application to execute the tool and return the `tool_result`. This is a standard part of the tool-calling loop, where the application acts as the executor.

The developer must be prepared to catch this stop reason, run the code, and pass the results back in the next message to continue the interaction.

Exam trap

Candidates sometimes think `tool_use` is an error state or a sign that the model is failing to answer directly, rather than an intentional step in the agentic loop.

144
Multi-Selectmedium

A financial software company is deploying Claude Sonnet 5.5 to assist analysts in drafting investment summaries. The solution must conform to enterprise safety and accuracy standards. Which TWO inherent behavioral traits of foundational LLMs must the architecture account for during design? (Select TWO)

Select 2 answers
A.Pinning a specific model ID keeps the model version stable, but outputs can still vary across identical requests.
B.Models lack intrinsic awareness of real-time events or private enterprise data unless explicitly supplied in prompt context or via tools.
C.Claude models automatically store long-term user context across separate stateless Messages API requests without client tracking.
D.Safety refusals generated by Anthropic's classifiers return HTTP 403 status codes and cancel credit billing for the batch.
E.Extremely low max_tokens settings force the model to condense complex reasoning into highly accurate one-word answers.
AnswersA, B

Pinning keeps production on the model version you evaluated. Generation is still not guaranteed to be identical word for word, so the same input can produce different outputs across requests.

Why this answer

Foundational LLMs operate probabilistically rather than deterministically. As a result, pinning a model ID ensures API stability and prevents unexpected model deprecation, but it does not guarantee identical word-for-word generation outputs across repeated calls. Additionally, LLMs lack self-contained access to real-time external events and rely entirely on static context provided within the prompt or retrieved dynamically via tool calls.

Systems must be designed with external verification pipelines and fallback logic to handle non-deterministic outputs and missing context.

Exam trap

Assuming that pinning exact model IDs turns LLM outputs into strictly deterministic responses.

145
Multi-Selecthard

A financial firm is using Claude to analyze market trends. They want to ensure the system is resilient against hallucinations in a production environment. Which THREE practices should they adopt according to Anthropic's guidance?

Select 3 answers
A.Ground all model answers in provided, verified financial documents.
B.Enable `strict: true` on all tool definitions to prevent the model from hallucinating data.
C.Keep a human in the loop to review and approve the model's market trend reports.
D.Establish a set of 'evals' (test cases) to grade the model's accuracy before deployment.
E.Use the Files API to store all historical data so Claude can access it without instructions.
AnswersA, C, D

Grounding is the most direct way to prevent the model from hallucinating based on its pre-trained knowledge. By providing the source of truth in the context, the model's task changes from 'recalling' to 'processing'.

Why this answer

Anthropic recommends grounding answers in documents, evaluating prompts with test sets (evals), and keeping humans in the loop for consequential actions as standard practices for responsible and accurate AI deployment. These steps provide a multi-layered defense against hallucinations and misuse.

Exam trap

Relying on technical settings like 'strict tools' to fix factual hallucinations, when strictness only ensures schema compliance, not factual truth.

146
MCQmedium

Your organization is scaling an agentic workflow that uses Claude. You notice that the total cost is exceeding projections. Which change to the effort configuration would be the most effective way to reduce costs for a non-critical, high-volume agentic step?

A.Increase the effort level to ensure the model completes the task faster.
B.Use a different system prompt to force the model to provide shorter answers.
C.Lower the effort level for that specific step in the agentic workflow.
D.Remove the thinking block from the API request to eliminate reasoning costs.
AnswerC

Lowering the effort level is the most direct way to reduce the token spend on reasoning for a specific task. By aligning the effort level with the task's lower critical nature, you achieve immediate cost savings while keeping the workflow pipeline intact.

Why this answer

For non-critical, high-volume steps in an agentic workflow, maintaining a high effort level is often unnecessary. Adaptive thinking consumes tokens; by lowering the effort level, you directly reduce the number of tokens allocated to the model's internal reasoning process. This is a highly effective, low-risk way to lower the cost per request without needing to change the model family.

It allows the agent to remain functional while ensuring that computational resources are being used in proportion to the task's actual importance.

Exam trap

Candidates often attempt to use prompt engineering or model switching before considering the impact of the effort parameter.

147
MCQhard

You are building an agentic workflow where Claude uses a search tool to answer user questions. The agent occasionally reports that it found information in a document that doesn't exist, despite the search tool returning an empty list. How should you adjust your agent's design?

A.Use the 'max' effort setting to force the model to re-run the search.
B.Increase the tool's timeout to allow more time for data retrieval.
C.Add a system prompt instruction requiring the model to explicitly state it cannot find information if the tool returns an empty list.
D.Switch to a model with a larger context window to ensure the search results are not lost.
AnswerC

Direct system instructions provide the model with a clear protocol for handling unsuccessful searches. By defining this behavior, you prevent the model from assuming it can synthesize an answer from its own training data when it should be relying solely on the tool output.

Why this answer

This is a classic case of the model hallucinating content after failing to find it. You must ensure the model explicitly handles the tool's empty output. By enforcing a rule where the model must confirm the tool result before attempting to answer, you can catch these failures.

The agent should be instructed to report that it could not find the information if the tool result is empty.

Exam trap

Assuming that the tool's return code is sufficient and that the model will naturally respect it without explicit instructions in the system prompt.

148
MCQhard

An engineering firm is using Claude to help design a complex micro-architecture for a new processor. The task requires deep logical reasoning, knowledge of hardware description languages (Verilog), and the ability to handle highly abstract concepts. Which model should be used for the highest possible accuracy?

A.Claude 3 Haiku
B.Claude 3 Sonnet
C.Claude 3 Opus
D.Claude 2.0
AnswerC

Opus is the top-tier model in the Claude 3 family, offering the highest level of performance on complex reasoning benchmarks. Its superior ability to synthesize information and handle specialized technical language makes it the correct choice for advanced research and development in fields like micro-processor architecture. (51 words)

Why this answer

Claude 3 Opus is Anthropic's most advanced model, specifically designed for tasks that require deep reasoning and expert-level knowledge. For specialized engineering tasks like micro-architecture design, the model's ability to navigate complex, multi-step logical problems and its extensive training on technical datasets provide a level of accuracy and nuance that smaller models cannot match. (68 words)

Exam trap

Candidates frequently choose faster, cheaper models like Haiku or Sonnet, assuming standard tasks apply, but fail to recognize that deeply specialized architectural tasks demand Opus's superior reasoning.

149
MCQmedium

A researcher is studying the impact of different model families on the performance of a complex legal document analysis pipeline. They notice that their current code uses `claude-sonnet-5-5` but they want to compare it with the more capable `claude-opus-5-5`. What is the correct way to adjust their API requests to switch the model?

A.Change the request URL from /v1/messages to /v1/models/claude-opus-5-5.
B.Update the model parameter in the POST /v1/messages request to 'claude-opus-5-5'.
C.Re-initialize the API client with the new model ID before sending the request.
D.Include a header specifying the model version to override the default model settings.
AnswerB

The API design allows you to swap model identifiers seamlessly by updating the `model` field in your request payload. As long as your request parameters conform to the Messages API specification, the model will process the same input format, allowing for a straightforward comparison between different model tiers for your specific analysis task.

Why this answer

To switch models, you simply update the `model` parameter in your POST /v1/messages request to the ID of the desired model tier. Because the API is stateless, no other modifications are required to the request structure, provided that your prompt and other parameters are compatible with the new model. Switching to a more capable model is a standard procedure for handling complex reasoning tasks, but you should always monitor the usage object to understand the cost and token implications of the change.

Exam trap

Candidates might think that switching models requires changing the message format, the system prompt, or the tool definitions, which is generally not true unless the specific task requires model-specific adjustments.

150
MCQhard

A research team is using Claude to analyze historical documents and finds that the model occasionally attributes events to the wrong century. They need to ensure high accuracy for a critical archive project. Which combination of practices is best for this high-stakes task?

A.Use prompt caching to keep the entire historical archive in context, and set the effort level to 'xhigh' for every request.
B.Ask the model to perform a self-reflection loop by asking it to explain its reasoning step-by-step, and then use the output directly.
C.Rely on the model's internal 'adaptive thinking' to automatically detect and correct historical inconsistencies in its own output.
D.Use structured outputs to define a schema for the extracted events and enable citations to ground each event in the source document.
AnswerD

Structured outputs force the model to adhere to the required format, while citations provide the necessary evidence to verify the model's claims, creating a robust, verifiable extraction process for high-stakes archival data.

Why this answer

For high-stakes tasks, you must combine structural constraints with clear grounding instructions. Using structured outputs ensures the data is returned in a predictable format, which makes downstream validation easier. Simultaneously, using citations forces the model to justify its chronological claims against the provided source text.

By combining these, the team ensures that the output is both formatted correctly and verifiable, drastically reducing the risk of chronological errors or hallucinations in the final report.

Exam trap

Believing that simply setting the model to 'max' effort or 'max' tokens will solve accuracy issues without implementing verification and grounding mechanisms.

← PreviousPage 2 of 4 · 249 questions totalNext →

Ready to test yourself?

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