Prompt Foundations

What Makes a Good Prompt

Understand the anatomy of an effective prompt and why structure matters.

What Makes a Good Prompt

A prompt is the input you give to an AI model to get a desired output. While it might seem like you can just type a question and get a good answer, the quality of your output is directly tied to the quality of your input. This is the fundamental principle of prompt engineering: garbage in, garbage out — and conversely, clarity in, brilliance out.

The Three Pillars of a Good Prompt

Every effective prompt rests on three pillars: context, task, and output format. Context tells the AI who it is and what situation it is operating in. The task gives it a clear, specific instruction about what to do. The output format describes what the response should look like — a list, a paragraph, a table, code, and so on. When all three are present, the AI has a much easier time producing exactly what you need.

Why Vague Prompts Fail

Consider the prompt "Tell me about space." What does that even mean? Space travel? Outer space? Personal space? The AI has to guess, and guessing means inconsistent results. Now compare that with: "You are a science educator. Explain the concept of gravity in outer space to a curious 10-year-old, using simple analogies. Keep your answer under 150 words." The second prompt leaves almost nothing to chance.

Context Sets the Stage

Context is often the most undervalued part of a prompt. By telling the AI what role to assume — "You are a patient math tutor" or "You are a senior software engineer reviewing code" — you anchor its behavior. Context can also include relevant background information, such as "The student has already learned addition and subtraction but has not yet encountered multiplication."

Start Practicing

The best way to learn prompt engineering is by doing it. In the practice exercise below, you will write a prompt that asks an AI to explain photosynthesis to a 10-year-old. Focus on including all three pillars: context (who the AI is), task (what it should explain), and output format (how the answer should be structured).