Skip to main content

What Makes Some Prompts Work Like Magic?

You’ve learned that AI is a conversation partner that predicts based on patterns. Now let’s get practical: what actually makes a prompt work? Think about giving directions to a new employee. “Handle the client situation” could mean anything from sending an email to scheduling a meeting to issuing a refund. But “Send a friendly follow-up email to the client confirming their order shipped today” gives them exactly what they need to help you. AI works the same way. Vague instructions force guessing. Clear instructions let AI focus on actually delivering what you need. The good news? Writing great prompts is a learnable skill that builds on the conversation mindset from Lesson 1 and how AI predicts from Lesson 2.

Core Concepts

The Three Pillars: Task, Context, and Format

Think of every great prompt as a three-legged stool. Remove any leg, and the whole thing gets wobbly. 1. Task: What do you want the AI to do? This is your verb, your action, your mission statement. Be specific about the actual work you need done.
  • Weak: “Help me with this email.”
  • Strong: “Rewrite this email to be more professional while keeping the friendly tone.”
2. Context: What background does the AI need? AI doesn’t know your situation, your audience, or your constraints unless you tell it. Context fills in the blanks.
  • Weak: “Write a welcome message.”
  • Strong: “Write a welcome message for new volunteers at a food bank, most of whom are first-time volunteers in their 20s and 30s.”
3. Format: How should the response look? Do you want bullet points or paragraphs? A formal report or a casual summary? Three sentences or three pages? Tell the AI what shape the answer should take. When an app needs an exact shape, such as JSON, it can ask for structured output.
  • Weak: “Explain project management.”
  • Strong: “Explain project management in 5 bullet points that a high school student could understand.”
When you get all three right, the AI stops guessing and starts delivering what you need.

Being Specific vs. Being Vague

Here are two prompts asking for essentially the same thing. Which will get better results? Prompt A:
“Write something about team communication.”
Prompt B:
“Write a 200-word article for managers explaining three specific ways to improve team communication in remote work environments. Use a conversational but professional tone.”
It’s not even close, right? Prompt A might produce a generic essay that could apply to anyone, covering everything from body language to email etiquette: technically correct but unhelpful. Prompt B produces a focused, practical article that speaks directly to managers, addresses remote work specifically, and delivers exactly three actionable tips in about 200 words. The specificity spectrum looks like this: Notice the pattern? Specific prompts include WHO the audience is, WHAT the scope is, HOW it should be presented, and sometimes even WHY you need it.

The Power of Constraints: Telling AI What NOT to Do

Here’s a counterintuitive truth: sometimes the best way to get what you want is to tell AI what you don’t want. Constraints are like guardrails on a mountain road. They don’t slow you down; they keep you from driving off a cliff. Examples of powerful constraints:
  • “Do NOT use jargon or technical terms”
  • “Avoid cliches like ‘think outside the box’ or ‘at the end of the day’”
  • “Don’t include any information about pricing”
  • “Skip the introduction and get straight to the actionable advice”
  • “Do not make up statistics; only include claims you can support”
Why constraints work so well: AI is trained to be helpful, which sometimes means it over-delivers. It might add flowery introductions when you want directness. It might use industry buzzwords when you need plain language. It might include disclaimers when you just want the answer. Constraints draw clear boundaries, like telling a friend, “I need advice, but please don’t suggest I talk to my ex.” You’re not being rude; you’re being clear about what kind of help you actually need. A prompt transformation: Before:
“Write a product description for our new running shoes.”
After:
“Write a product description for our new running shoes. Keep it under 100 words. Focus on comfort and durability, not style. Avoid superlatives like ‘best’ or ‘amazing.’ Don’t mention competitor brands.”
That second prompt will produce something you can actually use, with far less back-and-forth.

Prompt Length: When More is Better and When Less is More

“Should my prompts be long or short?” It depends. Here’s how to decide. Shorter prompts work when:
  • The task is simple and self-explanatory
  • You’re brainstorming and want variety
  • You’re having a back-and-forth conversation and can clarify as you go
  • The context is already established from earlier in the conversation
Example of a good short prompt:
“Give me 10 names for a bakery that specializes in sourdough.”
This works because the task is clear, the context is embedded (bakery + sourdough), and the format is implied (a list of names). Longer prompts work when:
  • The task is complex or multi-step
  • You need a specific output format
  • The context requires explanation
  • You want to avoid multiple rounds of revision
  • Precision matters more than speed
Example of a good long prompt:
“I’m a nonprofit director preparing a board presentation about our volunteer program. Write an executive summary (250-300 words) covering: 1) volunteer growth over the past year, 2) key challenges we’ve faced, and 3) our goals for next year. The tone should be optimistic but honest. Board members are busy professionals who appreciate data and clear takeaways. Assume I’ll fill in the specific numbers later; use [X] as a placeholder.”
This prompt is longer, but every word earns its place. The golden rule: Your prompt should be as long as it needs to be and no longer. A 50-word prompt that gives clear, complete instructions beats a 200-word prompt that rambles. But a thorough 200-word prompt that prevents three rounds of revision beats a 50-word prompt that leaves the AI guessing.

