Courseiva

CCAO-F · domain

Prompting and Context Engineering

This domain covers how to structure prompts and context for Claude on AWS Bedrock, including system prompts, XML tags, long-context placement, and multimodal inputs. Questions present realistic scenarios like JSON extraction, RAG optimization, and error-code troubleshooting, asking you to choose the prompting technique that most reliably improves Claude's output.

122 questions29 easy57 medium36 hard

Focused practice

Practice Prompting and Context Engineering questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about Prompting and Context Engineering

Candidates must design prompts that reliably control Claude's output format and leverage long-context placement. The single most important thing is to put instructions and queries after the long document, and to use prefilling or XML tags to enforce structure.

Using XML tags and prefilling to enforce structured JSON output from Claude on Bedrock

Placing long documents before instructions and queries to improve recall in large contexts

Applying RAG techniques like chunking and metadata filtering to improve Claude's extraction accuracy

Ordering text and images in multimodal prompts to align with Claude's recommended input format

Watch out for

Common Prompting and Context Engineering exam traps

  • ▸Assuming a schema in the system prompt guarantees JSON; Claude may still add conversational text unless prefilling or stop sequences are used.
  • ▸Placing troubleshooting instructions before a 100,000-token manual, which reduces Claude's ability to locate the relevant error code.
  • ▸Treating images and text as interchangeable; the recommended order and labeling of multimodal content affects Claude's comprehension.

Question index

All Prompting and Context Engineering questions (122)

Click any question to see the full explanation, or start a practice session above.

1

You are building a customer support bot using Claude 3.5 Sonnet. You notice the model sometimes hallucinates policy details when the user asks a question not covered in your provided documentation. How should you structure your prompt to minimize this?

Medium
2

Your team is building a workflow where Claude evaluates software bug reports and determines their priority level. To ensure consistent classification, you want Claude to analyze the symptoms, reproduce the potential failure path conceptually, and justify its decision before assigning a priority label. What is the primary operational benefit of structuring the prompt to enforce this reasoning sequence?

Medium
3

A legal firm is using Claude to summarize multi-hundred page litigation documents. The model occasionally ignores specific clauses or mixes up dates between different case files provided in the same prompt. Which context engineering technique would most effectively improve the model's extraction accuracy and structural understanding of these inputs?

Medium
4

A developer is using Claude to summarize legal contracts. They notice that the summaries are sometimes too short and miss critical clauses. How should the developer adjust the prompt to ensure more comprehensive summaries?

Medium
5

Your team is integrating Claude into a data extraction tool. You have discovered that when Claude is asked to output a specific format, it occasionally includes introductory text like 'Here is the requested information:' before the actual data. Why is this behavior occurring in the context of the Messages API?

Easy
6

You are iterating on a prompt to extract data from financial reports. The model is sometimes guessing values when they are missing from the report. Which approach is most effective for ensuring the model reports 'N/A' for missing data?

Hard
7

When evaluating the quality of a prompt designed for complex multi-step reasoning, why is it beneficial to compare the outputs against a 'golden test set' rather than relying on ad-hoc testing?

Easy
8

When processing a long document for data extraction, you notice that the model's performance improves significantly when you include a specific set of high-quality examples of the desired output format at the beginning of the prompt. What is the primary reason for this?

Easy
9

A developer needs Claude to output data in a strict JSON format for an automated pipeline. Even with clear instructions, the model occasionally adds conversational filler like 'Here is the JSON:' before the code block. What is the most reliable way to prevent this?

Medium
10

A marketing team wants to inject product names into a series of Claude prompts. They are concerned that if they reorder the tools or change the system prompt, their cached prompt performance will degrade. What is the best strategy for managing these variables to maintain cache efficiency?

Medium
11

When writing a system prompt for a data extraction task, why is it better to explain that the output must be in a specific format because 'downstream systems require strictly parsed JSON' rather than just saying 'output as JSON'?

Easy
12

You are building a prompt chain where the first step classifies a document and the second step summarizes it. The first step returns a JSON object. How should you handle this output when passing it to the second step?

Easy
13

Your team is building a classifier for support tickets. You have a golden test set of 200 labeled examples. Which TWO of the following practices will most effectively help you isolate why your prompt is failing on 'Technical' category tickets?

Hard
14

You are iterating on a prompt to improve Claude's ability to categorize technical tickets. Which metric should you monitor to ensure your changes are actually improving performance?

Medium
15

