🎯 Few-Shot Prompt Formatter

🔒 सुरक्षित और क्लाइंट-साइड

Add a system instruction and a list of input → output examples. The tool emits a clean few-shot prompt in Markdown, Anthropic-style XML tags, OpenAI messages JSON, or plain text — ready to paste into ChatGPT, Claude, or a script.

The tool reformats your text — it does not call any AI provider. Review the output before sending to a paid API.

How to use

  1. (Optional) Paste a system instruction that defines the task or persona.
  2. Click + Add example to add input/output pairs. 3–5 examples is typical for few-shot.
  3. Pick the output format:
    • Markdown — readable, good for chat UIs.
    • XML tags — Anthropic recommends <example> tags around each pair for Claude.
    • OpenAI messages JSON — array of {role, content} objects, ready for the Chat Completions API.
    • Plain — minimal, no markup.
  4. Click Format and copy the result.

For Claude / Anthropic, XML tags consistently improve adherence to the example structure. For ChatGPT, Markdown or messages JSON usually works best. The OpenAI format alternates user/assistant turns for each pair, which the API treats as conversation history.