/ toolkit 02
Prompt Training for Beginners
Seven short lessons that turn a beginner into someone who reliably gets useful answers from an LLM. Each lesson has a bad, good, and best version of the same prompt, plus a takeaway you can steal today.
start here
The mental model
An LLM is not a database and not a search engine. It is a next-word predictor with a huge memory of patterns. Your prompt is a stage: set the scene (role and context), give the actor a line (task), tell them the shape of the scene (format), and mark the exits (constraints). Do that and the performance is almost always usable.
1. Give the model a role
A role sets tone, vocabulary, and depth. Without one, you get a bland average of the internet.
Roles are not magic spells. They are shortcuts that bias the model's next-word probabilities toward a domain. 'You are a kindergarten teacher' picks simpler words. 'You are a senior tax lawyer' pulls in statutes and caveats.
Explain compound interest.
You are a math tutor. Explain compound interest.
You are a patient math tutor for a 12-year-old. Explain compound interest with one relatable analogy, then a 3-line worked example using $100 at 5% for 3 years.
2. Load the context
The model does not know your world. Paste the facts it needs, do not assume it can guess.
Context is anything that is true today but was not in the training data: your codebase, this week's sales, the customer's name, the policy PDF. Retrieval augmented generation (RAG) is just automated context loading.
Is our refund policy okay for this case?
Our refund policy: full refund within 14 days. The customer bought 20 days ago. Is a refund appropriate?
Policy: 'Full refund within 14 days; store credit within 30 days; no refunds after 30 days.' Customer: bought on Day 20, product is unopened, first-time buyer. Question: Which option applies and how should we phrase the reply?
3. Say the task as a verb
Vague verbs get vague output. Pick summarize, extract, classify, rewrite, translate, critique, draft.
The task is the single most important sentence. If a colleague could not do the job from that one line, the model cannot either. Split multi-step jobs into sequential prompts or numbered subtasks.
Do something with this meeting transcript.
Summarize this transcript.
From this transcript, extract: 1) decisions made, 2) action items with owner and due date, 3) unresolved questions. Return as three bulleted lists.
4. Pin the output format
If you will parse it, ask for JSON. If a human reads it, ask for structure.
Models drift toward prose. Explicit format instructions ('Return only valid JSON matching this schema…') dramatically reduce follow-up cleanup and API errors.
Give me the details of this invoice.
Give me the invoice details as a Markdown table.
Return ONLY a JSON object with keys: invoice_number (string), date (YYYY-MM-DD), total_usd (number), line_items (array of {name, qty, price}). No prose.5. Add guardrails
Tell the model what NOT to do. 'Do not guess' is worth its weight in gold.
Constraints reduce hallucinations, control length, and enforce safety. Common ones: 'Use only the sources provided', 'If unsure, reply I do not know', 'Under 100 words', 'British English', 'No emojis'.
Write a bio for our website.
Write a 100-word bio for our website in a friendly tone.
Write a bio for our website. Rules: exactly 80 to 100 words; friendly but professional; British English; only use facts from the notes below; if a fact is missing, leave a [TODO] placeholder rather than invent.
6. Show, do not tell (few-shot)
One or two examples of input -> desired output often beat a paragraph of rules.
Models are excellent pattern matchers. If the format is tricky (a niche JSON schema, a specific tone, a translation style), demonstrate with 1 to 3 examples then present the real input.
Classify these tickets as urgent, normal, or low.
Classify each ticket as urgent, normal, or low. Reply with just the label.
Classify each ticket. Reply with only the label. Example 1 Ticket: 'Site is down, no one can log in.' Label: urgent Example 2 Ticket: 'Typo on the pricing page.' Label: low Now classify: Ticket: 'Checkout button broken on mobile only.' Label:
7. Iterate, do not restart
Bad first answer? Do not rewrite the whole prompt. Reply with a targeted correction.
Treat the conversation like pair-programming. 'Good, but shorten section 2 and drop the bullet on pricing' is faster than a whole new prompt. Save the winning prompt in a doc for next time.
(after a weak answer) Try again.
That was too long. Redo in 100 words.
Keep the structure. Cut section 2 by half, remove the pricing bullet, and add one concrete example in section 3.
print this
Cheat sheet
- Role: who is speaking
- Context: facts from your world
- Task: one clear verb
- Format: JSON, table, bullets, length
- Constraints: what to avoid, refusal rule
- Examples: 1 to 3 few-shot pairs
- Iterate: send targeted diffs, not new prompts