A developer is writing a prompt for Claude to classify support tickets into categories. They want to reduce ambiguous or inconsistent labels. Which TWO techniques should they apply? (Choose two.)

Medium
16

You are building a workflow where Claude must perform a multi-step task involving classification followed by summary. The model is failing to perform the summary after the classification. What is the most effective way to handle this?

Hard
17

A financial analyst is building a Claude-powered assistant that must extract the total amount due from scanned invoices. The invoices vary widely in layout and wording, and the extracted value is later used to trigger payments. The analyst wants to maximize accuracy and avoid plausible but incorrect numbers. Which prompting approach is most appropriate?

Medium
18

Your team is using a few-shot prompt to generate SQL queries from natural language questions. You notice that when you add a new example to the prompt, the model's performance on existing cases degrades. What is the most likely cause?

Hard
19

A developer is using the Messages API and wants Claude to adopt a strict persona as a compliance reviewer for every request in a long conversation, without repeating the persona instructions in each user turn. The persona must apply to all messages and should take precedence over casual instructions the user might add later. Where should the developer place these persona instructions?

Easy
20

You are designing a system prompt for an agent that reviews legal contracts. You notice that the model occasionally flags benign clauses as high-risk. You decide to add a section explaining that 'high-risk' means 'clauses that could lead to unlimited liability or loss of intellectual property ownership.' How does this specific context improve the model's performance?

Hard
21

You have developed a prompt that works perfectly on 50 test cases, but it fails when deployed to production because it cannot handle specific edge cases in real user data. What is the best way to improve your testing strategy?

Medium
22

You are building a customer support bot using Claude. Users frequently provide long, rambling narratives that dilute the core request. Which prompting strategy best ensures the model stays focused on the actionable request?

Medium
23

Which of the following describes the purpose of a 'system prompt' in the Anthropic ecosystem?

Easy
24

Your team is debugging a prompt where Claude is occasionally leaking internal instructions into its output. You used XML tags to structure the prompt. What is the most likely reason for this, and how should you fix it?

Medium
25

You are building a prompt template that requires a list of items to be processed. The number of items is dynamic, ranging from one to hundreds. What is the most reliable way to format this list in your template to ensure Claude processes every item accurately?

Medium
26

Which TWO techniques should you employ to optimize the performance of Claude 3.5 Sonnet when processing long, complex documents for extraction tasks?

Medium
27

A support-engineering team is designing a Claude prompt to triage incoming bug reports into one of five severity levels. They observe that when the report is ambiguous, Claude sometimes invents a justification for a severity that is not actually supported by the text. They want the prompt to make uncertainty explicit rather than forcing a confident label. Which TWO changes should they make to the prompt? (Choose two.)

Hard
28

A financial analyst is building a Claude-powered assistant that must extract line items from scanned invoices and return them as a JSON array. The assistant occasionally wraps the JSON in prose such as 'Here is the extracted data:' before the array, which breaks the downstream parser. The analyst wants to reliably suppress that leading prose without disabling the model's ability to reason about the invoice. Which approach is most appropriate?

Medium
29

A financial analyst uses Claude to summarize a 60-page quarterly earnings report. The prompt includes the full report between <document> tags and asks for a 200-word summary of key risks. Claude's summary frequently omits risks mentioned in the middle of the report. What is the most effective change to the prompt to improve recall of mid-document content?

Medium
30

A team is using Claude to generate SQL queries from natural-language questions against a complex schema. They want to improve correctness on multi-table joins. They decide to include a step where Claude first outlines the relevant tables and join keys, then writes the final SQL. Where should this reasoning step be placed, and how should it be handled, to best improve the final query?

Hard
31

You are writing a prompt for a tool that extracts specific invoice fields from raw text documents. The model occasionally populates the discount field with percentages even when instructions mention currency amounts. To fix this with clear and direct prompt instructions, what specific structural pattern should you implement?

Hard
32

An analytics team asks Claude to extract structured fields from messy invoice text. They provide three input/output examples inside <examples> tags, then the real invoice inside <invoice> tags. Accuracy is high on invoices that resemble the examples but drops sharply on unusual layouts. Which adjustment most directly improves generalization to the unusual layouts?

Hard
33

What is the primary benefit of using XML tags in your prompts when interacting with Claude?

Easy
34

You are writing a system prompt for a data extraction tool. The tool must extract shipment IDs from unstructured text. You want to ensure the model focuses only on the IDs and ignores surrounding marketing copy. What is the most effective way to phrase this instruction?

Medium
35

