Dr Alex Young ⚡️ Profile picture
Oct 7 14 tweets 5 min read Read on X
I went through every prompt in Anthropic’s library.

Let’s just say it makes every $300 “prompt course” online look like kindergarten.

Here’s what the pros actually do 👇
First discovery: they're obsessed with XML tags.

Not markdown. Not JSON formatting. XML.

Why? Because Claude was trained to recognize structure through tags, not just content.

Look at how Anthropic writes prompts vs how everyone else does it:

Everyone else:

You are a legal analyst. Analyze this contract and identify risks.

Anthropic's way:

Legal analyst with 15 years of M&A experience


Analyze the following contract for potential legal risks



- Focus on liability clauses
- Flag ambiguous termination language
- Note jurisdiction conflicts


The difference? Claude can parse the structure before processing content. It knows exactly what each piece of information represents.Image
Second pattern: they separate thinking from output.

Most prompts mix everything together. Anthropic isolates the reasoning process.

Standard prompt:

Analyze this data and create a report.

Anthropic's structure:


First, analyze the data following these steps:
1. Identify trends
2. Note anomalies
3. Calculate key metrics



Then create a report with:
- Executive summary (3 sentences)
- Key findings (bullet points)
- Recommendations (numbered list)


This forces Claude to think before writing. The outputs are dramatically more structured and accurate.

I tested this on 50 prompts. Accuracy jumped from 73% to 91%.Image
Third technique: role definition goes way deeper than "you are an expert."

Anthropic specifies expertise granularly.

Weak role definition:

You are a software engineer.

Anthropic's method:


Senior backend engineer with expertise in:
- Distributed systems architecture
- Python/FastAPI frameworks
- PostgreSQL optimization
- Redis caching strategies

You write production-grade code that prioritizes:
1. Performance (sub-100ms response times)
2. Maintainability (clear naming, documentation)
3. Security (input validation, SQL injection prevention)


The specificity matters. Claude adjusts its knowledge retrieval based on expertise depth.

Generic roles = generic outputs. Specific roles = specialist-level responses.Image
Fourth pattern: examples are structured as complete documents, not fragments.

Most people do this:

Example: The cat sat on the mat.

Anthropic does this:



Translate "The cat sat on the mat" to French



- "The cat" = "Le chat"
- "sat" = past tense of "s'asseoir" = "s'est assis"
- "on the mat" = "sur le tapis"



Le chat s'est assis sur le tapis.



This shows Claude the complete reasoning path, not just input/output pairs.

Few-shot prompting jumps from ~60% to ~85% effectiveness with this structure.
Fifth discovery: they use thinking tags for complex reasoning.

When the task requires multi-step logic, Anthropic explicitly asks Claude to show its work.


Before answering, wrap your reasoning in tags.
Include:
- Assumptions you're making
- Alternative interpretations considered
- Potential edge cases
- Confidence level in your conclusion

Then provide your final answer in tags.


This is basically Chain-of-Thought, but formalized into the prompt structure.

For reasoning tasks (math, logic, analysis), this improved accuracy by 34% in my tests.
Sixth technique: constraint specification using negative examples.
Don't just say what you want. Say what you don't want.

Standard approach:

Write a professional email.

Anthropic's method:


Write a professional email that:
- Is concise (under 150 words)
- Has a clear call-to-action
- Uses active voice

Do NOT:
- Use corporate jargon ("synergy," "leverage," "circle back")
- Include multiple requests in one email
- End with "let me know if you have questions"


The negative constraints are just as important as positive ones.

Claude learns boundaries, not just targets.
Seventh pattern: output format specification at surgical precision.

Anthropic doesn't say "give me a summary." They define exact structure.


Provide your response as:

[Title: Max 8 words]

Key Insight: [One sentence, under 20 words]

Analysis:

- Point 1: [Evidence]
- Point 2: [Evidence]
- Point 3: [Evidence]

Recommendation: [One specific action item]

Confidence: [Low/Medium/High] because [brief reason]


This eliminates 90% of formatting inconsistency.

You get exactly what you ask for, every single time.
Eighth technique: they use document tags for multi-file context.

When working with multiple sources, Anthropic wraps each in document tags.


Q4 2024 Financial Report

Revenue: $45M
Growth: 23% YoY
[...]




Q3 2024 Financial Report

Revenue: $38M
Growth: 19% YoY
[...]




Compare Q3 and Q4 performance. Reference documents by index.


This prevents Claude from mixing up sources or hallucinating attribution.
It can cite exactly: "According to document 1..."
Ninth discovery: error handling is built into prompts.

Anthropic anticipates edge cases and tells Claude how to handle them.


If the input data is:
- Incomplete: State what's missing and make reasonable assumptions
- Contradictory: Identify the contradiction and ask for clarification
- Outside your knowledge: Say "I don't have reliable information about X" (never make up facts)
- Ambiguous: Interpret both ways and note the ambiguity


This prevents hallucination and creates graceful failure modes.

Claude admits limitations instead of confidently bullshitting.
Tenth pattern: they use prefilled assistant responses.

This is the most underrated technique in the entire library.

Instead of just sending a prompt, Anthropic starts Claude's response.
API structure:

{
"messages": [
{"role": "user", "content": "Analyze this contract"},
{"role": "assistant", "content": "\nKey risks identified:\n1. "}
]
}

Claude continues from where you left off. This forces specific formatting and eliminates preamble.

No more "I'd be happy to help!" fluff. Just direct, structured output.
How to implement this in your workflow:

Step 1: Stop writing prompts from scratch

Use the 10 templates above as starting points
Customize the sections for your use case
Keep the XML structure intact

Step 2: Build a prompt library

Save your best-performing prompts
Tag them by use case
Version them (track what works)

Step 3: Layer in examples

