- Home
- AI Handbook
- Fundamentals
- Prompt fundamentals
[ Fundamentals ]
Prompt fundamentals
Target audience: everyone | Prerequisites: 1.2 Capabilities and limits: what is worth automating
What you'll learn
After this document you will be able to:
- explain what a prompt is and why the quality of the result depends directly on it;
- build a reliable prompt from five parts: a clear task, context, a role, the output format, and examples;
- avoid the five most common mistakes that make answers unpredictable;
- improve a prompt step by step — test, fix, test again.
In plain terms
A prompt is the work order you give to a very smart assistant who does not yet know your company. It is kind, fast, and well-read — but it knows nothing about your customers, products, prices, or customs until you tell it. The more precise the order, the better the result: a vague command produces a vague answer, not an understanding assistant.
What a prompt exactly is
In plain terms: the prompt is the entire instruction you give the model before the answer — the question or task, the data, the constraints, and the examples together. The model responds to that whole, not only to your question.
From document 1.1 you know that the model predicts the answer based on what it sees at once — the context window (the amount of text the model can see at once). The prompt is exactly what you put into that window. So a good prompt is not a styling exercise but a work tool: the same task with a weak prompt and a strong prompt can produce completely different results.
Two rules to keep in mind in every case:
- The model does not read minds. It knows only what is written in the prompt. If you don't say that the customer is a five-year loyal customer, the model doesn't know it — and answers as if it were anyone.
- The model does not produce facts on its own. If the information needed for the answer is missing from the prompt, the model fills the gaps with general knowledge — which may not match your company. Guessing at the gaps is one of the common causes of the hallucination (an answer the model states confidently but that is false) described in 1.1.
A good prompt in 5 parts
In plain terms: a good prompt is like a proper work brief: what to do, what the situation is, from whose perspective, what the result will look like, and an example of good work. Five parts — five answers.
1. A clear task
One task, a clear verb, concrete requirements.
Summarize the following meeting minutes into five key points.
2. Context and local information
All the facts the model cannot know on its own: company rules, customer data, document content, constraints.
Our store's return window is 14 days. The customer bought the product on 03.01.2026 and asks for a return.
3. The role
From whose perspective and with what tone the answer must come. The role sets the vocabulary, the attitude, and the depth.
You are a polite and businesslike customer support agent at a small online store.
4. The output format
Length, shape, language, and target group — so the result is predictable and immediately usable.
Reply in the form of an email, up to 100 words, in Estonian, as two short paragraphs.
5. Examples
One or two examples of the desired result teach more than long explanations — the model imitates the pattern shown.
Example: the customer asks “is the product in stock?” → “Hello! Yes, product X is in stock — we will ship it as early as tomorrow!”
You don't always need every part: for a simple request the task is enough. The more the system must firmly rely on the answer — for example, when the answer goes on to another program in a fixed, machine-readable form (e.g., a table or JSON; more on this in document 2.2) — the more it pays to write out all five parts.
From a weak prompt to a strong one: before and after
The task: reply to a customer who is angry that their order was late.
Weak prompt:
Write a reply to the customer.
The same task, well framed:
You are our online store's customer support agent — calm and considerate (role).
Write a reply email to a customer who is unhappy that the order arrived
two days late (task).
Context: the customer has been a loyal customer of ours for three years. The delay
was the shipping company's fault. Our practice with delays is to offer a 10%
discount on the next purchase (local info).
Format: an email, up to 100 words, friendly tone (output format).
Tone example: “Hi, Priit! We apologize for the delay — we understand
this is inconvenient…” (example)
Why does the second one work better?
| Addition | What it actually changes |
|---|---|
| Task | The model knows what to write — not “something to the customer,” but a letter that resolves a concrete situation |
| Role | Tone and vocabulary: the answer sounds like customer support, not a neutral robot |
| Context | The facts come from your data, not the model's imagination — this also protects against hallucination |
| Format | Length and tone are predictable — the letter is immediately fit for a human's quick review before sending |
| Example | Provides a style benchmark by which the letter is shaped |
A weak prompt is not “wrong” — it is a good starting point. The difference is that a weak prompt leaves all decisions to the model, while a strong prompt makes the important decisions in advance.
The 5 most common mistakes
In plain terms: when the answer comes out poor, almost always one of these five mistakes is to blame — and each fix is as short as the mistake itself.
- An instruction that is too short. “Write sales copy.” — about what, to whom, how long, in what tone? The model must make all the decisions itself and makes them randomly. Fix: add at least the task and the format.
- Contradictory requirements. “Explain as thoroughly as possible, but don't use more than two sentences.” The model cannot satisfy both and decides itself which matters more — and may decide differently every time. Fix: state the priority: “keep it short, up to three sentences, but the warranty period must be mentioned.”
- Important information buried in a long middle. In a long prompt the beginning and the end get the most attention, the middle part the least (see 1.1 on attention). Fix: put the instructions at the start of the prompt, the data clearly separated, and repeat the most critical requirement at the end.
- A task without a goal. “Write a reply to the customer” vs “write a reply to the customer so that they remain our loyal customer.” The goal — for whom and for what — changes the letter's content and emphasis. Fix: add one sentence about what the result is needed for.
- Assuming the model reads minds. “As usual,” “in our usual style” — the model does not know your customs or previous conversations unless they are in the context. Fix: write the custom out or give an example.
A step-by-step example: building a prompt that answers a customer letter
Situation: a customer writes: “Hello! When will my order no. 8812 arrive? I ordered a week ago already.”
Step 1 — start with a weak prompt.
Reply to the customer's email.
Result: random — a delivery time either too far out or invented.
Step 2 — add a clear task.
Reply to the customer's email: say when order no. 8812 will arrive.
Step 3 — add context and local information.
Reply to the customer's email: say when order no. 8812 will arrive.
Data from the system: the order was placed on 28.09.2026 and shipped on 02.10.2026;
the courier company's estimate: 2–3 business days.
Now the answer is based on your data, not the model's guess.
Step 4 — add a role.
You are our online store's customer support agent — friendly and precise.
Reply to the customer's email: say when order no. 8812 will arrive.
Data from the system: the order was placed on 28.09.2026 and shipped on 02.10.2026;
the courier company's estimate: 2–3 business days.
Step 5 — add the output format.
You are our online store's customer support agent — friendly and precise.
Reply to the customer's email: say when order no. 8812 will arrive.
Data from the system: the order was placed on 28.09.2026 and shipped on 02.10.2026;
the courier company's estimate: 2–3 business days.
Reply in the form of an email, up to 80 words, in Estonian.
Step 6 — test and refine. Run the prompt and read the answer. For example: the answer is correct but does not apologize for the delay — add one line: “If the order is running late, apologize in one sentence.” And run it again. This is how a prompt evolves in real use: one small change at a time, each change's effect tested. The letter going to the customer is reviewed by a human before sending — this keeps a human in the loop (human-in-the-loop); document 3.5 Safety: limits and human-in-the-loop discusses that principle more thoroughly.
Summary
- The prompt is the entire instruction you send and the quality of the result depends directly on it — the model does not read minds and does not produce your company's facts on its own.
- A reliable prompt consists of five parts: a clear task, context and local information, a role, the output format, examples. The more important the result, the more parts you use.
- The five most common mistakes: an instruction that is too short, contradictory requirements, important information buried in a long middle, a task without a goal, and assuming the model reads minds.
- A prompt improves step by step: the first attempt is never final — test, make one change, test again.
What's next?
- previous → 1.2 Capabilities and limits: what is worth automating
- next → 1.4 Where AI automation already works: use cases
- Going deeper with templates and the testing cycle → 2.1 Toward a good prompt: structure, role, example, output format
- Structured output — JSON (a machine-readable data format) and other predictable output forms → 2.2 Structured output: lists, tables, and JSON
- Prompt version control — how to store and version prompts → 2.6 Managing prompts as an asset
- API (a programmatic interface — how to call the model from code) → 3.1 API integrations: calling the model from code
- AI agents — systems that use prompts for planning and independent action → 4.1 Agent systems: what they are and when you need them
- back → handbook index
Last updated 2026-10-05