You’ve gotten your language model up and running. Now it’s about getting good answers out of it. The input to a model is called a prompt. And the art of writing good prompts is called prompting. The good news: You don’t need any secret formulas. It’s enough to clearly say what you want.
Imagine a new colleague
The best comparison: A language model is like a very well-read new colleague on their first day at work. They know a lot, but they don’t know you, your company, or your preferences. If you just say, “Write something about the meeting,” you’ll get something random. If you explain who it’s for, what it’s for, and what form it should take, the result gets much better.
That’s exactly how good prompting works. Anything the model needs to know has to be in the prompt. It can’t ask follow-up questions about what you meant unless you ask it to.
The five building blocks of a good prompt
Not every prompt needs all of these parts. But these building blocks help:
- Task: What should be done? “Write,” “summarize,” “compare,” “correct.”
- Context: What is it about, who are you, what’s the background?
- Audience: Who is the result for? The boss, children, experts?
- Format: What should it look like? A list, table, email, three sentences, max 100 words.
- Tone: Casual, formal, friendly, factual?
An example. Instead of:
“Write an email about the heating.”
better:
“Write a short, polite email to my property management company. The heating in my apartment has been failing at night for the past three days. I’m asking for an appointment with a technician this week. Max 120 words, factual tone.”
The second prompt is longer, but the result fits right away.
Show examples instead of describing them
Sometimes it’s hard to describe a style. Then just show an example. That often works better than any explanation.
“Write product copy in this style. Example: ‘The mug for morning grumps. Keeps things warm, looks good, forgives everything.’ Now please do one for: a wool blanket.”
One or two good examples are usually enough. Make sure they really show what you want. The model will also pick up unwanted quirks.
Step by step for difficult tasks
For complex tasks, it helps to break them down. Instead of asking for everything at once:
- First have it create an outline.
- Review and adjust the outline.
- Then have it expand section by section.
You can also ask the model to think first: “Think step by step first, then give the answer.” With many models, that improves math and logic tasks. Modern reasoning models do that on their own anyway.
Use the conversation
A chat is not a one-time command. If the first answer isn’t right, improve it in the conversation:
- “Shorter, please. No more than five sentences.”
- “Less formal.”
- “The second point isn’t correct; we don’t have a budget for that. Please adjust.”
- “Ask me three questions first before you write the text.”
The last trick is especially useful. The model then asks for what it’s missing.
Tip: If a conversation gets long and the model starts drifting off, it’s better to start a new chat and briefly summarize the most important points. Remember the context window from Lesson 2.
The system prompt
Many programs like LM Studio or Open WebUI allow a system prompt. This is an instruction that is sent along invisibly before every conversation. There you can set permanent guidelines, such as:
“Always answer in German. Use informal you. Keep it brief. If you’re unsure about facts, say so.”
That way, you don’t have to write it again every time.
What prompting can’t do
Good prompting gets the best out of a model. But it doesn’t turn a small model into a big one. And it doesn’t reliably prevent made-up facts. Still, this helps:
- Provide facts yourself instead of asking for them.
- Ask the model to clearly state uncertainty.
- Double-check important statements.
Important: Small local models lose track more quickly than large ones when instructions are very long and nested. Better to give clear, short tasks one after another.
You can find more examples and techniques in the guide Prompting for Text. We collect ready-made templates to try in the Prompt Library.
The main points in brief
- Write as if you were briefing a smart but clueless new colleague.
- Task, context, audience, format, and tone make prompts better.
- Examples often say more than long explanations.
- Break down difficult tasks and improve answers in the conversation.
- A system prompt stores permanent instructions.