Productivity Intermediate 17 min

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…

The workflow
1Collect real examples
2Diversify them
3Add an edge case
4Show input and output
5Prompt
6Spot-check
7Fix examples
Save

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

Subscribers. The full prompt is part of the SMEMinds AI Playbook. See plans.

What comes back

Rules I have inferred: 1. Brand always comes first, exactly as given.

Verify before you use it

Human review required. Check every line below before this leaves your screen.
  • 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.