induwara.lk
induwara.lkAI · Prompt engineering

AI Prompt Formatter — Turn Rough Notes Into Clear Prompts

Paste a one-line idea and get a structured AI prompt with role, task, constraints, and output format — the four sections every modern chat model handles best. Works for GPT-4, Claude, Gemini, Llama. No signup, no API call, no upload.

By Induwara AshinsanaUpdated May 12, 2026
Format your promptDeterministic · No LLM call
Runs in your browser
Everything runs locally. Your notes never leave your browser.87 / 4,000
Try a sample
Task type
Audience
Tone
Length
The same input always produces the same prompt — no randomness, no LLM call, no rate limit.

What this does

Type or paste rough notes about what you want the AI to do, then click Format prompt. The tool classifies the task, assigns a sensible role, and wraps your request in a Role / Task / Constraints / Output structure that GPT-4, Claude, Gemini, and Llama all handle well. Pick the Markdown or XML template style from the result tabs.

Templates follow guidance from Anthropic, OpenAI, and Google's prompt engineering docs (linked below). Cross-checked by rendering the same structured sections in both Markdown and XML and asserting byte-equivalent normalised output.

How it works

Most people's “prompts” are really just questions shouted at an AI: “fix this bug”, “write a blog about photosynthesis”. Modern chat models will respond — but they have to guess your role, your audience, your tone, your preferred output format, and what counts as “done.” A well-structured prompt removes that guesswork. This tool runs four deterministic passes over your notes and produces one.

1. Cleaning

The notes are trimmed, repeated whitespace is collapsed, smart quotes are converted to straight quotes, and common filler openers are dropped (“can you please”, “hey ChatGPT”, “I'd like to”). The first letter is capitalised and a full stop is appended if missing. Cleaning is reversible-looking but does not change the meaning of your input.

2. Classification (keyword scoring)

The cleaned text is matched against six topic categories plus a fallback:

  • Coding Implement, debug, refactor, or explain code.
  • Writing Draft blog posts, articles, emails, or copy.
  • Analysis Compare, evaluate, or break something down.
  • Learning Explain a concept, build intuition, define a term.
  • Summarization Condense a source into a faithful short version.
  • Creative Brainstorm names, ideas, stories, or alternatives.
  • General Anything that doesn't fit the other categories.

Each category has a list of high-weight (score 2) and low-weight (score 1) keywords. The category with the highest sum wins. If everything scores zero — or you override the picker — the result falls back to General.

3. Verb detection

The first three tokens of the cleaned notes are checked against a fixed set of action verbs (write, fix, explain, summarize, and so on — about forty in total). If one is present, the notes become the task line as-is. If none is present, the category's default verb is prepended so the prompt's Task section always reads as a directive rather than a fragment.

4. Templating

The selected category supplies a role line, a default audience, tone, length, and an output-format description. Your explicit hints override the defaults. The four sections are then substituted into one of two equivalent templates:

# Role
You are {role}.

# Task
{verb-led task line}

# Constraints
- Audience: {audience}.
- Tone: {tone}.
- Length: {length}.
- {category-specific guardrail}

# Output format
{output description}

The Anthropic-style XML variant wraps the same four sections in <role>, <task>, <constraints>, and <output_format> tags. Both renders are normalised (strip headings, strip tags, strip list bullets, collapse whitespace, lowercase) and asserted byte-equivalent — the green “cross-check passed” badge on the result tile confirms it.

Everything is deterministic. The same input plus the same choices always produces the same prompt — useful when you want to A/B-test two prompts against the same task and need the comparison to be apples-to-apples.

Worked examples

Coding · debug a Python error

fix python bug in my script that reads a csv but errors with utf-8

  1. Classifier scores: coding 9 (fix +2, bug +2, python +2, script +1, csv +1, utf-8 +1); all other categories 0.
  2. Leading verb detected: "fix" (no default verb prepended).
  3. Role applied: "an experienced software engineer who writes idiomatic, well-tested code…"
  4. Constraint guardrail added: "Do not invent library names, function signatures, or API endpoints that are not in widespread use."
  5. Output format: code block + 2–5 bullet explanation + edge cases. Total prompt ~480 chars from ~12 source words.

Writing · blog intro for grade 8

write a blog intro about photosynthesis for grade 8 students

  1. Classifier scores: writing 5 (write +2, blog +2, intro +1); all other categories 0.
  2. Leading verb detected: "write".
  3. Role applied: "a clear, plain-English writer who avoids cliché…"
  4. Constraint guardrail added: a list of banned filler phrases ("delve into", "in today's fast-paced world", "revolutionize", and so on).
  5. Output format: complete prose with paragraphing, no bullets unless asked. Vocabulary matched to the audience.

Edge case · no verb, falls back to default

regex for sri lankan phone numbers

  1. Classifier scores: coding 2 ("regex" high-weight); everything else 0.
  2. No action verb in the first three tokens.
  3. Default coding verb "Help me with" is prepended automatically.
  4. Final Task line: "Help me with: regex for sri lankan phone numbers."
  5. Demonstrates that the formatter still produces a directive even when the user pasted a bare topic.

Frequently asked questions

Sources & references

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 prompt that came out wrong, a missing task category, or a rough-notes pattern the classifier mislabelled?

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