Skip to content

35 min read

Three ways to see it

  1. There is a single distinction in prompt engineering that, once you grasp it, will change how you write every prompt for the rest of your career. The distinction is between zero-shot and few-shot prompting. Zero-shot means you describe the task in words and ask the model to do it cold. Few-shot means you show the model two, three, or five worked examples first, then ask. Neither is universally better. There is a clean rule for when each one wins, and most professionals in Pakistani offices use the wrong one for the wrong task. Once you learn the rule, your outputs will become more consistent overnight, with no other change.

  2. Way one: zero-shot. You write a clean instruction and stop. "Translate this paragraph from Urdu to English in formal tone." That is a zero-shot prompt. The model decides what formal tone means based on its training. For tasks that the model has seen a thousand times in training, like translation, summarisation, sentiment classification, and basic Q&A, zero-shot is enough. The model already has a strong prior. Adding examples wastes tokens and sometimes confuses the model by anchoring it on the wrong specific. For ninety percent of the everyday prompts a Pakistani professional writes, zero-shot is the right starting point.

  3. Way two: one-shot. You write the instruction and give exactly one worked example before the real task. This is the cheapest upgrade from zero-shot and often the highest-leverage. One example is enough to anchor the output format. If you want the model to extract Pakistani CNIC numbers from messy chat transcripts and return them as a CSV with two columns, name and CNIC, one good example will lock in the format. Without the example, the model might give you a table, a bulleted list, JSON, or a paragraph. With the example, it gives you exactly the CSV you asked for. One-shot is the single biggest quality jump per token you will ever buy.

Quick check

Quick check: what makes modern AI different from a rule-based program?

The why-tree

The clean rule. Use zero-shot when the task is common and the format is flexible. Use one-shot when the format must be exact. Use few-shot (2 to 5) when the input has structured variation that the model must handle consistently. If you cannot decide, start with one-shot and add examples only when the output fails.

Sources

Sources. Brown, Mann, Ryder et al. 2020, "Language Models are Few-Shot Learners". Lilian Weng's blog post "Prompt Engineering". Andrew Ng's DeepLearning.AI course on prompt engineering, especially the lesson on iterative prompt development. The Anthropic prompt library on docs.anthropic.com, which catalogues real production few-shot examples.