Make the Machine Understand

A practical prompt-engineering guide

Why the model keeps missing the point

It is rarely that the model is not capable. It is that the instruction left room to be read another way. Prompt engineering is programming in prose. The job is to give a clear instruction, the context needed to follow it, and the shape the answer should take.

Think of it as briefing an extremely capable intern on their first day. Sharp, fast, no idea how your company works — and if you leave a gap, they will fill it with a guess.

01 — Prompting 101

The basics

For: writing, document analysis, one-shot questions, extraction.

1. Give it a role and a task

Do not throw it a sentence. Cast it, the way a director would.

Weak: "What is this?" Better: "You are a claims adjuster at a Swedish insurer. Read this accident report and determine fault."

Without being told it is a road accident report, the model may read it as a skiing incident. Name the role and it stops guessing.

2. Give it the reference material

Anything fixed — a standard form, a regulation — goes at the top, in the system prompt.

  • Why: so the model spends its attention on the content rather than re-deriving the format each time. You hand the intern the staffhandbook once, not with every task.
  • Tip: XML tags work well (<form>contents</form>). AI Models follow structure well.

3. Specify the steps, not just the result

Do not ask only for an answer. Describe the process a person would follow, and ask for that.

How to write it: "Step one: check the tick-boxes on the form. Step two: read the scene diagram. Step three: state your conclusion."

Making the model show its working lifts accuracy noticeably — and gives you something to check.

4. Specify the output format

Say "return JSON", or "wrap the conclusion in a <verdict> tag".

Then code can consume the result directly, with nobody copying and pasting.

02 — Agent prompting

Prompting agents

For: tool use, search, writing code, multi-step work.

1. What an agent is

The basics treat the model as a question-answering box. An agent works like a colleague, in a loop:
use a tool → look at the result → decide the next move → use another tool
until the job is done.

2. When it is worth it

Not for everything. Agents earn their cost when the task is complex and the path through it is not known in advance.

  • Use one for: market research, where nobody knows how many searches it will take.
  • Do not for: a fixed process with a written SOP, or anything simple.

3. Think like the agent

Ask yourself: handed these tools and this brief on my first day, would I know what to do?

  • Name tools precisely. Short, accurate, no two that overlap.
  • Give principles, not a script. "Five searches for a simple question, ten for a hard one" — or "stop as soon as you have the answer".

4. Make it plan before it acts

Current models can reason as they go — ask them to.

  • The instruction:before calling a tool, state the plan — "what am I searching for, and what kind of source would settle it?"
  • The check:after the result comes back — "is this trustworthy, and does it need corroborating?"

5. How to test it

Start small. Run a handful of cases by hand and read the logs.
Which tools did it call? Did it loop? That tells you far more about the instruction than the final answer does.

Further reading