Skip to the page

LLM basics for builders · core

Prompts that work, and reviewing a prompt

A good prompt states the task, audience and format, separates instructions from data, gives reasons and examples, and is changed only when an eval shows it helped.

The notes

What you must know

  • State the task, the audience and the output format first. Say what to do, not only what to avoid, and give the reason for a rule. A model applies a reason better than a bare order.
  • Few-shot examples help with format and tricky edge cases. Vary them so the model does not copy one example's wording, and keep them consistent with the instructions.
  • Separate instructions from data with clear delimiters or tags, and say that the data is data. Put user text in a user message, not inside the system prompt.
  • Order for caching: stable content first (tools, instructions, examples), changing content later. A timestamp with seconds at the top makes the cache miss every time.
  • Reasoning: older models answer better when asked to work step by step. Reasoning models think by themselves and you set an effort level. Keep the reasoning in a separate field if code reads the answer.
  • Long context: put long documents first and the question after them. Models use the start and end of a long context better than the middle.
  • Avoid contradictions (short and explain in detail) and avoid orders that force invention (never say you do not know). Define a path for unknown cases, such as a hand-off to a person.
  • Measure every change on a test set. A prompt that feels better can break cases nobody checked.

The red pen

Common traps: mistake → fix

  • Mistake: More capital letters and MUST make the model obey

    Fix: clear reasons and a defined fallback work better.

  • Mistake: Putting the user's text in the system prompt is fine

    Fix: it gives injected text system authority; use a user message and label it as data.

  • Mistake: A prompt change is safe if it reads better

    Fix: only a test set shows whether it helped.

Easy to hard

Questions interviewers ask, easy to hard

  1. Which prompting techniques do you use first?
  2. What is few-shot prompting and what can go wrong with it?
  3. Why should changing content go late in the prompt?
  4. Here is a support bot prompt. What problems do you see?
  5. How do you know a prompt change really helped?

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview