Prompt

What a prompt is, why its wording decides the quality of the result, and how to build one from four basic building blocks.

What a prompt is

A prompt is the input you use to steer a language model like ChatGPT or Claude. In classic programming you write in a fixed syntax, here you write in plain language. The model translates that language into a calculation and gives you back text, an image or code.

The best comparison is a briefing for an outside contractor. If the instruction stays vague ("Put together a concept"), the result is a matter of luck. If you name the audience, format and constraints, you get something you can keep working with. That's how large language models and generative AI work in general.

The four building blocks

A prompt that works reliably almost always answers the same four questions. Who should the AI be (role), and what should it do (task)? What should the result look like (format), and what do you need it for (context)? If any of these is missing, the model has to guess.

The role limits which vocabulary gets drawn on. A "senior marketing strategist" writes differently than a "junior copywriter", even with the same model behind both. The context supplies audience and goal, and without it the answer falls back to the statistical average. The format decides whether you end up with a table, a list or running text, and that often changes the output more than you'd think.

Under the hood, the model doesn't process words, it processes tokens. That's why long, convoluted prompts cost more and take up more of the context window. Systematically building and refining these inputs is called prompt engineering.

Zero-shot, few-shot and iteration

There are two basic techniques for instructing a model. With zero-shot prompting you set a task without examples, like "Write a tweet about SEO". With few-shot prompting you add one to three examples for the model to orient itself by. In practice few-shot almost always wins, because the AI picks up the pattern of the examples instead of just following the description.

The most common mistake is treating the first output as final. The loop makes more sense: instruct, check, refine. "The argument holds up, but shorten the second paragraph" is a normal second step, not a sign of a bad first prompt. How to build a prompt like that in practice is covered in more detail in prompting basics.

The most common mistakes

Logical contradictions like "Write in detail, but keep it short" destabilize the output, because the model no longer knows which part of the instruction applies. Without context, the answer comes across as generic. And if you stack too many instructions into a single prompt, you lose some of them, because the model simply skips individual points.

What helps is breaking complex tasks into consecutive steps. This technique is called chain-of-thought, and it costs two extra minutes of work for a noticeably better result.

Back to the AI and Automation Glossary.

FAQ

How is a prompt different from a classic programming command?
A classic command follows a fixed syntax that the computer executes exactly as written. A prompt, on the other hand, is natural language that the language model interprets and translates into probabilities. That's why the same wording can produce slightly different results across two requests, while the same code always does the same thing.
How long does a good prompt have to be?
There's no fixed word count. What matters is whether the four building blocks of role, task, format and context are covered. One sentence is enough if the task is simple and the context is clear anyway. For more complex tasks a longer prompt with examples pays off, because it gives the model more to go on.
Why does the same prompt work differently well in ChatGPT and in Midjourney?
Text models like ChatGPT respond to grammar and logic, so full sentences with clear instructions work best. Image generators like Midjourney read keywords and style parameters more than complete sentences. A prompt that works well for one system has to be built completely differently for the other.
Portrait of Eric Hinzpeter

Eric Hinzpeter

Eric Hinzpeter, Senior B2B Content Strategist. He builds AI agents and marketing automation for production use and writes up what comes out of it here.

About meLinkedIn (new tab)