LESSON · 1 OF 5

What makes a good prompt

What makes a good prompt

A prompt is just the text you send the model. The quality of the answer tracks the quality of the prompt more than anything else, and the good news is that a strong prompt isn't clever or long. It's clear. Three pieces do most of the work:

  • The task - what you actually want done. "Summarize this", "rewrite this email", "explain this command".
  • The context - what the model needs to know to do it well. Who the answer is for, the text it should work from, any constraint that matters.
  • The desired format - the shape you want back. One sentence, a bullet list, a code block, plain English with no jargon.

Leave out the task and the model guesses at your intent. Leave out the format and you get whatever length and shape it defaults to, which is often a wall of text you then have to trim yourself.

Vague vs specific

Watch what happens when you go from a bare instruction to one that names the task, the audience, and the format:

  • Vague: explain tar
  • Specific: Explain what the command tar -xzf backup.tar.gz does, in two sentences, for someone new to Linux

The vague version might get you a history of the tar format, a table of every flag, or three paragraphs you didn't want. The specific version says exactly what to explain, how long the answer should be, and who it's for. Same model, very different reply.

You don't need magic words

You'll see people trade "prompt hacks" and secret phrases. Ignore most of it. The model responds to plain, direct instructions. If a human colleague could follow your prompt and produce what you wanted, the model usually can too. If your request would confuse a person - too vague, missing the text to work on, no hint about the format - it'll confuse the model as well.

The rest of this topic takes these three pieces one at a time: where the instructions live (the system and user roles), and how being specific changes the answer you get.


Your lab setup

This VM comes preconfigured with your AI keys - just type claude to get started. Your key and URL are already set as $OPENAI_BASE_URL and $OPENAI_API_KEY.

Spin up a fresh environment and practice live.
linux-basic-ai · fresh machine · ready in under a minute