induwara.lk
induwara.lkAI · Prompt engineering

AI System Prompt Generator

Turn a short form into a structured system prompt — role, task, tone, output format, guardrails and examples — ready to paste into ChatGPT Custom Instructions, a Custom GPT, or the Claude, OpenAI or Gemini system field. It arranges your own words in the order the vendor guides recommend — nothing is sent to a server, no signup, no AI rewriting.

By Induwara AshinsanaUpdated Jul 4, 2026
Build your system promptrole, rules & format
Structure verified
Start from a preset
52/200

Who the assistant is. Becomes the opening 'You are…' line.

48/600

What the assistant should do. One or more sentences.

25/120

Who it talks to. Adds a 'You help…' clause.

Facts the assistant should treat as given.

78/800

One rule per line. Each becomes a bullet under Constraints.

0/3
Target model style
Length
5 checks passed
You are a customer support agent for a Colombo courier service. You help Sri Lankan online sellers.

## Task
Answer delivery, pricing and tracking questions.

## Tone
Be warm and friendly while staying professional.

## Output format
Respond in Markdown.

## Constraints
- Never promise same-day delivery.
- Never share another customer's tracking info.
353 chars89 tokens
5 sections— what & why
  • RolePersona set — vendors recommend assigning a role.
  • TaskPrimary objective stated before examples.
  • ContextOmitted — no content provided.
  • ToneVoice made explicit.
  • Output formatFormat stated explicitly (best practice).
  • ConstraintsYour must-not-do rules, as bullets.
  • ExamplesOmitted — no content provided.

Token count is an estimate (≈ 4 characters per token). For an exact count, use the Token Counter.

Assembled entirely in your browser — nothing you type is uploaded.

How it works

A system prompt is standing guidance that shapes every reply an assistant gives. This tool does not call a model or invent wording — it arranges the text you type into the section order that Anthropic, OpenAI and Google all recommend, then wraps it in your chosen delimiters. The same inputs always produce the same output, so it is predictable and explainable rather than a black box.

The assembly is deterministic string composition:

  1. Fixed section order. Role → Task → Context → Tone → Output format → Constraints → Examples. All three vendor guides state that instructions come before examples and that the output format should be stated explicitly, so examples are always placed last.
  2. Role line. Your role becomes You are … — an indefinite article is added only when the role reads like a common-noun descriptor. If you give an audience, a You help … clause is appended. Assigning a persona is a documented best practice in the OpenAI and Gemini guides.
  3. Tone and format become instructions.The tone you pick maps to a short directive (Concise → “Keep responses short and to the point; avoid filler.”), and the output format maps to an explicit instruction (JSON adds “Respond ONLY with valid JSON, no prose.”). Explicit format is called out in the OpenAI and Gemini guides.
  4. Guardrails become bullets. Each non-empty line in the guardrails field is rendered as a bullet under a Constraints heading, so must-not-do rules are unambiguous.
  5. Examples last.Each input/output pair is rendered after all instructions, matching Anthropic's and OpenAI's guidance to place reference examples at the end.
  6. Style and length. The Claude style wraps sections in XML tags (<role>, <task>, …), as Anthropic recommends; Generic, OpenAI and Gemini use Markdown headings. Compact drops the tone block for brevity; Detailed adds a one-line rationale under each heading. Empty optional sections are never printed.
  7. Token estimate. The character count is divided by four for a rough token figure (labelled approximate). A separate word-based cross-check runs internally, and the Token Counter gives an exact per-model count.

A built-in structure check independently confirms that every piece of text you entered — role, task, each guardrail, each example — actually appears in the output and in the correct order. When it passes, the card shows how many checks succeeded, so the result is verifiable rather than taken on trust.

Worked examples

Support bot — Generic style, Standard length

353 characters · ≈ 89 tokens

  • Role: customer support agent for a Colombo courier service
  • Task: Answer delivery, pricing and tracking questions.
  • Audience: Sri Lankan online sellers · Tone: Friendly · Format: Markdown
  • Guardrails: two lines (no same-day promise; no sharing another customer's tracking)
You are a customer support agent for a Colombo courier service. You help Sri Lankan online sellers.

## Task
Answer delivery, pricing and tracking questions.

## Tone
Be warm and friendly while staying professional.

## Output format
Respond in Markdown.

## Constraints
- Never promise same-day delivery.
- Never share another customer's tracking info.

Six blocks in fixed order; both guardrail lines became bullets; no empty section printed. Structure check: 5 assertions passed.

JSON extractor — Claude XML style, Compact length

390 characters · ≈ 98 tokens

  • Role: data extraction assistant · Tone: Concise · Format: JSON
  • Task: Extract the invoice total and date from pasted text.
  • Guardrail: Do not guess missing values; use null.
  • One example: 'Total: Rs 4,500 on 2026-02-01' → {"total":4500,"date":"2026-02-01"}
<role>You are a data extraction assistant.</role>
<task>Extract the invoice total and date from pasted text.</task>
<output_format>Respond ONLY with valid JSON, no prose.</output_format>
<constraints>Do not guess missing values; use null.</constraints>
<examples>
<example><input>Total: Rs 4,500 on 2026-02-01</input><output>{"total":4500,"date":"2026-02-01"}</output></example>
</examples>

Claude style → XML tags; Compact dropped the tone block; the JSON instruction was applied; the single example was placed last inside <examples>.

Empty state — edge case

No role and no task

  • Role: (blank)
  • Task: (blank)
— no prompt is generated —

With neither a role nor a task, the tool shows a 'your prompt appears here' hint instead of an empty box. As soon as you add a role, the output builds live.

Frequently asked questions

Sources & references

The generator invents no rates or numbers. Its “source” is the documented prompt-engineering best practice from the three major model vendors, which fixes the section set and their order:

The section set and ordering were last cross-checked against these vendor guides on 2026-07-04. They are reviewed whenever a vendor materially updates its prompting guidance.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.