Skip to main content
AI Foundations

⏱ About 15 min15 XP

What Is a Prompt?

Imagine you sit down at a piano and push a single key. A sound comes out — but it is just one note. Now imagine you play a carefully chosen chord, with the right timing and the right dynamics. Suddenly you have music. The piano had the same capabilities both times; what changed was the input. A prompt is your input to a generative AI model. It is the instruction, question, context, or example — or any combination of these — that you give the model before it generates a response. Everything the model produces is shaped by the prompt. A vague prompt is like pressing one key. A thoughtful prompt is like playing a chord: richer, more intentional, more useful. This lesson establishes what a prompt actually is; the next two lessons will teach you to write them well.

The Anatomy of a Prompt

A prompt can be as short as one word — 'Summarize' — or as long as many paragraphs of structured instructions. But prompts tend to contain some combination of five ingredients, even if not all five are always present. Task: What do you want the model to do? ('Write,' 'Explain,' 'List,' 'Compare,' 'Translate.') Context: What background information does the model need? ('I am a seventh-grader studying for a test.' 'This is for a school newspaper article.') Format: How should the output be structured? ('In three bullet points.' 'As a dialogue.' 'In exactly two sentences.') Constraints: What should the model avoid or include? ('No jargon.' 'Use only facts, not opinions.' 'Keep it under 100 words.') Examples: Show the model what good output looks like. ('Here is an example of the style I want: ...') Beginner prompts often include only the Task. Expert prompts layer in Context, Format, Constraints, and Examples — and the results are dramatically better.

Definition: Prompt

A prompt is the complete input you provide to a generative AI model: the task, context, format instructions, constraints, and examples that shape what the model generates. The model has no other way to know what you want — everything depends on the prompt.

Here is a concrete comparison. Consider these two prompts sent to the same language model: Prompt A: 'Tell me about photosynthesis.' Prompt B: 'Explain photosynthesis to a curious 12-year-old who has already learned that plants make their own food but does not know the chemistry. Use an analogy involving a kitchen. Keep your explanation to three short paragraphs. End with one question that would make a good experiment.' Prompt A will produce a generic, textbook-style explanation — possibly too advanced, possibly too basic, definitely not tailored to anyone. Prompt B uses all five ingredients: Task (explain), Context (12-year-old, what they already know), Format (three paragraphs), Constraints (kitchen analogy, no raw chemistry), and implied Example through the analogy instruction. The model is the same. The difference in output is entirely due to the quality of the steering.

System Prompts vs. User Prompts

When you use an AI chatbot or app, there are actually two kinds of prompts at work, even if you only see one of them. A system prompt is written by the developer who built the app. It sets the model's persona, rules, and context before you ever type anything. It might say: 'You are a friendly math tutor for middle school students. Always encourage students before giving the answer. Never solve the problem for them; guide them step by step.' A user prompt is what you type. The model sees both the system prompt and your message, and generates a response that honors both. When you use a consumer AI app, you are writing user prompts on top of a hidden system prompt you cannot see. This is why the same underlying model can feel very different in different apps — the system prompt shapes its behavior, tone, and capabilities.

Match each prompt ingredient to the example that illustrates it.

Terms

Task
Context
Format
Constraint
Example

Definitions

Write a three-paragraph summary of this article
Avoid using any statistics or percentages in your response
Here is a sample response in the tone I want: cheerful but precise
I am preparing a speech for my school's science fair
Present your answer as a numbered list with five items

Drag terms onto their definitions, or click a term then click a definition to match.

Treat the Model Like a New Colleague

A useful mental model: imagine you just hired someone brilliant who knows nothing about your specific situation. You would not just say 'write something.' You would explain what you need, who it is for, what format to use, and what to avoid. That is exactly the mindset for writing good prompts.

Which of the following is the most complete prompt?

What is a system prompt?

Prompt Challenge

Write a prompt asking an AI to explain a scientific concept to a middle school student. Your prompt should give the model enough guidance to produce a useful, appropriately-leveled explanation.

Your prompt should…

  • Tell the AI which concept you want explained
  • Mention that the audience is a middle school student
  • Ask the AI to use an analogy or real-world example

Upgrade a Weak Prompt

  1. You are going to transform a one-key prompt into a full chord.
  2. Start with this deliberately weak prompt: 'Write something about dogs.'
  3. First, identify what is missing. This prompt has only a vague Task and none of the other four ingredients.
  4. Now rewrite it. Build a new version that includes all five ingredients from this lesson.
  5. Task: state clearly what you want written.
  6. Context: invent a realistic situation — who is it for, and what is the purpose?
  7. Format: specify the structure and the length.
  8. Constraints: add at least one thing the response must include or must avoid.
  9. Examples: describe the tone or style you want, or give a short sample.
  10. Write your upgraded prompt out in full.
  11. Underneath it, label each part: write the ingredient name next to the words that serve it.
  12. Finally, swap prompts with a partner. Read their upgraded prompt and predict, in two or three sentences, how an AI's response to it would differ from a response to the original weak prompt.