You are designing a system prompt for an agent that researches complex topics. You want to ensure the agent doesn't just synthesize information but also critiques its own findings for potential bias or gaps. How should you structure the prompt?

Hard
36

You are training a new team member on prompt design for Claude. They ask how to best handle a situation where the model keeps providing long, conversational introductions before answering a technical question. What advice should you provide?

Easy
37

You are migrating a legacy application to Claude 5.5. The old system relied on pre-filling the assistant response to force a specific output format. How should you redesign this for the current API?

Hard
38

An analyst is using Claude to answer questions over a 50,000-token legal contract. They notice that answers about clauses near the middle of the document are less accurate than those about the beginning or end. Which strategy best improves accuracy across the entire document?

Hard
39

A logistics company uses Claude to extract shipment details from scanned customs forms. The forms are supplied as raw OCR text that contains occasional garbled characters and spurious line breaks. The developer wants to reduce the number of fields Claude invents when a value is missing on the form. Which prompt structure change is most likely to achieve this?

Medium
40

You are building an application where Claude needs to act as a data classifier. You have a system prompt that works well, but you want to allow the model to occasionally receive updated operational instructions mid-conversation without needing to restart the entire session or clear the cache. Which feature should you use?

Easy
41

A developer is building a customer support assistant using Claude. The assistant must always respond in a friendly tone, never discuss competitors, and always ask for an order number when the user reports a shipping issue. The developer wants these rules to apply across all conversations with minimal per-request token cost. What is the most appropriate mechanism?

Hard
42

A developer is using Claude to summarize legal contracts. The contracts can be very long, sometimes exceeding 100,000 tokens. The developer wants to ensure that Claude focuses on the most relevant sections, such as indemnification and termination clauses, while ignoring boilerplate. Which approach is best for managing the context window and improving summary accuracy?

Medium
43

You are writing a system prompt for an agent that interacts with external APIs. You want to ensure the agent only uses the provided tools and does not try to perform unauthorized actions. How should you frame these instructions?

Medium
44

A team is designing a Claude prompt that must return a fixed JSON schema with fields "vendor", "amount", and "currency". They want the output to be reliably parseable by downstream code. Which TWO techniques best improve reliability of the structured output? (Choose two.)

Medium
45

You are building a prompt to generate technical reports. You want to ensure the report follows a specific hierarchy of sections. What is the most reliable way to guarantee the model uses the correct section headers?

Medium
46

Your team is building an application that formats customer support emails into structured JSON tickets. A developer suggests including detailed historical logs of all past customer support interactions from the last three years directly inside the system prompt to give Claude deep background context. Why is this practice discouraged for context engineering?

Easy
47

When engineering a prompt for a multimodal model like Claude 3.5 Sonnet that includes both text and images, what is the recommended way to handle the relationship between the two types of content?

Medium
48

You are building a prompt chain where the first step is to categorize text and the second step is to extract entities. You want to provide few-shot examples for both steps. How should you structure this?

Medium
49

Which of the following describes the primary purpose of 'System Prompts' in the Anthropic API?

Easy
50

Which of the following describes the 'few-shot' prompting technique in the context of Claude?

Easy
51

An engineer is building a tool to convert natural language into SQL queries using Claude. They find that the model occasionally generates conversational text like 'Sure, here is your query:' which breaks the automated pipeline. What is the most effective way to ensure Claude only returns the raw SQL code?

Medium
52

Your team is developing an agentic workflow that analyzes complex technical logs to identify security anomalies. You notice the model often jumps to conclusions without considering all log entries. Which approach most effectively encourages the model to evaluate the data thoroughly before providing a final diagnostic conclusion?

Easy
53

A support team is building a Claude-powered assistant that answers questions using a 200-page employee handbook. They place the entire handbook inside <handbook> tags in the system prompt and the user's question at the end of the user turn. Testing shows Claude sometimes ignores details buried in the middle of the handbook. Which change best addresses this while keeping the same model and context window?

Medium
54

You are building a template engine where users can insert multi-line code snippets into a prompt for code review. Occasionally, users include closing XML tags within their code snippets that match your prompt template delimiters, causing parsing errors. How should you handle template variables containing arbitrary text?

Medium
55

A team is building a pipeline where Claude must extract structured fields from invoices. They provide several examples of input and expected output in the prompt. The model performs well on formats similar to the examples but fails on a new invoice layout. Which adjustment best addresses this?

Hard
56

A developer is building a customer support assistant using Claude. The assistant must answer questions based on a knowledge base of product manuals. The developer wants to minimize hallucinations and ensure responses are grounded in the provided documents. Which TWO strategies should the developer implement? (Choose two.)

