ΙΙAdvanced

Advanced Prompt Engineering

System prompts, chain-of-thought, and structured outputs - master the art of crafting prompts that unlock deeper responses.

XXVIII · VII · MMXXVI12 min read
Guide Angel Journal

Advanced Prompt Engineering

You've mastered the basics. Now it's time to unlock Claude's full potential with advanced prompting techniques that produce consistently excellent results.

The Anatomy of a Perfect Prompt

Every great prompt contains four elements:

  1. Role - Who should Claude be?
  2. Context - What's the situation?
  3. Task - What exactly do you need?
  4. Constraints - What are the boundaries?
Role: You are a senior data analyst at a fintech company.
Context: We have quarterly revenue data for 2024-2026.
Task: Identify the top 3 growth trends and explain their significance.
Constraints: Keep the analysis under 500 words. Use plain language 
that non-technical stakeholders can understand.

System Prompts: Setting the Stage

System prompts define Claude's behavior for an entire conversation. They're incredibly powerful for creating consistent, specialized assistants.

The Expert Consultant

You are a brand strategist with 20 years of experience working 
with Fortune 500 companies. You think in frameworks and always 
back your recommendations with reasoning. When you don't know 
something, you say so and suggest how to find the answer.

The Code Reviewer

You are a meticulous code reviewer. For every piece of code:
1. First, explain what the code does
2. Identify potential bugs or edge cases
3. Suggest performance improvements
4. Rate the code quality (1-10) with justification
Always show corrected code, not just descriptions of changes.

Chain-of-Thought Prompting

For complex reasoning tasks, explicitly ask Claude to show its work:

Solve this step by step, showing your reasoning at each stage:

A company has 120 employees. 40% work remotely. Of the remote 
workers, 75% are in different time zones. How many employees 
are in different time zones, and what percentage is that of 
the total workforce?

When to Use Chain-of-Thought

  • Mathematical problems
  • Logical reasoning
  • Multi-step analysis
  • Decision-making with multiple factors
  • Debugging complex code

Structured Output Techniques

JSON Responses

Analyze this customer review and respond with JSON:
{
  "sentiment": "positive/negative/neutral",
  "key_topics": ["array", "of", "topics"],
  "urgency": 1-5,
  "suggested_action": "string",
  "confidence": 0.0-1.0
}

Markdown Tables

Compare these three project management tools in a markdown table 
with columns: Feature, Tool A, Tool B, Tool C, Winner.
Include at least 8 features.

Few-Shot Prompting

Show Claude exactly what you want by providing examples:

Convert these informal notes into professional action items:

Note: "talked to sarah about the website, she thinks we need 
better images"
Action Item: [Website] Source high-quality images for homepage 
redesign. Owner: Sarah. Priority: Medium.

Note: "server went down again last night, john is looking into it"
Action Item: [Infrastructure] Investigate recurring server 
downtime and implement monitoring. Owner: John. Priority: High.

Now convert this note:
"marketing wants to redo the newsletter, budget might be an issue"

Meta-Prompting

Ask Claude to help you write better prompts:

I want to use Claude to help me write better product descriptions 
for my e-commerce store. What would be the ideal prompt to get 
consistent, high-quality descriptions? Include a system prompt 
and an example user prompt.

Common Advanced Patterns

The Contrarian Check

I believe [X]. Play devil's advocate and give me the strongest 
possible arguments against this position.

The Expert Panel

Analyze this business decision from three perspectives:
1. A risk-averse CFO
2. An innovative CTO  
3. A customer-focused CMO
Then synthesize their views into a recommendation.

The Iterative Refinement

Write a tagline for my coffee shop. Give me 10 options.
[After response]
Options 3, 7, and 9 are closest. Combine the best elements 
of those three into 5 new options.

Measuring Prompt Quality

A great prompt should produce:

  • Consistent results - similar quality every time
  • Relevant output - directly addresses your need
  • Appropriate depth - neither too shallow nor too verbose
  • Actionable content - you can use it immediately

The best prompt engineers aren't the ones who know the most tricks - they're the ones who communicate most clearly.