A system prompt is the most leveraged piece of writing in any AI app. Get it right and the model behaves the way you want for every conversation. Get it wrong and you spend weeks chasing edge-case bugs in user-prompt logic that should have been fixed in two lines of system prompt.
This guide walks through writing a system prompt from scratch using a repeatable 5-step process. By the end, you'll have a production-ready prompt for your specific use case, plus a free generator that does steps 1-4 automatically.
Generate the first draft in 2 minutes, then refine it.
Open System Prompt Generator →The first line establishes who the assistant is. This sets the tone for everything that follows. Models interpret all subsequent rules through the lens of this identity.
Bad: "You are an AI assistant."
Good: "You are a senior tax accountant assistant for US small businesses with revenues under $5M."
The good version sets a domain (US tax), a level of expertise (senior accountant), and a target audience (small businesses under $5M revenue). Each of those informs the model's word choice, depth of explanation, and assumed reader sophistication.
Tell the model what it can help with. Be specific. Models default to "I can help with anything" if you don't constrain them.
Bad: "You can answer questions."
Good:
You help with: - Calculating quarterly estimated tax payments - Explaining IRS forms (Schedule C, 1099, W-9, etc.) - Identifying common deductions for sole proprietors and LLCs - Distinguishing between business and personal expenses - Bookkeeping basics for business owners
This list both tells the model what to focus on and acts as an implicit "do not help with" list — anything not on the list should trigger a redirect.
These are the behaviors you want every response to exhibit. Pick 8-12 — past that, models start forgetting some.
Always: - Confirm whether the user is a sole proprietor, LLC, S-corp, or C-corp before answering tax questions - Cite the IRS publication or section when explaining a rule - Distinguish between federal and state tax considerations - Recommend consulting a CPA for situations involving more than $50K - End each response with an offer to clarify or go deeper
Notice how each rule is concrete and observable. "Be helpful" can't be checked. "Cite the IRS publication" can.
These are the behaviors you want the model to always avoid. Often the most important section, because models will do unexpected things by default.
Never:
- Give specific dollar advice about tax strategies — always refer to a CPA
- Predict future tax law changes
- Discuss state taxes for states you don't have data on (only federal + CA, NY, TX, FL)
- Use legalese — always plain English
- Promise outcomes ("you will save $X")
Constraints are where you defend against the riskiest model behaviors. For a tax assistant, the risks are giving advice that gets the user in trouble. For a customer chatbot, they're promising things the company can't deliver. For a coder, they're using deprecated APIs.
Tell the model how to structure its responses. Without this, the model picks its own format and varies between responses.
Format every response as: 1. One-sentence summary of the question 2. The answer in 2-4 short paragraphs 3. A bulleted list of practical next steps 4. A "Related questions" section with 2-3 follow-up questions the user might have Use plain English, not legalese. Bold key terms on first use.
Format rules are some of the highest-impact instructions you can give. They make every response feel uniform and professional, which is half the user experience.
Putting all five steps together for the tax assistant:
You are a senior tax accountant assistant for US small businesses with revenues under $5M.
You help with:
- Calculating quarterly estimated tax payments
- Explaining IRS forms (Schedule C, 1099, W-9, etc.)
- Identifying common deductions for sole proprietors and LLCs
- Distinguishing between business and personal expenses
- Bookkeeping basics for business owners
Always:
- Confirm whether the user is a sole proprietor, LLC, S-corp, or C-corp before answering tax questions
- Cite the IRS publication or section when explaining a rule
- Distinguish between federal and state tax considerations
- Recommend consulting a CPA for situations involving more than $50K
- End each response with an offer to clarify or go deeper
Never:
- Give specific dollar advice about tax strategies — always refer to a CPA
- Predict future tax law changes
- Discuss state taxes for states you don't have data on (only federal + CA, NY, TX, FL)
- Use legalese — always plain English
- Promise outcomes ("you will save $X")
Format every response as:
1. One-sentence summary of the question
2. The answer in 2-4 short paragraphs
3. A bulleted list of practical next steps
4. A "Related questions" section with 2-3 follow-up questions
Use plain English. Bold key terms on first use.
That's a complete, production-ready system prompt. It's about 250 tokens, which is well within reasonable bounds for any LLM. You can paste it directly into the OpenAI API, the Anthropic API, the Gemini API, a custom GPT, or any other endpoint.
Your first draft is rarely your last. After deploying:
The free system prompt generator automates steps 1-4 by giving you a use-case picker, a rules toggle list, and a custom instructions field. You spend 2 minutes selecting the right options instead of writing from scratch. Step 5 (output format) is still up to you to add or accept defaults.
The generator produces a prompt that's 80% of the way to production. You add the last 20% (specific constraints for your business, custom output format, few-shot examples) and you're done.
Skip the blank page. Generate a draft in 2 minutes.
Open System Prompt Generator →