AI1 0 1 1 0 1 0 0 1 1 0 10 1 0 0 1 1 0 1 0 1 1 0 1Ai Me Bro

How do I write a good system prompt?

StarterAny assistantprompting

A good system prompt states the assistant's role, what it should and should not do, its tone, the output format, and what to do when it is unsure. Write it like instructions for a capable new colleague.

A simple structure:

  1. Role and audience
  2. Scope: what is in and out
  3. Style: tone and length
  4. Rules, with short reasons
  5. Format: headings, fields or JSON
  6. Fallbacks: ask a question, say "I don't know", or point to a human

Add one or two example exchanges. Then test with 10 to 20 inputs, including awkward and off-topic ones, and edit in small steps. Do not put secrets in it, and enforce critical limits in your code, since a prompt is guidance, not security. See our guide on writing system prompts for a template.

Related answers

How do I write a good system prompt? | Ai Me Bro