Hard
57

You have a system prompt that encourages a 'concise and professional' tone. However, Claude is occasionally being overly verbose when users ask simple questions. Which modification is most effective?

Medium
58

You are building a prompt chain to summarize complex legal text. In the first step, you ask Claude to extract key clauses. In the second step, you summarize these clauses. Why should you provide the 'reason' for the extraction in the first step's prompt?

Medium
59

Your team is developing an automated evaluation pipeline to score thousands of Claude-generated customer support responses. You decide to use a mix of custom assertions written in code and an LLM judge. What is the primary advantage of combining code-based assertions with an LLM judge when evaluating prompt quality at scale?

Medium
60

Your team is developing an agentic workflow that extracts project requirements from long, complex documents. You want to ensure the model's structured output remains consistent across multiple turns. What is the most effective way to maintain this structure?

Medium
61

Which TWO parameters primarily control the randomness and diversity of Claude's output during the generation process?

Medium
62

You are debugging a prompt where Claude frequently fails to follow a complex, multi-part rule set. What is the most effective way to troubleshoot this?

Hard
63

A developer wants Claude to always respond in a concise, bulleted format for a customer-facing chatbot. They want the behavior to apply across all user turns without repeating the instruction each time. Which approach is most appropriate?

Easy
64

Your team is designing a prompt chain where Claude must first categorize an email and then draft a response. You want to ensure the second step always knows the category determined by the first. Why is passing the category as a structured variable preferred over relying on Claude's memory?

Easy
65

When building a customer support bot, you want to ensure Claude doesn't reveal its internal instructions or the system prompt to users. Which technique is most appropriate?

Medium
66

Your team is using an LLM judge to evaluate the quality of responses from a customer support bot. You notice that the judge consistently gives higher scores to longer, more verbose responses, even when they are less accurate. How should you adjust your evaluation strategy?

Hard
67

Your team has developed a custom evaluation script to test a new prompt. You notice that when you run the test 10 times on the same input, the output varies significantly. What is the most likely reason for this variability in the context of current model versions?

Easy
68

When designing a prompt to handle sensitive user data, which THREE of the following practices should be prioritized for security and compliance?

Hard
69

Refer to the exhibit. You are receiving this error in your Python integration. What is the likely cause of this issue?

Medium
70

A company wants to minimize 'hallucinations' when Claude answers questions based on a large internal wiki. Which TWO prompting strategies are recommended to keep the model grounded in the provided text?

Hard
71

Refer to the exhibit. A developer is testing this API request to optimize their analysis tool. Why will this specific request fail to provide the intended performance benefits of prompt caching?

Hard
72

You are writing a system prompt for a chatbot that assists users with medical benefits. The chatbot must only use the provided policy document. You have implemented an instruction to quote the policy. Why is it still beneficial to add an explicit instruction to say 'I don't know'?

Hard
73

A support team wants Claude to classify incoming tickets into exactly one of five categories and to always return the result as a JSON object with keys category and confidence. The developer has already written clear category definitions. Which additional step most directly improves the reliability of the JSON output?

Easy
74

Your team uses a template engine to assemble prompts. You are concerned that reordering the variables in your template might affect performance. Why is this a concern in the context of the Anthropic API?

Hard
75

A fintech developer builds an assistant that answers questions about account activity. The system prompt currently says: 'You are a helpful banking assistant. Use the provided account data to answer questions.' Testing shows Claude sometimes answers general banking questions from its own knowledge rather than from the supplied data, and occasionally states figures that are not in the data at all. Which revision to the system prompt best addresses both problems?

Hard
76

A developer on your engineering team is designing a prompt template that includes few-shot examples alongside reference documents and user queries. They place the examples after the user query and use markdown bullet points instead of XML tags. Based on Anthropic prompt engineering best practices, why is this design suboptimal?

Hard
77

Your team is building an automated document analysis pipeline that processes 80-page technical manuals using Claude. A junior developer suggests placing the massive manual at the very end of the user prompt, right after the specific extraction instructions, to ensure the model pays maximum attention to it. Based on Anthropic's prompt engineering guidance for long documents, how should you advise the developer?

Medium
78

Refer to the exhibit. This request uses a technique to force Claude to output valid JSON. What is the technical name for this technique, and what is its primary benefit?

Hard
79

