01What is Few-Shot Example Builder?
Few-shot prompting means you show a model a handful of solved examples, then hand it a new input in the same shape. The GPT-3 paper by Brown and colleagues in 2020 made the idea popular. The OpenAI and Anthropic prompting guides both still recommend examples when you want a fixed output format. The catch is that the model copies your formatting closely, so sloppy examples give sloppy answers. This builder keeps the format tidy. You fill in a Task Description, an Input Label and an Output Label, then add input and output pairs. Use Add for a new one and the trash icon to remove one. The tool builds the prompt in your browser in a fixed order. The task comes first, followed by a blank line. Each example is two lines, "Label: value" for the input and then the output. With Number examples ticked, each pair starts with "Example 1:", "Example 2:" and so on. Your Separator goes between examples and once more after the last one. The prompt then ends with the input label followed by a {{input}} placeholder, and the output label with nothing after it. That empty output label is the point. The model's next words land exactly where the answer belongs. The {{input}} placeholder is plain text, so your code can swap in the real input with a string replace or a template engine. Here is how it plays out. The Sentiment analysis preset has three examples: positive, negative and neutral. It ends with "Text: {{input}}" and then a bare "Sentiment:" line. The counter next to Copy Prompt shows about 88 tokens. Clear all the examples and you get a zero-shot prompt that still keeps the separator and the input slot. A few things to watch. Multi-line values are pasted as they are, so the second line of an output has no label in front of it. In the Entity extraction preset, a line like "Location: Geneva" sits on its own, and the model has to work out that it still belongs to the Entities answer. If that matters, use a one-line format such as a JSON object. The token count is characters divided by four, which is rough and runs low on code and non-English text. An empty Task Description is simply left out. Three presets are ready to load: sentiment classification, Python-to-TypeScript translation and named entity extraction.
Developers and prompt designers who need an LLM to copy a strict input and output pattern use it to build and tweak few-shot templates. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Few-Shot Example Builder
- Load a preset (Sentiment analysis, Code translation or Entity extraction) or write your own Task Description.
- Set the Input Label and Output Label to match your data.
- Tick or untick Number examples and type a Separator.
- Fill in each example's two boxes, use Add for more and the trash icon to remove one.
- Read the Generated Prompt and the ~tokens counter, then click Copy Prompt. The reset button reloads the sentiment preset.
03Worked examples
- Input:
Task: Classify the ticket. | Input label: Ticket | Output label: Team | Examples: 'Card declined' -> billing, 'App crashes on login' -> engineering | separator --- | numbers on - Result:
Classify the ticket. Example 1: Ticket: Card declined Team: billing --- Example 2: Ticket: App crashes on login Team: engineering --- Ticket: {{input}} Team: - The prompt ends with an empty output label, so the model's next words are the answer.
- Input:
No task | Input label: Q | Output label: A | one example 2+2 -> 4 | separator ### | numbers off - Result:
Q: 2+2 A: 4 ### Q: {{input}} A: - Input:
Task: Translate to French. | labels English/French | no examples - Result:
Translate to French. --- English: {{input}} French: - With no examples you get a zero-shot prompt that still has the separator and the input slot.
- Input:
Preset "Code translation" (Python to TypeScript, numbers on, separator ---) - Result:
Example 2: Python: names = [x.upper() for x in items] TypeScript: const names = items.map(x => x.toUpperCase()); --- Python: {{input}} TypeScript: - Trimmed to the last example and the input slot. The counter shows about 86 tokens for the full prompt.
- Input:
Preset "Entity extraction" with only the United Nations example, numbers off, separator ### - Result:
Extract named entities (person, organization, location) from the text. Text: The United Nations held a summit in Geneva. Entities: Organization: United Nations Location: Geneva ### Text: {{input}} Entities: - Multi-line outputs go in as they are, so "Location: Geneva" has no Entities label in front of it.
04Common use cases
- Building a support-ticket router prompt with one labelled example per team
- Templating a code-translation prompt that your backend fills by replacing {{input}}
- Drafting an extraction prompt that pulls invoice numbers and totals out of email text
- Comparing zero-shot and few-shot output on the same eval set by removing all examples
- Keeping prompt templates in version control so changes to examples show up in diffs
- Showing a new teammate how example order and labels shape a model's output
05Tips
- Include every output class at least once. If all your examples are positive, the model tends to lean positive.
- Mix the order of classes. Models can pick up position patterns, such as the last example always being neutral.
- Write outputs exactly as you want them back, including case and line breaks. The model copies them closely.
- Multi-line outputs lose their label on the second line. A one-line format like JSON is easier for the model to copy.
- Choose a separator that never shows up in your data. A "---" line inside a markdown input will blur the example edges.
06Related concepts
few-shot prompting, in-context learning, prompt engineering, zero-shot, prompt template.
Frequently Asked Questions
What is Few-Shot Example Builder?
Few-Shot Example Builder is a free, browser-based developer tool on AIDToolStack. Build few-shot prompt examples It requires no installation or sign-up and works entirely in your browser.
Is Few-Shot Example Builder free to use?
Yes. No sign-up, no fees and no usage cap.
Does Few-Shot Example Builder store my data?
No. It runs in your browser; nothing is uploaded.