Few-Shot Example Designer for a Classification Task
Write examples that teach the pattern, not the answer.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
Design a few-shot prompt for a classification or labeling task. The task and labels: [TASK_AND_LABELS]. Real sample inputs (anonymized, including messy and borderline ones): [SAMPLE_INPUTS]. Cost of each type of mistake: [ERROR_COSTS]. Return: 1. Label definitions: for each label, a one-sentence definition, what includes and excludes it, and the hardest confusion with another label. 2. A set of 8 to 12 examples chosen to cover each label, include at least three borderline cases with the correct label and a one-line reason, and one example that should be labeled "unclear" if that label exists. Order the examples so the final ones are not all the same label, and note that example order can bias the output. 3. The full prompt text: instructions, label list, examples in a consistent format (Input: ... Label: ... Reason: ...), and the format for the answer (JSON with label and confidence in words). 4. A test plan: 20 new inputs not used as examples, expected labels, and how to measure accuracy and review errors by label. 5. Failure checks: do the model's mistakes cluster at certain boundaries? Add examples for those. Rules: do not use real personal data in examples; make examples realistic but fictional if necessary; keep the prompt short enough to reuse. State clearly that results must be validated on held-out data before relying on them.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.
See an example result (fictional data)
Labels: billing, bug, how-to, feature request, unclear.
Definition (bug): the product behaves differently from documentation. Confusion: bug vs how-to when the user misreads the docs.
Examples (excerpt)
Input: "I was charged twice in March." Label: billing. Reason: duplicate charge.
Input: "The export button does nothing since the update." Label: bug. Reason: broken behavior.
Input: "Can you add dark mode?" Label: feature request.
Input: "It doesn't work." Label: unclear. Reason: no details.
Output format: {"label": "...", "confidence": "high|medium|low"}. Test on 20 held-out inputs; validate before relying on it.Illustrative only, made-up data. Your results will differ and must be reviewed.