A prompt is a spec, not a wish
The model does what you say, not what you mean. Vague prompts get vague results. The core levers:
- Be specific and explicit. State the task, the format, the constraints, and the audience. "Summarize this" → "Summarize this support ticket in 2 sentences for an engineer, focusing on the root cause."
- Give structure. Separate instructions, context, and input with clear delimiters (headings, XML-style tags, triple backticks). Models follow a well-organized prompt far better than a wall of text.
- Assign a role / system prompt. The system prompt sets stable behavior ("You are a senior code reviewer; be terse and cite line numbers"). Put durable rules here, per-request content in the user message.
- Show the shape of the output. If you want JSON, show the JSON. If you want a specific tone, give one line of it.
- Give the model an "out." Tell it what to do when it can't answer ("If the context doesn't contain the answer, say 'I don't know'"). This is the single biggest anti-hallucination lever.
Positive instructions beat negative ones
"Respond in formal English" works better than "don't be casual." Tell the model what to do rather than listing what to avoid — negatives are easy to violate.
Order and emphasis
Put the most important instructions at the start and end (models weight the edges; see "lost in the middle"). For long context, repeat the key instruction after the context so it isn't buried.
Iterate against outputs, not vibes
Prompting is empirical. Change one thing, run it on several inputs, compare. The rest of this course is how to do that systematically — but it starts with a clear, specific, well-structured prompt.