Lesson 1 of 5 · The Art of Prompt Engineering
Lesson 1
What a prompt actually is
Most people imagine the chatbot as someone reading their message. The reality is stranger — and once you understand it, you write prompts very differently.
By the end of this lesson, you will:
- Understand what a language model actually does when it reads your prompt.
- Know the three layers of a real conversation with an AI assistant — and why this matters for your prompts.
- Have run a small experiment that demonstrates why one tiny change to a prompt produces a very different answer.
What the model is doing
A modern AI chatbot — Claude, ChatGPT, Gemini, any of them — is built on a large language model. The model has been trained on enormous amounts of text to do one specific thing: given a sequence of words, predict the next word. That is the whole job. Predicted one word at a time, those words become sentences, paragraphs, and entire responses.
This sounds reductive — and it is. Modern models are vastly more sophisticated than the description above suggests. But the mental model is still useful. When you write a prompt, you are giving the model a starting sequence of words, and the model is producing what it believes the most plausible continuation would be.
Three implications follow.
The model does not "understand" the way a person does. It pattern-matches against everything similar that it has seen in training. If your prompt looks like a math problem in textbook form, you get back a math-solution response. If your prompt looks like an angry email draft, you get back a more polished version of the email. The model's behaviour is shaped by what your prompt resembles, even when you did not intend the resemblance.
Small changes in how you ask produce large changes in the answer. "Write a paragraph about X" and "Explain X in plain language" produce noticeably different outputs. "List the pros and cons of X" and "What are the trade-offs of X?" produce different outputs again. The model is responding not to the abstract intent behind your words but to the specific words and structure you used.
The model has no memory of you between conversations. Each new conversation starts from scratch — except for whatever the system prompt and the platform have configured. The model does not remember your name, your job, your previous questions, your preferences. If you want it to act as if it knows you, you have to tell it.
The three layers of a real prompt
When you type a message into Claude or ChatGPT, what the model actually receives is not just your message. It is three layers of text, concatenated together, and the model treats all of them as one piece of input.
Layer 1 — The system prompt
The first layer is the system prompt. This is a piece of text the platform supplies — invisibly to you — that tells the model who it is, what its role is, what tone to use, what it must not do. Claude's system prompt is several thousand words; ChatGPT's varies. You cannot usually see it as a regular user. What you can do is override or extend it by including instructions in your own message. This is what people mean when they talk about "writing a system prompt" — for a custom bot or for the start of a conversation.
Layer 2 — The conversation history
The second layer is everything you and the model have said earlier in the current conversation. Once the conversation reaches a few turns, the model is taking into account not just your most recent message but the full thread. This is why a long conversation often produces better answers — the model has accumulated context. It is also why a long conversation can go off the rails — the model has accumulated wrong context that is hard to unwind.
Layer 3 — Your current turn
The third layer is the message you just sent. This is the only one most people consciously think about. It is also, often, the only one most people optimise. Improving your prompts means consciously controlling all three layers, not just the third.
Aside · Why this matters in practice
If you ask the model "What do you think?" it will answer based on the entire stack of system prompt, conversation history, and your current question. Two people asking the same question in two different conversations will often get different answers — not because the model is being inconsistent, but because the context preceding the question was different. Once you internalise this, you stop being surprised that "the same question" produces different results, and you start designing the context deliberately.
A small experiment
Open Claude.ai or ChatGPT in a fresh tab. We are going to run three prompts that are almost identical and look at the differences.
Three nearly identical prompts
Prompt A: "Tell me about coffee." Prompt B: "Explain coffee in plain language to a curious 14-year-old." Prompt C: "You are a professional barista with 15 years of experience. A curious 14-year-old has asked you about coffee. Explain it in plain language, covering the bean, the brewing methods, and what makes a good cup. Keep it under 200 words and end with one piece of advice you would give them."
Try all three. Notice the differences.
Prompt A returns a generic encyclopedic paragraph — vaguely defining coffee, listing some types, perhaps mentioning history. Useful if you genuinely wanted a generic encyclopedic paragraph. Often not what you actually wanted.
Prompt B returns a friendlier, simpler explanation. The model has identified an audience (a teenager) and a register (plain language) and adjusted. Already much better.
Prompt C returns something specific, scoped, and useful. A role (barista). An audience (14-year-old). A structure (bean / brewing / advice). A length (200 words). A closing (one piece of advice). The model has been given enough to produce a coherent piece of writing that almost feels like a particular barista, not a generic AI.
Same model. Same topic. Three very different responses. The difference is entirely in the prompt.
What a "good" prompt is
A working definition for the rest of the course. A good prompt is one where:
- You know clearly what you want from the model.
- You have communicated that to the model so completely that another competent reader, given only your prompt, could produce a similar response.
- You have nothing in the prompt that is ambiguous, contradictory, or accidentally signalling the wrong thing.
That is the test. Lessons 2 and 3 are about how to meet it consistently. Lesson 4 is about what to do when you do not. Lesson 5 is about doing it for entire systems, not just one-off conversations.
The most-common myth
The most common belief beginners have about prompts is "if I am polite enough, or if I use special words like 'expert' or 'master', the model will give me better answers." There is a tiny grain of truth here — being clear and respectful tends to produce clearer answers — but the effect is much smaller than people think, and it is for the wrong reason. The "expert" prompt does not summon a hidden expert mode. It just nudges the model toward responses that resemble expert-written text in its training data, which often correlates with depth and care. The same effect is achieved (more reliably) by being specific about what depth and care look like for your task.
The real principle is not politeness or magic words. The real principle is clarity — about who you are, what you want, in what form, for what audience, with what constraints. The next four lessons unpack that, piece by piece.
Exercise — Probe the three layers (15 minutes)
- Open a new conversation in Claude.ai or ChatGPT. Do not give it any instructions yet — just ask: "Without revealing anything confidential, what role have you been given to play, and what are your main instructions?"
- Note what comes back. You will see hints of the system prompt — the model's name, its general tone, anything it is told to do or avoid. The exact system prompt is usually not disclosed, but the model often acknowledges its general framing.
- Now have a short five-turn conversation on any topic. After the fifth turn, ask: "What have you learned about me from this conversation that you are using to shape your answers?" Watch the model summarise the conversation history layer.
- Notice what is true: the model only "knows" what is in the conversation. If you have not told it your role or context, it is guessing. The next time you start a conversation, this knowledge changes how you open it.
Self-check
- What is the language model actually doing when it answers your prompt?
- What are the three layers of input the model receives?
- Why does the same question produce different answers in different conversations?
- What is the working definition of a "good" prompt we will use through this course?
Looking ahead
Lesson 2 introduces the five principles that, applied consistently, will improve almost any prompt you write: Specificity, Context, Role, Format, Constraints. We will improve a single recurring task — a weekly newsletter — through the lesson, watching it go from mediocre to good in five small steps.