Skip to content

Prompting

Concepts · topic concepts/prompting

Prompting is the craft of writing the text a model responds to. Good prompts state the instruction clearly, supply examples when the format matters, set a role or system prompt that frames the whole conversation, ask for output in a usable shape, and improve through deliberate iteration rather than repeated retries.

Concepts

Instruction
The part of a prompt that says what to do. A clear instruction names the task, the input it applies to, the constraints to respect and what a good result looks like. Vague instructions are filled in by the model with plausible defaults, so most prompt failures trace back to something the instruction left unsaid rather than to the model misunderstanding. glossary
Example (few-shot)
One or more worked input-output pairs placed in the prompt so the model can copy the pattern. Few-shot examples are the most reliable way to fix a format, tone or edge-case behavior that is hard to describe in words. Two or three well-chosen examples usually beat a long paragraph of rules, and a bad example teaches the mistake just as well. glossary
Role and system prompt
Text set before the conversation starts that frames every later turn. A system prompt typically assigns a role, sets tone, states standing rules and lists what the model must never do. In chat products the vendor writes one you cannot see; in agents and custom applications the developer writes it, and it is where recurring behavior is fixed. glossary
Iteration
Improving a result by changing the prompt after reading the output, rather than resending the same prompt hoping for a better draw. Each round adds a missing constraint, an example of the failure, or a sharper definition of done. Iteration is the normal way to reach a reliable prompt; a first attempt that works is the exception. glossary
Structured output
Asking the model to answer in a fixed shape, such as a table, a numbered list with named fields, or a machine-readable format like JSON, so the next step can use the result without a human reformatting it. Naming the fields and giving one example of the shape makes the output far more consistent and makes missing information visible. glossary

Lessons

Your reference

Each lesson above adds its takeaways and its example here once you finish it. Your reference lists every lesson you have finished.

Change the prompt before you retry

Unlocks when you finish Change the prompt before you retry.

Show one example

Unlocks when you finish Show one example.

Instruction, context and format

Unlocks when you finish Instruction, context and format.

Output the next step can use

Unlocks when you finish Output the next step can use.

The prompt before the conversation

Unlocks when you finish The prompt before the conversation.

Sources