Few-shot prompting — teaching AI your format by example
The problem
You want product titles in your marketplace house format. You describe it: brand first, then product type, then key attribute, then size, under 80 characters, no promotional words. The output is close but consistently wrong in some small way — a capitalisation habit, an ordering preference, a way of handling variants — that you did not think to mention because you did not know you had a rule…
What you need
EXAMPLE 1 — Input: Cotton kurta, blue, size M, brand Rangoli, printed, 3/4 sleeve Output: Rangoli Women's Cotton Kurta — Printed, 3/4 Sleeve, Blue, M EXAMPLE 2 — Input: Steel water bottle 1L, brand HydroFit, vacuum insulated, black Output: HydroFit Stainless Steel Water Bottle 1L — Vacuum…
The tool
Few-shot in your default assistant
The prompt
What comes back
Rules I have inferred: 1. Brand always comes first, exactly as given.
Verify before you use it
- Read the inferred rules before confirming. Rule 2 — expanding to standard product type — was never stated by you and may or may not be what you want at scale.
- Check whether any inferred rule is an accident of your examples. If all three happen to be under 70 characters, the model may treat that as a limit.
- The 'less sure' items are the ones worth confirming explicitly. Promote the ones you want into stated rules.
- Spot-check the first ten real outputs against the rules, not against your general sense of rightness. This is how you catch a rule that was inferred slightly wrong.