← All free lessons / Talking to AI

What is a Prompt?

What is a Prompt?

A prompt is the input you give to an AI model. It's the text (or image, or audio) you send, and it shapes everything about the response you get back.

This seems obvious. But the insight is that language models are extraordinarily sensitive to how you phrase things. A slightly different prompt can produce a dramatically different response — better or worse, longer or shorter, on-topic or off.

Prompt engineering is the practice of crafting inputs to get better outputs. It's part art, part science, and increasingly a valued skill.

The Anatomy of a Prompt

Most prompts to a language model contain some combination of:

Instruction: what you want the model to do

"Summarise the following article in three bullet points"

Context: background information the model needs

"You are helping a first-year medical student..."

Input data: the content to work with

"Here is the article: [text]"

Output format: how you want the response structured

"Respond in JSON with keys: summary, key_points, sentiment"

You don't always need all four — a simple question is a valid prompt. But for complex tasks, being explicit about each element dramatically improves results.

Why Prompts Matter So Much

Language models predict the most likely continuation of a sequence. Your prompt is the beginning of that sequence. Everything that follows is influenced by what you wrote.

Vague prompt → vague response

"Tell me about climate change"

This could go anywhere: history, science, politics, solutions, impact on business. The model has to guess what you want.

Specific prompt → specific response

"Explain the three main feedback loops that accelerate climate change, in plain English, for someone with no science background. Use an analogy for each one."

This leaves the model much less room to guess — and the response will be more useful.

The model isn't lazy or unhelpful when it gives a vague response to a vague prompt. It's doing exactly what it was asked to do.

Zero-shot, Few-shot, and Chain-of-thought

Zero-shot: just give the instruction, no examples

"Classify this review as positive, negative, or neutral: 'The delivery was late but the product is excellent.'"

Few-shot: include examples to show the model the pattern

"Classify these reviews: 'Arrived quickly, great quality' → positive 'Never arrived, terrible service' → negative Now classify: 'The delivery was late but the product is excellent.'"

Few-shot prompting works because examples anchor the model to the exact format and style you want.

Chain-of-thought: ask the model to reason step by step before answering

"Think through this step by step before giving your answer."

This improves accuracy on complex reasoning tasks — the model produces better answers when it "thinks out loud" first.

As of October 2026: reasoning models now do this by default — they generate their own internal reasoning before responding, without needing to be asked. Explicit "think step by step" prompting still helps with non-reasoning models, but matters much less once the model is already reasoning before it answers.

Context engineering is the broader discipline this sits inside: deliberately managing what goes into the model's context — instructions, retrieved documents, conversation history, examples — rather than just writing a single clever sentence. As prompts move from one-off questions to parts of larger applications and agents, what you include (and leave out) in the context matters as much as how you phrase the instruction itself.

Sign up free to take the quiz, earn XP, and track your progress.