Dataqia🎲 random

Also available in: Português (Brasil)

The rules of a good prompt

A good prompt is not luck or a magic word: it is clarity. The table below shows the same request written in a weak and a better way, side by side, and the sections that follow explain the five principles that almost always raise the quality of the answer. These are general, checkable practices, not promises: the result still varies with the model and the task.

PrincipleWeak promptBetter prompt
RoleWrite about finance.You are a financial educator. Explain compound interest to a teenager, with an everyday comparison.
ContextRevise the text.Revise this email to an unhappy customer, keeping a warm tone and a clear solution: [text].
SpecificityGive me ideas.List 5 short post ideas for a neighborhood bakery on Instagram, each with a one-line hook.
Examples (few-shot)Classify the comment.Classify as Positive or Negative. Loved the product = Positive; arrived broken = Negative. Now: slow but worth it.
Output formatCompare the plans.Compare the 3 plans in a table with columns Price, Monthly limit and Support, one row per plan.

Role: say who the model should be

Opening with a role, such as teacher, editor or programmer, helps the model pick the right vocabulary, depth and tone. It is not pretending it is human, it is pointing at the angle of the answer. The same subject changes a lot when explained to a child versus an expert.

Context: give the background

The model only knows what is in the prompt and what it learned in training. Saying who it is for, with what goal and under which constraints cuts down wrong assumptions. The clearer the scenario, the less the answer guesses.

Specificity: be concrete in the request

Vague requests produce vague answers. Swap write a summary for summarize in 3 sentences for a busy reader. Quantity, audience, length and purpose are the details that steer the result the most.

Examples: show the pattern you want

When format matters, giving one or two examples beats any description. That is the idea of few-shot: the model copies the structure you demonstrated. It is especially useful for classification, extraction and standardized replies.

Output format: ask for the final structure

Say whether you want a table, a list, a paragraph or a code snippet, and with which fields. Fixing the format saves rework and makes the answer ready to use. Combine it with a request for steps when the task needs reasoning, so you can follow the path to the conclusion.

Last updated: · Methodology and sources