Try It Yourself

Try these three exercises with any AI assistant.

Exercise 1: The Three Pillars Check

Take this vague prompt and rewrite it using Task, Context, and Format: Original: “Help me with my presentation.” Your rewrite should include:
  • What specific help do you need? (Task)
  • What’s the presentation about, and who’s the audience? (Context)
  • What form should the help take? (Format)
Hint: A great rewrite might look like: “Create an outline for a 10-minute presentation about our team’s Q3 results. The audience is company executives who care most about revenue growth and customer retention. Format it as bullet points with suggested talking times for each section.”

Exercise 2: The Specificity Upgrade

Transform these vague prompts into specific ones:
  1. “Write a social media post.” Your specific version: ____________
  2. “Explain machine learning.” Your specific version: ____________
  3. “Give me recipe ideas.” Your specific version: ____________

Exercise 3: Add Constraints

Take this prompt and add at least three constraints that would make the output more useful: Original: “Write a thank-you email to a donor.” Your version with constraints: ____________ Think about: length, tone, what to include, what to avoid, format preferences.

Common Pitfalls

Pitfall 1: The Kitchen Sink Prompt

The problem: Cramming so many requirements into one prompt that the AI gets confused or drops some of them. What it looks like:
“Write a blog post about productivity that’s funny but professional, includes statistics, tells a personal story, is SEO-optimized for the keyword ‘time management,’ has a compelling headline, includes a call to action, is between 800-1000 words, uses the inverted pyramid structure, avoids passive voice, and mentions our product naturally without being salesy.”
The fix: If you have this many requirements, break them into steps. First, ask for an outline. Review it. Then ask for a draft. Then ask for specific revisions. Complex outputs often require a conversation, not a single prompt.

Pitfall 2: Assuming the AI Knows Your Context

The problem: Leaving out crucial information because it feels obvious to you. What it looks like:
“Write a follow-up email about the meeting.”
The AI doesn’t know: What meeting? With whom? What was discussed? What’s the relationship? What’s the goal of the follow-up? The fix: Pretend you’re briefing a smart new colleague who just joined today. They’re capable, but they don’t know your history, your relationships, or your unspoken assumptions.

Pitfall 3: Format Amnesia

The problem: Getting a response in the wrong format and then struggling to reshape it. What it looks like: You wanted bullet points but got a wall of paragraphs. You wanted a brief answer but got an essay. You wanted plain language but got academic prose. The fix: State your format preferences upfront. “Use bullet points.” “Keep this under 100 words.” “Write like you’re explaining to a friend over coffee.” AI is remarkably good at matching formats; you just have to ask.

Pitfall 4: The Vague Feedback Loop

The problem: Responding to an unsatisfactory output with equally vague feedback. What it looks like:
  • You: “Write a product description.”
  • AI: [Writes something]
  • You: “That’s not quite right.”
The AI can’t improve without knowing what specifically missed the mark. The fix: Be specific about what needs to change. “The tone is too formal; make it more playful.” “Focus more on the health benefits and less on the ingredients.” “Shorten the first paragraph and expand the third.” Precise feedback leads to precise improvements.

Level Up

The Scenario: You work for a small bookstore and need to write a monthly newsletter email. Your audience is loyal customers who appreciate book recommendations but don’t want to feel marketed to. Your Mission: Write a single prompt that would generate the first draft of this newsletter. Your prompt should:
  • Include all three pillars (Task, Context, Format)
  • Be specific about the tone and audience
  • Include at least two constraints
  • Specify the approximate length
Take 5 minutes to craft your prompt before moving on. Then actually use it with an AI assistant and see what you get! Bonus challenge: If the first output isn’t quite right, write a specific follow-up prompt that would improve it, using what you learned about avoiding the vague feedback loop.

Key Takeaway

Great prompts aren’t magic; they’re clear communication. Use Task-Context-Format, add constraints to keep AI focused, and match your prompt length to the complexity of the request.
Try it on Gloo: test a prompt before and after adding task, context and format in the Chat Playground, and compare the two answers. In an app, the task and format go in the system message.

What’s next

Most prompt problems aren’t about unclear tasks or wrong formats; they’re about missing context, so next you’ll dive deep into that pillar. When you write prompts for an app, Building with Guarded Endpoints shows where each part goes, and Using the Completions API sends your first one in code.

Lesson 4: Context is King

Explore why AI can’t read your mind (and what to do about it), learn the “pretend you’re explaining to a new coworker” test, and find out which kinds of context lead to better results.