Use the structure from thread 5
Show complete reasoning paths
Include edge cases

Step 4: Test and iterate

Compare structured vs unstructured
Measure accuracy, consistency, speed
Refine based on results

Step 5: Scale what works

Productionize your best prompts
Create templates for your team
Build systems, not one-offs
The meta-lesson from reverse-engineering Anthropic's library:
Prompt engineering isn't about clever tricks.

It's about clear communication of:

WHO should respond (role)
WHAT they should do (task)
HOW they should do it (process)
WHAT format to use (structure)
WHAT to avoid (constraints)

The XML tags are just the delivery mechanism for that clarity.

You could achieve similar results with markdown, JSON, or even plain text if you maintain the same level of specificity and structure.

But XML works because it's what Claude was trained on.

Use the tool's native language. Don't fight the architecture.
I built something you don't want to miss out...

Here it is:

We built ClipYard for ruthless performance marketers.

→ Better ROAS
→ 10x faster content ops
→ Full creative control

You’ve never seen AI avatars like this before → clipyard.ai

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dr Alex Young ⚡️

Dr Alex Young ⚡️ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @AlexanderFYoung

Oct 2
AI agents humbled me.

I blamed the model.
I blamed OpenAI.
I blamed everything… except my prompts.

6 months later, I finally cracked it.

here’s how to build agents that actually work: Image
1. The Golden Rule of JSON Prompting:

Never assume the model knows what you want.

Bad prompt:

```
"Return a JSON with user info"
```

Good prompt:

```
Return a JSON object with exactly these fields:
{
"name": "string - full name",
"email": "string - valid email address",
"age": "number - integer between 18-100"
}
```

Specificity kills ambiguity.
2. Schema First, Always

Define your schema before writing prompts. Use this template:

```
json
{
"field_name": "type - description with constraints",
"status": "enum - one of: pending|completed|failed",
"confidence": "number - float between 0.0 and 1.0",
"metadata": "object - optional additional data"
}
```
Your agents need blueprints, not guesswork.
Read 14 tweets
Sep 25
I went from trash Claude outputs to mind-blowing results in 48 hours.

The difference? I stopped treating Claude like ChatGPT and started speaking its native language.

XML isn't just formatting. It's Claude's actual reasoning framework.

Here's the system I reverse-engineered: Image
XML tags work because Claude was trained on tons of structured data.

When you wrap instructions in <tags>, Claude treats them as separate, weighted components instead of one messy blob.

Think of it like giving Claude a filing system for your request.
Basic structure that changes everything:

XML:

You are an expert data analyst


Analyze this dataset and find the top 3 insights



This is quarterly sales data from a SaaS company



- Insight 1: [finding]
- Insight 2: [finding]
- Insight 3: [finding]


vs

General prompt:

"Analyze this data and give me insights"
Read 12 tweets
Sep 22
Everyone's still buying Udemy courses and watching 3-hour YouTube tutorials.

Meanwhile I'm using AI as a personal tutor and learning 10x faster.

Here are 5 prompts that will change how you learn anything:
Traditional learning is broken. Courses are too slow. YouTube is scattered. Books are outdated.

LLMs are different. They adapt to YOUR pace, YOUR questions, YOUR learning style.

It's like having a genius tutor available 24/7.
1. The Skill Breakdown

Prompt:

"I want to learn [skill]. Break this down into 5 progressive levels from beginner to advanced. For each level, tell me:

Core concepts to master
Practical exercises to try
How I'll know I'm ready for the next level
Estimated time to complete

Make it actionable, not theoretical."
Read 15 tweets
Sep 15
If you’re building a startup, stop scrolling.

This thread will make you dangerous.

10 prompts → idea validation, MVP, GTM, competitor analysis, and more:
1. Validate your SaaS idea

Most ideas fail because they solve the wrong problem.

Prompt:

“You are a startup strategist.
Validate this SaaS idea by identifying the core problem, target audience, urgency level, and willingness to pay.”
→ [Insert your idea]
2. Define your ideal customer

You need to know who you’re building for - not just what.

Prompt:

“Create 3 ideal customer profiles (ICPs) for this SaaS product.
Include job title, industry, daily pain points, and buying behavior.”
Read 14 tweets
Sep 15
If you want to build n8n agents, you don’t need to overcomplicate it.

After building 47 with n8n and Claude, I’ve found 3 prompts that make the process simple and repeatable:

(Steal these prompts) 👇
1. The Blueprint Maker

"I want to build an AI agent that [your specific goal]. Using N8N as the workflow engine and Claude as the AI brain, give me:

- Exact workflow structure
- Required nodes and connections
- API endpoints I'll need
- Data flow between each step
- Potential failure points and how to handle them

Be specific. No generic advice."
This prompt forces Claude to think like an engineer, not a content creator. You get actionable steps, not theory.

I use this for every new agent idea. Takes 2 minutes, saves 2 weeks of trial and error.
Read 9 tweets
Sep 11
Omg…

ChatGPT just generated startup ideas that made me want to quit my job.

Here’s the exact prompt I used:
Here’s the exact mega prompt we use:

"You are a world-class entrepreneur, market analyst, and product strategist.
Your task is to generate 10 startup ideas based on my input.

For each idea, include:

– A 1-sentence elevator pitch
– Target user or customer segment
– Key pain point it solves
– Monetization method
– Unique angle or moat

Make the ideas specific, creative, and executable.
Ask follow-up questions to refine if needed."Image
We tested this with multiple angles:

• “I’m a designer who wants to build a B2B tool”
• “Give me AI startup ideas in healthcare”
• “What’s a solo business I can start with no code skills?”
• “Startup ideas based on Reddit pain points”
• “Generate ideas that don’t rely on ad spend”

ChatGPT results:
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(