How to Write a System Prompt That Makes AI Act Like a Specialist

Learn how to craft system prompts that give any AI a specific role, personality, and expertise — so every conversation starts exactly where you need it.

Why Generic AI Gives Generic Answers

Here's a thing I noticed early on. I'd ask ChatGPT to help me review a piece of writing, and it would come back with this polite, encouraging, slightly-too-nice feedback that felt like it was trying not to hurt my feelings. Useful? Sort of. But not what I actually needed.

Then I figured out system prompts — and everything changed.

A system prompt is basically a set of instructions you give the AI before the conversation starts. Think of it as the briefing you'd give a new hire before they do a task. Without it, the AI defaults to "helpful generalist mode" — friendly, broad, careful not to offend. With a good system prompt, you can turn that same AI into a sharp technical editor, a senior developer who doesn't sugarcoat things, or a Socratic tutor who refuses to just give you the answer.

This is an intermediate skill because it takes a bit of trial and error to get right. But once you understand the structure, you'll use this on basically everything.

Where System Prompts Live (Depends on Your Tool)

Before we get into writing them, let's talk about where these actually go — because it varies by tool.

In ChatGPT, you have a few options. If you're using a Custom GPT, the system prompt goes in the "Instructions" field during setup. If you're just in a regular chat, you can paste your system prompt as the very first message and explicitly tell it "these are your operating instructions for this conversation." It's a bit of a workaround, but it works.

In Claude, the cleanest way is through the API — the system parameter sits separately from your actual messages. But in Claude.ai's interface, you can use Projects to set persistent instructions that apply to every conversation in that project. That's become my go-to setup.

In Cursor or other AI IDEs, system-level instructions often live in files like .cursorrules or CLAUDE.md. Same concept, different delivery method.

Wherever it lives, the idea is the same: set the stage before the first real message.

The Four Parts of a Good System Prompt

I've tried a lot of different formats. The one that consistently works best for me has four components. You don't always need all four, but when a task is complex, all four earn their place.

1. The Role — Who is the AI being right now? Not just "an assistant" but a specific, credentialed-feeling expert. The more specific you are, the more focused the output.

2. The Context — What's the situation? What does the AI need to know about you, your project, or your goals to do this well?

3. The Behavior Rules — How should it communicate? What should it always do? What should it never do? This is where you kill the habits that annoy you.

4. The Output Format — What should the response look like? Bullet points? Numbered steps? Short paragraphs? Code blocks? Don't leave this to chance.

Here's what that looks like in practice for a code review specialist:

system-prompt.txt
# Role
You are a senior Python developer with 10+ years of experience
reviewing production code. You are direct, specific, and you
don't soften criticism unnecessarily.

# Context
The user is an intermediate developer learning Python. They want
honest feedback that helps them improve, not encouragement.

# Behavior Rules
- Always explain WHY something is a problem, not just that it is
- Flag security issues first, then performance, then style
- Do not praise code just to be polite
- If the code is genuinely good, say so briefly and move on

# Output Format
Use numbered issues. For each: [severity] description, then
a corrected code snippet where relevant.

That system prompt produces reviews that are actually useful. Not mean — just honest and structured. Huge difference from the default.

Three Specialist Prompts You Can Steal Right Now

Let me give you three ready-to-use system prompts across different use cases. Adapt them for your own work.

The Blunt Editor — for when you want someone to actually fix your writing:

blunt-editor.txt
You are a professional editor who values clarity above all else.
Your job is to make writing sharper, not longer. Cut filler words,
flatten passive voice, and flag any sentence that takes more than
one read to understand. Do not add encouraging comments. Return
the edited text with inline notes in [brackets] explaining each
change. End with a one-line summary of the main weakness.

The Rubber Duck Debugger — for when you need to think through a problem, not just get an answer:

rubber-duck.txt
You are a debugging partner, not a solution dispenser. When the
user shares a problem or code, ask targeted clarifying questions
to help them reason through it themselves. Only provide a direct
answer if they explicitly ask for one or are clearly stuck after
3+ exchanges. Your goal is to build their debugging instincts,
not to solve things for them.

The Meeting Summarizer — for turning messy notes into something usable:

meeting-summary.txt
You are an executive assistant who specializes in turning raw
meeting notes into structured summaries. Always produce output
in this exact format:
1. Decision Made (bullet list)
2. Action Items (owner: task: deadline)
3. Open Questions (unresolved items needing follow-up)
4. One-sentence TL;DR
Do not include small talk, filler discussion, or tangents.

The Mistakes I Made Early On

When I first started writing system prompts, I made a few consistent mistakes. Sharing them here might save you some frustration.

Too vague on the role. "You are a helpful expert" is basically nothing. "You are a backend engineer who has maintained Node.js APIs in production for 8 years and is allergic to over-engineering" — that's a role. The specificity signals to the model what knowledge to draw on and what attitude to take.

Forgetting to ban the behaviors I hate. The AI will default to certain habits — excessive caveats, "Great question!", hedging every answer with "it depends." If those things bother you, put them explicitly in the rules. "Do not begin any response with a compliment." "Do not add unnecessary disclaimers unless there is a genuine safety concern." It works.

Overloading it. I went through a phase where my system prompts were 800 words long. The AI started ignoring parts of it. Now I aim for tight and specific — 150 to 300 words max. If I need more complexity, I use a prompt chain instead.

Test Your System Prompt Like a Product

After writing a new system prompt, send it three different test inputs — including one edge case that might trip it up. If the behavior breaks on any of them, revise the rules section. Treat it like QA, not a one-and-done write.

Building a Personal Library of Specialist Prompts

Once you've written a few good system prompts, the move is to save them somewhere you'll actually use them. I keep mine in a simple folder — one text file per specialist persona. Names like code-reviewer.txt, blunt-editor.txt, sql-helper.txt.

When I start a new task, I pick the right specialist, paste the prompt in, and go. No ramp-up time. The AI knows exactly who it's supposed to be from message one.

This is the compound benefit of system prompts: you invest the thinking once, and then every future conversation with that specialist starts at full speed. The better your library gets, the less setup work every AI session requires.

It's a small shift in how you approach AI tools, but it genuinely changes the quality of what you get back. Stop talking to the generalist. Build your specialists. You'll wonder why you didn't start earlier.

Keep going

More tutorials in this category, or explore the full field guide.

More Prompting Tutorials Official Docs ↗