System Prompt Diagnosis and Revision: Worked Example — Claude Models, Prompting, and Context Engineering (Claude Certified Architect - Professional)
System Prompt Diagnosis and Revision: A Worked Example In the Claude Certified Architect - Professional exam, one key skill is diagnosing...
System Prompt Diagnosis and Revision: A Worked Example
In the Claude Certified Architect - Professional exam, one key skill is diagnosing underspecified system prompts that cause degraded or inconsistent output, then revising them to constrain scope, format, and behaviour without over-constraining legitimate variation. This worked example walks through a realistic scenario illustrating this process.
Scenario Description
An enterprise AI assistant built on Claude is producing inconsistent responses when asked to summarise customer support tickets. The system prompt currently reads:
"You are a helpful assistant. Summarise the following customer support ticket."
Observed issues include:
Summaries vary widely in length and detail.
Some responses include irrelevant information or opinions.
Formatting is inconsistent, making downstream processing difficult.
The architect must diagnose the underspecification causing these issues and revise the system prompt to improve consistency and relevance without stifling useful variation.
Step 1: Diagnose Underspecification in the System Prompt
The current prompt is minimal and lacks explicit guidance on:
Scope: What information to include or exclude in the summary.
Format: Whether the summary should be bullet points, paragraphs, or structured data.
Behaviour: Tone, length constraints, or style preferences.
This underspecification leads Claude to interpret the task variably, causing inconsistent output.
Step 2: Define Constraints to Address Underspecification
To improve output consistency, the architect decides to:
Scope: Summarise only key customer issues and resolutions, excluding irrelevant details or opinions.
Format: Provide a concise bullet-point list.
Behaviour: Use a neutral, professional tone with a maximum of five bullet points.
Step 3: Revise the System Prompt
The revised prompt is:
"You are a helpful assistant. Summarise the following customer support ticket by listing up to five key points that describe the customer's issue and the resolution provided. Use concise bullet points in a neutral, professional tone. Do not include opinions or irrelevant information."
Step 4: Validate the Revision
This revision explicitly constrains scope, format, and behaviour without over-constraining legitimate variation. It guides Claude to produce consistent, structured summaries suitable for downstream processing.
Step 5: Consider Token Cost and Prompt Efficiency
The revised prompt remains concise to avoid unnecessary token cost. It balances clarity with brevity, ensuring efficient use of the token budget.
Step 6: Monitor and Iterate
After deployment, the architect should monitor output quality and consistency, iterating the prompt if new issues arise or requirements change.
Summary
This worked example demonstrates diagnosing an underspecified system prompt by identifying missing constraints on scope, format, and behaviour, then revising it to improve output consistency without over-constraining. This approach aligns with exam domain 2 requirements for the Claude Certified Architect - Professional certification.