Skip to content

CCAR-P · Domain 2: Claude Models, Prompting, and Context Engineering · 13% of the exam

Task 2.2: System Prompt Diagnosis and Revision

Finding what a system prompt leaves unsaid when output drifts or varies, and choosing the revision that fixes scope, format and behaviour without forbidding the variation users need.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.

Question 1 · choose 1

A product team prototyped its research assistant in claude.ai, where answers were factual, balanced and aware of Anthropic's current products. The production app calls the Messages API with the same model and a one-line system prompt: "You are the Acme research assistant." Answers are now inconsistent in tone and scope, and some give outdated product details. What is the underspecification, and what should the team do?

  1. AThe app calls a different model version than claude.ai does; pin the API calls to the version claude.ai shows
  2. Bclaude.ai's system prompt doesn't reach API calls; state the role, context and behaviour in your own system prompt
  3. CThe system prompt is too short to matter; move the same sentence into each user turn so that Claude sees it every time
  4. DAnthropic updates the system prompt periodically; wait for the next update, which brings the API app the same behaviour
Show the answer and why
  • AThe app calls a different model version than claude.ai does; pin the API calls to the version claude.ai shows

    Incorrect

    The behaviour the team saw came from claude.ai's system prompt, which doesn't apply to API calls on any model version.

  • Bclaude.ai's system prompt doesn't reach API calls; state the role, context and behaviour in your own system prompt

    Correct

    claude.ai's system prompt supplies current information and behaviours that an API app must state for itself.

  • CThe system prompt is too short to matter; move the same sentence into each user turn so that Claude sees it every time

    Incorrect

    Repeating one line adds no context; the missing role, context and behaviours are still unstated.

  • DAnthropic updates the system prompt periodically; wait for the next update, which brings the API app the same behaviour

    Incorrect

    Anthropic's system prompt updates apply to claude.ai and the apps; they don't apply to the Claude API.

claude.ai, the desktop apps and the mobile apps start every conversation with a system prompt that gives Claude up-to-date information, such as Anthropic's current models and products, and encourages behaviours such as discussing topics factually and objectively. Those updates do not apply to the Claude API. An API app has to supply its own context: treat Claude like a brilliant but new employee and state the role, context and behaviour you want in the system prompt.

Question 2 · choose 1

A fully unattended migration agent runs on Claude Opus 5.5. It kept stopping mid-task after turns that ended with a status summary and no tool call, so the team appended the last line below to its system prompt:You are the migration agent for the payments monorepo. Work through every item in MIGRATION_PLAN.md and update its checklist. Keep going no matter what until every item is done. Never stop to report or ask.Early stops are rarer now, but the agent also ran an irreversible data backfill without the confirmation step the team relies on, and it pressed on through a credentials blocker it could not resolve. Which revision of the last line fits the prompting guidance for this model?

  1. AName the early stops to avoid, such as a closing summary that only announces the next step, name the stops that are wanted, and keep confirmation for risky or irreversible actions
  2. BKeep the line, but add it to the system prompt only after the agent's first early stop in each session, so that it doesn't affect normal turns
  3. CRemove the line and have the harness treat every turn that ends with end_turn as the end of the task, so that the loop finishes cleanly
  4. DReplace the line with an instruction to write out its full reasoning in each reply, so that the harness can see why the agent stops
Show the answer and why
  • AName the early stops to avoid, such as a closing summary that only announces the next step, name the stops that are wanted, and keep confirmation for risky or irreversible actions

    Correct

    The model responds to instructions that name the specific early stops, and the guidance keeps wanted stops and confirmations.

  • BKeep the line, but add it to the system prompt only after the agent's first early stop in each session, so that it doesn't affect normal turns

    Incorrect

    The guidance adds the instruction at the end of the system prompt from the first request of the session, not after an early stop.

  • CRemove the line and have the harness treat every turn that ends with end_turn as the end of the task, so that the loop finishes cleanly

    Incorrect

    On this model a text-only end of turn can be a progress report; treat it as a report, not as proof the task is done.

  • DReplace the line with an instruction to write out its full reasoning in each reply, so that the harness can see why the agent stops

    Incorrect

    Prompts that push the model to reproduce its reasoning in the response might be declined with the reasoning_extraction category.

On long tasks Claude Opus 5.5 posts progress updates, and some end the turn with text. The guidance is to name the kinds of early stop you want avoided and the stops you do want, such as when nothing can move without the user or a blocker is deliberately protected, and to keep your own confirmation step for risky or irreversible actions. Add the instruction to the system prompt from the first request, and treat a text-only end of turn as a report.

Question 3 · choose 1

A coding agent built on one of Claude's latest models leaves helper scripts and test files in the repository after each task. A reviewer proposes adding "Do not create any new files" to the system prompt. Which revision does Anthropic's prompting guidance suggest instead?

  1. AKeep scratch files allowed and have Claude delete the temporary ones it made when the task ends
  2. BAdd the reviewer's line, since helper files never improve the result of an agentic coding task
  3. CGive Claude a role as a senior engineer, so that it writes final code without trying ideas first
  4. DRemove the Write tool, so that Claude can edit only the files that already exist in the repository
Show the answer and why
  • AKeep scratch files allowed and have Claude delete the temporary ones it made when the task ends

    Correct

    The guidance's sample prompt asks Claude to remove temporary files, scripts and helper files at the end of the task.

  • BAdd the reviewer's line, since helper files never improve the result of an agentic coding task

    Incorrect

    The guidance says temporary files used as a scratchpad can improve outcomes, particularly for agentic coding.

  • CGive Claude a role as a senior engineer, so that it writes final code without trying ideas first

    Incorrect

    The documented fix for leftover files is a cleanup instruction; trying ideas in temporary files can help the result.

  • DRemove the Write tool, so that Claude can edit only the files that already exist in the repository

    Incorrect

    It gives up the temporary-file scratchpad that the guidance says can improve agentic coding outcomes.

Anthropic's prompting guidance notes that Claude's latest models might create new files, especially Python scripts, as a temporary scratchpad while they work, and that this can improve outcomes for agentic coding. To leave fewer files behind, it suggests instructing Claude to clean up after itself: remove any temporary files, scripts or helper files at the end of the task. A blanket ban constrains away behaviour that helps the work.

Practice domain 2 →Practice all domains →