Skip to main content
AI Foundations

⏱ About 15 min15 XP

Writing Clear Prompts

In Lesson 5, you learned that a prompt is the steering wheel of a generative model. Now we get practical. Knowing that prompts matter is not the same as knowing how to write them well. This lesson gives you four concrete tools — specificity, context, constraints, and examples — and shows exactly how each one improves results. By the end, you will have a usable framework for crafting prompts that work.

Specificity: Say Exactly What You Mean

The single most common prompting mistake is vagueness. 'Write something about climate change' could produce a poem, a scientific summary, a policy argument, a satire, or a children's story. The model has no way to know which you wanted — so it guesses, often landing in the middle of everything and the center of nothing. Specificity means choosing exact words for what you want. Compare: Vague: 'Explain photosynthesis.' Specific: 'Explain the light-dependent reactions of photosynthesis in two paragraphs, using the analogy of a solar panel charging a battery.' Vague: 'Make this better.' Specific: 'Rewrite this paragraph to be more concise. Remove any sentence that does not directly support the main argument. Aim for under 80 words.' In the specific versions, the model knows the scope (which part of photosynthesis), the depth (two paragraphs), the approach (an analogy), and the goal (more concise, specific criterion). Every clarification removes one possible misinterpretation.

The Specificity Principle

A prompt is not a search query. You are not hoping the model guesses your intent — you are instructing it. The more precisely you specify the task, format, length, tone, and approach, the less the model has to guess, and the more useful the output will be.

Context is the second tool. Models have no memory of who you are, what you have been working on, or what you already know. Every conversation starts fresh. This means you must provide any background information the model needs to serve you well. Ask yourself: Would a brilliant stranger, reading only this prompt, know enough to help me well? If you are a seventh-grader writing a persuasive essay, say so. If your audience is your school board, say so. If the text you want improved is a cover letter for a summer internship, say so. The model cannot infer what you did not write. Good context-setting also includes telling the model what role to play. 'You are a strict but fair editor' or 'Act as a patient tutor who never gives answers directly' shapes the model's entire response style.

Constraints and Examples

Constraints tell the model what to avoid. They are equally important as telling it what to do. Without constraints, models tend toward the generic middle: moderate length, moderate complexity, moderate vocabulary. If you want something outside that middle, you must say so. Useful constraints include: - Length: 'No more than 150 words.' 'At least three full paragraphs.' - Vocabulary: 'Explain this without using any jargon.' 'Use precise scientific terminology.' - Tone: 'Keep this professional and neutral.' 'Make this enthusiastic and encouraging.' - Content: 'Do not mention brand names.' 'Only include information from before 2020.' - Structure: 'Answer only in bullet points.' 'Do not use bullet points — write in flowing prose.' Examples are the most powerful tool of all. If you can show the model what a good output looks like, it calibrates itself to match that style, length, and quality. This technique — giving examples in the prompt — is called few-shot prompting. Even one good example dramatically sharpens the output.

Complete these prompting principles with the correct terms.

Providing background about yourself and your purpose is called giving the model . Showing the model a sample of the output you want is called prompting.
The Magic of One Example

If you are ever unsure how to describe the format or tone you want, do not spend five minutes trying to describe it in words. Just write one example of it. 'Here is an example of the format I want:' followed by a sample is often more effective than a paragraph of description.

A student wants the AI to write a poem but receives a dry, textbook-style paragraph instead. What is the most likely cause?

What is few-shot prompting?

Prompt Challenge

Write a prompt asking an AI to help you study for a history test by creating practice questions. Make sure the model knows exactly what topic, difficulty level, and format you want.

Your prompt should…

  • Tell the AI which history topic the questions should cover
  • Mention the difficulty level or grade level you want
  • Specify the format such as multiple choice or short answer

The Prompt Makeover

  1. Take each of these weak prompts and rewrite them using specificity, context, constraints, and at least one example where helpful.
  2. 1. 'Write an email.'
  3. 2. 'Help me with my essay.'
  4. 3. 'Explain the water cycle.'
  5. For each rewrite, label which prompt ingredients you added: Task, Context, Format, Constraint, or Example.
  6. Swap rewrites with a partner. Give each other feedback: Is there anything still vague? What else could be specified?
  7. Finally, choose your best rewritten prompt and discuss why it is better than the original.