All tools

Few-Shot Prompt Example Formatter

AI / Agent

Turn a list of input/output example pairs into a numbered, XML-tagged, or delimiter-separated few-shot prompt template

Every agent developer eventually hand-formats a handful of input/output examples into a few-shot prompt, and it's easy to end up with an inconsistent mix of numbering, indentation, and separators across a codebase. Add example pairs here and get them formatted into one of three common templates: numbered blocks, XML-tagged examples for models that respond well to structured tags, or delimiter-separated blocks for a plain-text prompt. It's plain string formatting with no model call involved, so it runs instantly and never sends your examples anywhere. Pairs with an empty input or output are dropped automatically, which is convenient when you're iterating on an example list and don't want half-filled rows breaking the output.

agentprompt-engineeringfew-shotllmrag

How to use Few-Shot Prompt Example Formatter

  • 1.Add a few input/output example pairs, one per row, using the + Add example button as needed.
  • 2.Pick numbered, XML-tagged, or delimiter-separated formatting depending on what your target model or prompt template expects.
  • 3.Copy the formatted output and paste it directly into your system or user prompt.

Frequently asked questions

Which format should I use?
Numbered works well for most chat-completion prompts, XML tags tend to help models that are trained to attend to structured markup (Claude models in particular), and delimiter-separated is a lightweight option for plain-text prompts.
What happens to an example with a blank input or output?
It's silently dropped from the formatted output and doesn't count toward the example count shown, so you can leave a trailing empty row while editing without breaking the result.
Does this call an LLM to generate the formatting?
No, it's pure string formatting with no external calls, the same examples you type in are just rearranged into the chosen template.
Can I use a custom delimiter?
Yes, when you pick the delimiter format you can set any separator string, it defaults to a plain --- line between examples.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/few-shot-formatter \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"examples":[{"input":"2 + 2","output":"4"},{"input":"3 + 5","output":"8"}],"format":"numbered","delimiter":"---"}'

Get an API key from your dashboard · Full API docs →