Skip to content
100% local

Few-shot prompt builder

Generate a blank few-shot Markdown template with numbered input/output example blocks.

Output

Few-shot prompt builder

Few-shot prompting — showing a language model several worked examples before asking it to handle a new case — reliably improves output quality, but typing out "### Example 1 / Input: ... / Output: ..." by hand for every field and every example is tedious and easy to get inconsistent. This tool generates that scaffold for you: set the field names and how many examples you need, and it produces a clean Markdown template ready to paste real data into.

By default it builds the classic two-field shape — Input and Output — repeated three times, but the field names are entirely up to you. Enter any comma-separated list, such as "Context,Question,Answer" or "Tweet,Sentiment,Confidence", and each generated example block gets one labeled line per field, in the order you typed them. The number-of-examples option controls how many numbered blocks appear, from a single example up to twenty, so the template matches whether you're doing one-shot prompting or building out a larger evaluation set.

The output is plain Markdown with no proprietary formatting, so it drops straight into a system prompt, a prompt-management tool, or a code comment above an LLM API call. Because every block follows the same structure, filling in real examples afterward is mechanical — no field forgotten, no heading mislabeled, no accidental inconsistency between example three and example seven.

Everything runs locally in your browser: the template is built with plain JavaScript string operations and nothing you type into the field-names or count options is ever sent anywhere. That also means it works offline and updates instantly as you adjust the options, so you can iterate on the shape of your prompt before committing to it.

FAQ

What is few-shot prompting?
It's giving a language model a handful of worked input/output examples inside the prompt before asking it to handle a new case — it tends to produce more consistent, on-format answers than describing the task alone.
Can I use field names other than Input and Output?
Yes. Type any comma-separated list, such as "Context,Question,Answer", and each example block gets one line per field in that order.
How many examples can I generate?
Between 1 and 20 per template. Three to five is a common sweet spot for few-shot prompting — enough to establish the pattern without bloating the prompt.
Does it fill in real example data for me?
No. It generates the blank structure with "..." placeholders — you paste your own input/output values into each field afterward.
Is my data uploaded anywhere?
No. The template is generated entirely in your browser with plain JavaScript, and nothing you type into the options is ever sent to a server.