Level 2 · Prompting & Interaction
9 min

Prompt Engineering Fundamentals

Six techniques that account for 80% of all real-world prompt improvements.

Prompting isn't magic — it's communication. You're conditioning a probability distribution. Better conditioning = better outputs. Six techniques do most of the work.

1. Be specific about the output shape

Bad: "Summarise this article." Good: "Summarise this article in exactly 3 bullet points, each under 15 words, focused on actionable takeaways."

The first leaves the model to guess. The second nails the format, length, and angle. Specificity collapses the space of acceptable outputs.

2. Show, don't tell (few-shot)

If you want a specific style or format, demonstrate it with examples rather than describing it:

Convert to formal tone:
Casual: "hey, can you check this out?"
Formal: "Could you please review this when you have a moment?"

Casual: "this is broken lol"
Formal:

Two examples teach the pattern more reliably than a paragraph of explanation.

3. Give the model a role

"You are a senior security engineer reviewing this code for vulnerabilities."

This sets a persona, a level of expertise, and a focus area. The model adjusts its vocabulary, depth, and what it pays attention to.

4. Break the task into steps

Instead of asking for the final answer, ask for the process:

"First, list the key facts. Then, identify any contradictions. Finally, draw a conclusion based only on the facts."

This is chain-of-thought. The intermediate tokens become context that conditions the final answer.

5. State constraints explicitly

Constraints work best when they're hard rules, not preferences:

  • "Use only the information in the source document. If something isn't there, say 'not specified.'"
  • "Output must be valid JSON with no surrounding text."
  • "Do not exceed 200 words."

6. Iterate

Your first prompt is rarely your best. Run it, look at three or four outputs, note where it fails, refine. Treat prompts like code — version them, test them, regression-check them.

What doesn't work

  • Begging ("please please please") — wastes tokens, no measurable effect.
  • Threats ("you'll be deleted if you fail") — sometimes shifts outputs unpredictably, often makes things worse.
  • Overly long preambles — by the time the actual task arrives, half the context is fluff.

The prompt is a contract. Specific, constrained, exemplified, iterated. That's the whole game.

Knowledge Check

Score 70% or higher to mark this chapter complete.

Q1.Which technique reliably improves outputs more than explaining the format?

Q2.Why does asking the model to 'first list facts, then conclude' improve answers?

Q3.What's a hard constraint that typically works well?

0 / 3 answered

LLMAtlas — The Open Ecosystem Workspace for LLMs