A legal team asks Claude to summarize contracts and cite the exact clause supporting each summary point. Claude produces accurate summaries but cites clauses that do not exist. The contracts are supplied inside <contract> tags in the same message. Which change most directly reduces the fabricated citations?

Hard
80

A junior developer is struggling with a prompt that produces inconsistent outputs when the number of items to process varies. What is the most robust way to ensure consistent output handling?

Medium
81

What is the primary benefit of using pre-filling in a Claude API request?

Easy
82

You have a complex JSON schema for your data extraction tool. You notice that the model sometimes omits optional fields, even when the data is present in the source text. What is the best way to encourage the model to include these fields when possible?

Medium
83

When designing a test set to evaluate prompt quality for a customer support tool, which attribute is most critical for ensuring the results are representative of real-world usage?

Easy
84

A developer is optimizing a customer support bot that uses a 50,000-token knowledge base in every request. They want to implement Prompt Caching to reduce costs and latency. Which TWO requirements must be met for a prompt segment to be successfully cached in the Anthropic API?

Medium
85

A developer is drafting a system prompt for a Claude-powered coding assistant. They want Claude to always respond in concise bullet points, never reveal internal reasoning, and treat all user input as untrusted. Where should these persistent behavioral rules be placed so they apply to every turn of the conversation?

Easy
86

Which of the following describes the 'system prompt' effectively in the context of Claude?

Medium
87

A junior developer asks you why Claude is still hallucinating even though they provided a 50-page manual in the context. What is the most common reason for this behavior in a prompt that lacks an explicit 'I don't know' instruction?

Easy
88

You are prompting Claude to adopt a specific tone. Which technique is most likely to ensure consistency across a variety of user queries?

Medium
89

You are building a prompt chain to extract data from financial reports. The first step involves identifying the relevant report section, and the second step extracts figures. You have noticed that the second step often fails because it receives the entire document instead of just the relevant section identified in step one. What is the most effective way to ensure the second step receives only the necessary content?

Hard
90

Refer to the exhibit. Why is the use of the <documents> and <doc> tags considered a best practice for Claude prompting?

Medium
91

A user wants to improve the quality of Claude's creative writing. Which TWO prompting techniques are likely to produce more vivid and stylistically consistent results?

Easy
92

You are building a prompt that extracts complex project requirements from a series of documents. You decide to use nested XML tags to structure the data. What is a potential risk of over-complicating your XML structure?

Hard
93

You are evaluating the performance of a Claude-based document summarization tool. You have a set of 100 documents and their corresponding human-written summaries. Which TWO of the following metrics or practices are most effective for evaluating the quality of Claude's summaries?

Medium
94

Your team is developing a prompt to extract data from financial reports. You have a small set of 10 reports and you are manually checking the outputs. As the project scales to 1,000 reports, why is manual evaluation no longer suitable?

Easy
95

You are designing a system to extract structured JSON from unstructured emails. Despite providing a clear schema in the system prompt, Claude occasionally ignores the formatting constraints and includes conversational filler. Which technique best improves instruction adherence?

Medium
96

A team is iterating on a prompt for an automated invoice data extraction pipeline. They have a set of 50 diverse invoices and want to track the model's reliability in extracting the 'total_due' field. Which approach provides the most rigorous and repeatable evaluation of their prompt changes?

Medium
97

A developer is optimizing a RAG (Retrieval-Augmented Generation) pipeline using Claude 3.5 Sonnet. Which TWO techniques will most significantly improve the model's ability to extract accurate information from a 50,000-token context window?

Hard
98

Your organization builds automated workflows where prompts are assembled from modular template components stored in a database. You notice that minor whitespace differences introduced by the template assembler are occasionally causing cache misses. What architectural adjustment should you make to ensure consistent prompt caching behavior?

Hard
99

You are designing a prompt chain where the output of step one (a summary) is used as the input for step two (a translation). If the summary step fails to provide a useful output, what is the best way to handle this in your application code?

Easy
100

A legal-tech startup uses Claude to summarize deposition transcripts that are frequently 80,000 to 120,000 tokens long. Early tests show the model sometimes ignores instructions placed near the top of the prompt and produces summaries that omit late sections of the transcript. Which TWO prompt-engineering changes should the developer make to improve instruction adherence across the full context? (Choose two.)

Hard
101

You are providing Claude with a 100,000-token technical manual and asking it to troubleshoot a specific error code. Where should the troubleshooting instructions and the specific error code be placed for the best results?

Medium
102

Your team is building a sentiment analysis tool that processes user reviews. You have noticed that when multiple reviews are provided in a single prompt, Claude occasionally confuses the sentiment of one review with another. How should you structure the prompt to prevent this cross-contamination?

Medium
103

A developer is creating a template for generating project reports. They want to ensure Claude maintains a consistent structure by injecting dynamic variables, such as 'ProjectName' and 'Budget', into the prompt. Given that the API is stateless, what is the best practice for handling these variables before sending the request to Claude?

Medium
104

Refer to the exhibit. The developer notices the model often hallucinates data not present in the <data> tags. Which adjustment is most likely to mitigate this behavior?

Hard
105

You are building a tool that extracts invoice totals. The model occasionally adds currency symbols or notes, causing your `float()` conversion to fail. How should you fix this without using prefill?

Medium
106

A data scientist is using Claude to classify customer feedback into categories: 'bug', 'feature request', 'complaint', or 'praise'. The feedback is often short and informal. The data scientist wants to maximize classification accuracy. Which prompting strategy is most effective?

Hard
107

An enterprise application dynamically assembles system prompts by combining a core enterprise compliance policy with department-specific rules injected via a template. The department rules change weekly, while the core policy changes monthly. How should you structure this template hierarchy to maximize cache efficiency?

Hard
108

A user wants Claude to provide a response in Markdown format with specific headers. Which approach is best for achieving this consistently?

Easy
109

Refer to the exhibit. Why might the model struggle to answer the final question if you are not using a stateful chat implementation?

Medium
110

When creating a system prompt for a multi-step agentic workflow, why is it better to define the agent's role rather than just listing specific tasks?

Medium
111

Refer to the exhibit. When using 'tool_choice': {'type': 'auto'}, how does Claude determine whether to use the 'get_stock_price' tool?

Hard
112

A marketing team wants Claude to generate blog posts that strictly adhere to a specific brand voice. They find that the model occasionally deviates into a generic tone. Which strategy is most effective for ensuring consistent adherence to the brand voice?

Medium
113

You are building a customer support bot and want to use few-shot examples to guide its tone. You find that the model occasionally reverts to a generic tone even when examples are provided. What is the most likely reason for this?

Medium
114

A product manager is drafting a system prompt for a customer-facing Claude assistant. They want the assistant to maintain a professional tone, avoid discussing competitors, and always end responses with a link to the help center. They also want to allow users to override the tone for casual conversations. Which statement about system prompts best guides this design?

Medium
115

When using Claude as a tool-calling engine, what is the best strategy to handle scenarios where the model needs to call multiple tools in sequence?

Hard
116

You are building an application using Claude to extract structured data from messy user emails. The model occasionally ignores your schema constraints when the input text is ambiguous. Which strategy most effectively ensures strict adherence to the requested format?

Medium
117

A support team wants Claude to classify incoming customer emails into one of five categories: Billing, Technical, Account, Feature Request, or Other. The team needs consistent, machine-readable output that a downstream script can parse reliably. Which prompt design best meets this requirement?

Easy
118

A developer is building a Claude-based assistant that must answer questions about a 90,000-token product manual. The manual is provided in the prompt on every request. The developer wants to improve answer accuracy and reduce the chance of the model overlooking relevant sections. Which TWO techniques are most appropriate? (Choose two.)

Medium
119

What is the primary purpose of a 'System Prompt' in the Anthropic Claude API?

Easy
120

A product team drafts a system prompt for a customer-facing assistant. The draft is 4,000 words and mixes persona description, tone guidance, formatting rules, escalation policy, and several anecdotes about past incidents. Reviewers find that Claude follows the formatting rules but frequently ignores the escalation policy. Which change best improves adherence to the escalation policy?

Medium
121

Your team is evaluating a prompt for extracting data from technical manuals. You have discovered that the model often ignores specific sections of the manual when the content is very long. Which evaluation strategy best helps you identify the extent of this 'lost in the middle' phenomenon?

Medium
122

A junior developer asks why they should use few-shot examples in their Claude prompt for a document classification task. What is the most accurate explanation for the benefit of this technique?

Easy

Frequently asked questions

What does the Prompting and Context Engineering domain cover on the CCAO-F exam?
Candidates must design prompts that reliably control Claude's output format and leverage long-context placement. The single most important thing is to put instructions and queries after the long document, and to use prefilling or XML tags to enforce structure.
How many questions are in this domain?
This page lists all 122 Prompting and Context Engineering questions in the CCAO-F question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only Prompting and Context Engineering questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
Claude Certified Associate CCAO-F Prompting and Context Engineering Practice Questions