Heidelberg AICurriculum
Track 3 · Beginner
3.1

Prompt Engineering

Get dramatically better answers from any AI

7 lessons 2026-08-06 AI-generated

1Overview

A beginner-to-advanced ladder of prompting techniques, each taught through a weak → strong prompt pair: be specific, give context, assign roles, show examples, structure with tags, think step by step, and ground answers in your sources. 18+ copy-ready examples.

In this chapter you will learn how to shape AI output by combining techniques such as assigning roles, providing clear context and audience, specifying exact formats and lengths, and using delimiters or tags to separate instructions from data. You will also see how step‑by‑step reasoning, grounding answers in supplied documents, and self‑critique loops improve accuracy and auditability. By applying these methods you can produce reliable, structured results—from executive summaries and legal drafts to support replies and data pipelines—without the model hallucinating or deviating from your constraints.

This chapter teaches you to turn a vague ask into a prompt that gets a specific, useful answer on the first try. It works through thirteen techniques in order of difficulty, from the wording of a single request to the multi-step pipelines that chain several prompts together.

The beginner tier fixes the most common failure. "Summarise this" invites a generic essay; being specific about the audience, the length, and what to include leaves nothing for the model to guess wrong. Giving context and audience does the same job differently — the same question about a p-value gets a better answer depending on whether you say you're a first-year student or a peer reviewer. Specifying format and length turns "explain X" into three short paragraphs or a table, so you get something scannable instead of a wall of text.

The intermediate tier shapes the response, not just its content. Assigning a role — "you are a peer reviewer", "you are a sceptical CFO" — shifts the model's standards, not just its vocabulary, raising the bar above a generic "check this". Few-shot examples show the input-to-output pattern you want instead of describing it, which pins the format more reliably than words alone. Delimiters — tags wrapped around pasted text — stop the model confusing your instructions with the data you handed it, which matters when that data contains sentence-like instructions of its own. Constraints, paired with an explicit "if you don't know, say so", are the first defence against a confident, invented answer.

The advanced tier is for jobs harder than a one-off chat message. Chain-of-thought — asking the model to reason step by step before answering — catches wrong shortcuts on multi-step problems, though it only adds length on a simple lookup. Decomposing a task into a chain of prompts (extract, then cluster, then write) beats asking for everything at once, and each stage maps onto a separate node in an n8n workflow. Structured JSON output lets the next tool in that pipeline parse the answer directly instead of scraping text. Grounding — answer only from the pasted source, quote the sentence, say "not stated" otherwise — is the strongest defence against hallucination, forcing the model to point at evidence instead of recalling it from memory. Self-critique closes the loop: the model drafts, grades its own work against a checklist, then hands back an improved version.

None of this works alone on a genuinely hard task, which is why the final technique — putting it all together — stacks role, context, delimiters, constraints, format, and step-by-step reasoning into one prompt. Real work usually needs several of these at once. The chapter's worked examples carry this across different jobs: a scientist grounding an answer in a pasted methods section, a support team using chain-of-thought to triage a ticket before replying, an investor scoring a pitch deck as strict JSON, a recruiter chaining CV screening into a draft shortlist for a human to approve. The techniques stay the same handful throughout — only the job changes.

1.1After this chapter you can
Turn a vague request into a specific, well-scoped prompt
Use roles, examples, and delimiters to control the output
Apply chain-of-thought and prompt chaining to multi-step tasks
Ground answers in your sources to avoid made-up facts
1.2How do I get better AI answers?

Combine specific prompts, clear context, role assignment, examples, tags, step‑by‑step reasoning, and source grounding to steer the model toward accurate, structured output.

1.3How can I prevent hallucinations?

Use step‑by‑step reasoning, ground the response in supplied documents, and include self‑critique loops so the model checks its output against your constraints before responding.

1.4The moves — weak → strong ladder
  1. 1Be specific
  2. 2Give context & audience
  3. 3Specify format & length
  4. 4Assign a role
  5. 5Show examples (few-shot)
  6. 6Use delimiters / tags
  7. 7Constraints & "what not to do"
  8. 8Let it think (chain-of-thought)
  9. 9Decompose & chain prompts
  10. 10Structured / JSON output
  11. 11Grounding / anti-hallucination
  12. 12Self-critique loop
  13. 13Putting it all together
Anatomy of a strong prompt A vague prompt vs. a structured prompt with Role, Context, Task, Examples, Format and Constraints — the six parts a model can act on. Anatomy of a strong prompt say what you want — then shape the response ✕ vague "write about dogs" → generic, guessy ✓ a prompt it can act on Role You are a vet writing for first-time owners. Context Audience: UK, no prior experience. Task Explain crate training as 5 concrete steps. Examples Match this tone: "short, upbeat sessions…" Format Numbered list, ≤150 words, plain English. Constraints No jargon. Say so if you're unsure. + advanced — let it think step by step · ground in your sources Same ask — a vague line vs. the parts a model can actually act on.

2Techniques

Learn

Beginner

Say what you actually want

Be specific Vague prompts get vague answers. Name the exact output you want.
Instead of

Summarize this paper.

Try this 💬 AI chat

Summarize this paper in 5 bullet points for a first-year student: the research question, the method in one line, the key finding (with the number), the main limitation, and why it matters.

Instead of

Make this email better.

Try this 💬 AI chat

Rewrite this email to my supervisor to be more concise and polite. Keep it under 80 words, keep the meeting request, and remove the apologetic tone.

Why it works: Naming the length, audience, and the exact things to include leaves nothing for the model to guess wrong.
Give context & audience Tell the model who it is helping and what for — the same question gets a different, better answer.
Instead of

Is this result significant?

Try this 💬 AI chat

I'm a biology master's student. I ran a t-test and got p=0.04 with n=12. Explain whether this is statistically significant, what the small sample size means for how much I should trust it, and what I should check before reporting it.

Why it works: Context (who you are, the real numbers, your actual worry) lets the model pitch the depth correctly and answer the question behind the question.
Specify format & length If you need a table, a list, or a fixed length — ask for it explicitly.
Instead of

Compare these three sequencing methods.

Try this 💬 AI chat

Compare Illumina, Nanopore, and PacBio sequencing as a markdown table with columns: method | read length | accuracy | cost | best use case. One short phrase per cell.

Instead of

Explain CRISPR.

Try this 💬 AI chat

Explain CRISPR gene editing in exactly 3 short paragraphs: (1) what it is, (2) how the cut-and-repair works, (3) one real research use. Avoid jargon a high-schooler would not know.

Why it works: A requested structure gives you a scannable, consistent answer instead of a wall of text you have to re-read.

Intermediate

Shape the response

Assign a role A persona activates the right vocabulary, depth, and standards.
Instead of

Check my methods section.

Try this 💬 AI chat

You are a careful peer reviewer for a molecular biology journal. Review my methods section below for any detail missing that would stop someone reproducing the experiment. List each gap as a specific question.

Why it works: "Peer reviewer" shifts the model into reproducibility-checking mode and raises the bar far above a generic "check this".
Show examples (few-shot) Give 2–3 examples of the input→output you want; the model copies the pattern.
Instead of

Turn these notes into flashcards.

Try this 💬 AI chat

Turn these notes into Q&A flashcards. Follow this format exactly: Note: Mitochondria produce ATP. Q: What do mitochondria produce? → A: ATP. Now do the same for each note below: [your notes]

Instead of

Classify these customer messages.

Try this 💬 AI chat

Classify each message as bug / feature-request / praise. Examples: "It crashes on save" → bug "Could you add dark mode?" → feature-request "Love the new update!" → praise Now classify: [messages]

Why it works: One worked example pins the exact format more reliably than any description of it.
Use delimiters / tags Separate your instructions from the data you paste, so the model never confuses the two.
Instead of

Extract the genes mentioned in this abstract: [pastes a long abstract]

Try this 💬 AI chat

Extract every gene named in the abstract between the tags. Return only a comma-separated list. <abstract> …paper text here… </abstract>

Why it works: Tags make it unambiguous what is instruction vs. content — essential when the pasted text itself contains sentences that look like commands.
Constraints & "what not to do" Tell the model what to avoid and how to handle gaps.
Instead of

What does this paper say about side effects?

Try this 💬 AI chat

Using only the text below, list the side effects reported. Do not add side effects from your own knowledge. If none are mentioned, reply exactly: 'None reported in this text.'

Why it works: Explicit limits and a defined "if you don't know" path are the single biggest defense against confident, made-up answers.

Advanced

Reasoning & pipelines

Let it think (chain-of-thought) Ask the model to reason before answering; accuracy on multi-step problems jumps.
Instead of

A culture doubles every 3 min and fills the flask at 60 min. When is it half full?

Try this 💬 AI chat

A culture doubles every 3 min and fills the flask at 60 min. When is it half full? Think step by step, show your reasoning, then give the final answer on the last line.

Instead of

Which of these two experimental designs is better?

Try this 💬 AI chat

Compare these two experimental designs. First list the assumptions each one makes, then the failure modes of each, then conclude which is better and under what condition.

Why it works: Forcing the steps out loud stops the model blurting a wrong shortcut (the flask is half full at 57 min, not 30).
Decompose & chain prompts Break a big task into stages — and in n8n, each stage can be its own node.
Instead of

Read these 20 papers and write me a literature review.

Try this 💬 AI chat

Stage 1 — for each paper, extract {method, finding, limitation} as JSON. Stage 2 (separate prompt) — given those 20 records, group them by method and write one paragraph per group with citations.

Why it works: Smaller steps are more reliable and debuggable, and they map directly onto a multi-node n8n pipeline.
Structured / JSON output When the answer feeds another tool, demand a strict schema.
Instead of

Pull out the key facts from this paper.

Try this 💬 AI chat

Return ONLY valid JSON, no prose and no markdown fences: {"title": string, "organism": string, "main_finding": string, "sample_size": number}

Why it works: A strict schema lets the next n8n node parse the output directly, instead of fragile text-scraping.
Grounding / anti-hallucination Make the model show its receipts.
Instead of

Does this paper support using CRISPR base editing for this disease?

Try this 💬 AI chat

Answer only from the text below. For every claim you make, quote the exact sentence it came from. If the text does not address the question, say so explicitly.

Instead of

Summarize what the documents say about dosage.

Try this 💬 AI chat

Summarize what the documents say about dosage. After each point, add the source in brackets like [Doc 2]. Do not include anything not stated in the documents.

Why it works: Quoting and citing forces the model to find real evidence instead of paraphrasing from memory.
Self-critique loop Have the model grade and fix its own first draft.
Instead of

Write an abstract for my study.

Try this 💬 AI chat

Draft an abstract for my study. Then critique your draft against these criteria: ≤200 words, states the method, states the result with a number, no hype words. Then give the improved version.

Why it works: The second pass catches the weaknesses of the first — a cheap, automatic quality boost.
Putting it all together Real prompts stack the techniques: role + context + delimiters + constraints + format + thinking, all at once.
Instead of

Help me review this paper.

Try this 💬 AI chat

You are a critical peer reviewer in molecular biology. [role] I am a master's student deciding whether to cite this paper. [context] Using ONLY the text in <paper>…</paper>, do the following: [delimiters + constraint] 1. Think through the study's design before judging it. [chain-of-thought] 2. Then output a markdown table: claim | evidence in paper | how solid (1–5). [format] If a claim has no supporting evidence in the text, mark it "unsupported". [grounding]

Why it works: No single trick is enough for hard tasks. Stacking role, context, structure, constraints, and step-by-step thinking is what separates a throwaway prompt from a reliable one.
Check yourself

Answer from memory, then scroll up to re-read anything you blank on.

  1. Why does naming the audience and the exact output you want beat simply writing a longer, more detailed prompt?
  2. When is chain-of-thought ('think step by step') worth using, and when does it just add noise?
  3. What does grounding — answer only from the text you provide, and quote each claim — protect you against?
  4. Why do delimiters (putting pasted data inside tags) matter when that data itself contains sentence-like instructions?

3Lessons 7

3.1 Write a focused answer by adding clear context and audience

A prompt that tells the model exactly what you need and who it is for.

You will be able to craft a prompt that includes specific background information and defines the target audience so the AI returns a relevant response.

  1. Open a text editor or ChatGPT window.
  2. Write a short description of the topic you want answered (e.g., "best practices for remote team meetings").
  3. Add a sentence that supplies context, such as "You are advising a tech startup with 20 engineers distributed across three time zones."
  4. Finish the prompt by stating the desired output format, like "Provide a bullet‑point list of five actionable tips no longer than two sentences each."
  5. Submit the prompt to the model and read the response.
  • You'll see A concise list of tips that directly addresses remote meetings for a distributed tech startup.
  • Takeaway Providing context and audience narrows the model’s focus, turning generic output into targeted advice.

3.2 Classify abstracts with a few‑shot screening prompt

A prompt that shows the model three labelled sample abstracts so it learns your relevance boundary.

Produce a single prompt that reliably tags new abstracts as Relevant, Not Relevant, or Borderline

  1. Write three short abstract excerpts and label each (e.g., Relevant, Not Relevant, Borderline)
  2. Place the labelled examples at the start of the prompt, each on its own line
  3. Add a clear instruction asking the model to classify any new abstract using the same labels
  4. Paste a test abstract after the instruction and run the prompt with the AI
  5. Record the label the model returns
  • You'll see The model returns exactly one of the three labels for each test abstract
  • Takeaway Concrete examples let the model infer nuanced inclusion criteria without exhaustive rules
  • Check What do the three labelled abstract excerpts at the start of the prompt let the model work out that a list of rules would not?

3.3 Create a step‑by‑step audit of regression results

A prompt that forces the model to reason through each part of a regression result before giving a conclusion.

Generate a multi‑step explanation of a regression output that can be verified line by line

  1. Paste the regression summary (coefficients, p‑values, R²) into the prompt input field
  2. Instruct the model to explain the result step by step, specifying the order: describe each coefficient, assess significance, interpret overall fit, then provide a concise conclusion
  3. Run the prompt and capture the full reasoning trace returned by the model
  4. Compare each explanation line with the original numbers to confirm accuracy
  5. If any part is incorrect, modify the instruction to request re‑evaluation of that specific section and run the prompt again
  • You'll see A numbered list where each item explains one part of the regression and ends with an auditable summary conclusion
  • Takeaway Chain‑of‑thought prompts reveal the model’s reasoning and expose hidden errors
  • Check Why do you compare each line of the model's numbered explanation against the original regression numbers?

3.4 Improve answers by assigning a role to the AI

A prompt that tells the model to act as a specific professional or persona.

You will be able to ask the model to respond from the perspective of an expert role, yielding more authoritative results.

  1. Open the same chat window you used in Lesson 1.
  2. Start a new prompt with a role instruction, for example: "You are a senior product manager specializing in SaaS onboarding."
  3. Follow the role line with the same context sentence from Lesson 1 (e.g., about the tech startup).
  4. Ask a concrete question, such as "What three metrics should we track during the first week of user onboarding?"
  5. Send the prompt and review the answer for role‑specific language.
  • You'll see An answer that references product‑management terminology and includes metric suggestions appropriate for SaaS onboarding.
  • Takeaway Role assignment steers the model’s tone and knowledge base, making outputs feel like they come from a subject‑matter expert.

3.5 Generate method‑specific answers anchored to a pasted section

A prompt that limits the model to answer only from provided text, quoting the supporting sentence or stating "not stated" when absent.

Obtain answers to methodological questions that are directly traceable to the supplied text

  1. Copy the full methods section of the paper into your prompt editor
  2. Insert an instruction: “Answer each question using only the above text. Quote the exact sentence that supports your answer, or reply ‘not stated’ if the text does not cover it.”
  3. Add three specific methodological questions after the instruction
  4. Run the prompt in the AI interface and collect the responses
  5. Check that every quoted sentence appears verbatim in the pasted methods section
  • You'll see Each response ends with a quoted sentence from the methods text or the phrase "not stated"
  • Takeaway Anchoring prompts force the model to cite evidence and prevent hallucinations
  • Check What must the model do when the pasted methods section does not cover one of your questions?

3.6 Guide the model with few‑shot examples

A prompt that provides one or more example input–output pairs to illustrate the desired pattern.

You will be able to include sample demonstrations in a prompt so the model mimics the format and style you need.

  1. In your editor, write a brief role line (e.g., "You are an HR recruiter.") and context sentence as before.
  2. Add two example pairs separated by clear delimiters, such as: --- Candidate: Jane Doe, 5 years experience in data analysis. Response: Schedule interview for next Monday at 10 am. --- Candidate: John Smith, recent graduate with internship experience. Response: Send a thank‑you email and request portfolio. ---
  3. After the examples, write a new candidate description you want processed.
  4. Prompt the model with the whole block and submit.
  5. Check that the returned response follows the same “Response:” format.
  • You'll see A structured reply that matches the example pattern, demonstrating the model learned from the few‑shot data.
  • Takeaway Few‑shot prompting teaches the model the exact structure you expect, reducing post‑processing effort.

3.7 Combine tags, step‑by‑step reasoning, and source grounding

A multi‑part prompt that uses delimiters to separate instructions, data, and asks the model to reason stepwise while citing a provided excerpt.

You will be able to produce an answer that walks through logical steps and references specific source text you supply.

  1. Copy a short paragraph from any article (e.g., a sentence about AI prompt importance).
  2. Create a prompt with three sections, each marked by tags: You are a technical writer. Use the following excerpt to explain why context matters: [Paste the copied paragraph] Write a two‑paragraph explanation. First list the reasoning steps, then produce the final summary. Cite the excerpt with "(see source)" after each claim.
  3. Enter the full prompt into the chat and send it.
  4. Read the output to verify that it includes numbered reasoning steps followed by a concise paragraph, and that each factual statement ends with the citation tag.
  5. If needed, adjust the tags or wording and resend until the format matches.
  • You'll see A response that begins with numbered steps (e.g., 1. Identify key terms…) then a short paragraph, with every claim ending in "(see source)" referencing your excerpt.
  • Takeaway Tagging separates concerns, step‑by‑step reasoning improves transparency, and grounding anchors the answer to supplied evidence, all of which boost accuracy and auditability.

4You’ll know it worked 24 checkable outcomes in this chapter

  • Model lists coefficient sign, checks CI, assesses sample size, then gives final interpretation
  • A one-page summary with named themes and quoted evidence is produced
  • Readers skim the intro without confusion, focusing on actionable tips
  • Each job description is wrapped in <jd> tags and processed separately without mixing content
  • The output contains exactly the sections "Done this week", "Blockers", and "Next week" with 3 bullets each (or "None" for blockers), no more than 12 words per bullet and a total word count under 120
  • Bot replies to a customer query by quoting a sentence from the help article or saying "This isn't covered in our current documentation — I'll escalate this to the team."
  • The revised paragraph contains no unsubstantiated claims and all evidence links are explicit
  • Candidate opens the message and replies

24 outcomes in all — one per recipe below.

5FAQ, Tips & How-to 40

one problem, one solution, one action

Research & data tools3

How-to Scientist +1

Give three sample abstracts to set criteria

Consistent screening decisions that match your inclusion logic, not the model's generic interpretation of "relevant".

~5 min · no code Lesson → AI-generated
How-to Scientist +1

Unsure about a regression result

Visible reasoning you can check line-by-line, instead of a confident conclusion with no audit trail.

~5 min · no code Lesson → AI-generated
How-to Scientist +1

Need answers that stick to a pasted methods section

Answers traceable to the actual paper, not to training memory — essential before citing a claim in your own work.

~5 min · no code Lesson → AI-generated

Content & marketing6

How-to Founder +2

Need a seasoned‑investor’s take on my pitch deck

Pointed, investor-perspective feedback that surfaces the questions your deck does not yet answer.

~5 min · no code Lesson → AI-generated
How-to Small biz +1

Need an Instagram caption that meets exact length and tone

A post that fits the platform and tone without back-and-forth trimming.

~5 min · no code Lesson → AI-generated
How-to Creator +1

Intro misses the mark for experienced designers

An intro that resonates with your actual audience rather than an imagined average reader.

~5 min · no code Lesson → AI-generated
How-to Creator +1

First draft of YouTube intro feels flat

A stronger draft produced autonomously, because the model reviews its own work before handing it to you.

~5 min · no code Lesson → AI-generated
How-to Investor +2

Memo paragraph with weak evidence

A sharper memo paragraph where every claim is backed and logical gaps are closed before the document reaches the IC.

~5 min · no code Lesson → AI-generated
How-to Physician

Medical instructions are confusing

A patient-friendly explanation you can hand out with confidence, because the constraint keeps every safety-relevant detail in place — you review the rewrite against the original before use.

~5 min · no code Lesson → AI-generated

Internal tools & ops6

How-to Founder +1

A structured insight document produced reliably, because no single prompt tries to do extraction, synthesis, and writing all at once.

~5 min · no code Lesson → AI-generated
How-to HR / People +1

Multiple job ads in one prompt

Clean, per-role outputs with no cross-contamination between the documents.

~5 min · no code Lesson → AI-generated
How-to HR / People +1

Need a brand‑compliant, legally safe offer letter

Offer letters that need minimal legal review because the tone, structure, and restrictions were all stated upfront.

~5 min · no code Lesson → AI-generated
How-to Operations +1

Long incident report

A reliable pipeline from incident prose to trackable tickets, with no action item lost in a single-prompt summary.

~5 min · no code Lesson → AI-generated
How-to HR / People

Need a LinkedIn search string for specific titles, skills and region

A working Boolean or X-ray string you can paste into LinkedIn Recruiter or a search engine in under a minute.

~5 min · no code Lesson → AI-generated
How-to HR / People +1

Need a CV shortlist that explains gaps and raises questions

A reasoned shortlist draft that surfaces the strongest candidates and flags gaps, while keeping the human in control of the final call.

~5 min · no code Lesson → AI-generated

Forms, surveys & feedback1

How-to Small biz +1

Customer replies that sound like your business, not like a generic helpdesk template.

~5 min · no code Lesson → AI-generated

Dashboards & analytics3

How-to Finance +1

Month‑end variance data that goes straight into a spreadsheet

Machine-readable variance data that feeds downstream tools without manual reformatting.

~5 min · no code Lesson → AI-generated
How-to Finance +1

Need a brief board‑ready financial recap

A summary that goes into the board pack without editing, because the constraints were stated precisely.

~5 min · no code Lesson → AI-generated
How-to Investor +1

Need a quick, comparable scorecard for pitch decks

A consistent, machine-readable scorecard for every deck you review, with sourcing gaps surfaced before the partner meeting.

~5 min · no code Lesson → AI-generated

Trackers1

How-to Operations +1

Need a consistent, copy‑paste standup update each week

A standup summary that drops straight into your template, consistent week to week.

~5 min · no code Lesson → AI-generated

CRM & sales3

How-to Sales +1

Want a skeptical buyer to rip apart your pitch

A list of hard questions and weak spots in your pitch, found in a two-minute prompt rather than a lost deal.

~5 min · no code Lesson → AI-generated
How-to Sales +1

Need a ready‑to‑send follow‑up email after a demo

A follow-up email you can send after one read-through instead of several rounds of edits.

~5 min · no code Lesson → AI-generated
How-to HR / People +1

Generic outreach gets ignored

A personalised InMail or email draft that references something specific to the candidate and avoids the phrases that get ignored.

~5 min · no code Lesson → AI-generated

Customer & client portals1

How-to Support +1

Need a support bot that only uses the help article

Support replies that never promise something the docs do not say.

~5 min · no code Lesson → AI-generated

Knowledge & docs3

How-to Support +1

Support tickets lead to endless back‑and‑forth

Replies that identify the root cause first, reducing back-and-forth with the customer.

~5 min · no code Lesson → AI-generated
How-to Investor +1

Need due‑diligence answers from a pasted CIM

Diligence answers traceable to the actual document, not to the model's training memory about the industry — critical before putting a fact in an investment memo.

~5 min · no code Lesson → AI-generated
How-to Physician

Dictated encounter needs a structured note

A structured first-draft note in seconds that the clinician reviews, corrects, and signs — the AI drafts, the clinician remains fully responsible for the clinical record.

~5 min · no code Lesson → AI-generated
How-to Everyone

Vague request to summarize a paper

Vague prompts get vague answers. Name the exact output you want. Naming the length, audience, and the exact things to include leaves nothing for the model to guess wrong.

~5 min · no code Lesson → AI-generated
How-to Everyone

Model jumps to a shortcut on multi‑step word problems

Ask the model to reason before answering; accuracy on multi-step problems jumps. Forcing the steps out loud stops the model blurting a wrong shortcut (the flask is half full at 57 min, not 30).

~5 min · no code Lesson → AI-generated
How-to Everyone

I need a specific paper review

Real prompts stack the techniques: role + context + delimiters + constraints + format + thinking, all at once. No single trick is enough for hard tasks. Stacking role, context, structure, constraints, and step-by-step thinking is what separates a throwaway prompt from a reliable one.

~5 min · no code Lesson → AI-generated
How-to Everyone

When I need only the side effects listed

Tell the model what to avoid and how to handle gaps. Explicit limits and a defined "if you don't know" path are the single biggest defense against confident, made-up answers.

~5 min · no code Lesson → AI-generated
How-to Everyone

Need a plain answer to my t‑test

Tell the model who it is helping and what for — the same question gets a different, better answer. Context (who you are, the real numbers, your actual worry) lets the model pitch the depth correctly and answer the question behind the question.

~5 min · no code Lesson → AI-generated
How-to Everyone

Need a literature review from many papers

Break a big task into stages — and in n8n, each stage can be its own node. Smaller steps are more reliable and debuggable, and they map directly onto a multi-node n8n pipeline.

~5 min · no code Lesson → AI-generated
How-to Everyone

When instructions get mixed with pasted text

Separate your instructions from the data you paste, so the model never confuses the two. Tags make it unambiguous what is instruction vs. content — essential when the pasted text itself contains sentences that look like commands.

~5 min · no code Lesson → AI-generated
How-to Everyone

Want the model to follow an exact Q‑and‑A flashcard layout

Give 2–3 examples of the input→output you want; the model copies the pattern. One worked example pins the exact format more reliably than any description of it.

~5 min · no code Lesson → AI-generated
How-to Everyone

Want a clear side‑by‑side view of sequencing methods

If you need a table, a list, or a fixed length — ask for it explicitly. A requested structure gives you a scannable, consistent answer instead of a wall of text you have to re-read.

~5 min · no code Lesson → AI-generated
How-to Everyone

When you need a specific answer with sources

Make the model show its receipts. Quoting and citing forces the model to find real evidence instead of paraphrasing from memory.

~5 min · no code Lesson → AI-generated
How-to Everyone

Need reproducibility check of my methods

A persona activates the right vocabulary, depth, and standards. "Peer reviewer" shifts the model into reproducibility-checking mode and raises the bar far above a generic "check this".

~5 min · no code Lesson → AI-generated
How-to Everyone

My abstract is vague

Have the model grade and fix its own first draft. The second pass catches the weaknesses of the first — a cheap, automatic quality boost.

~5 min · no code Lesson → AI-generated
How-to Everyone

When I need the answer to feed another tool

When the answer feeds another tool, demand a strict schema. A strict schema lets the next n8n node parse the output directly, instead of fragile text-scraping.

~5 min · no code Lesson → AI-generated

The same set on /recipes, filtered by tool and role.

6Videos 2

7FAQ 7

Do longer, more detailed prompts always work better?

No — clarity beats length. Specifics help, but padding adds noise the model has to wade through. Give it the role, the context, the task, and the constraints it actually needs, then stop. A tight, well-structured prompt usually beats a long rambling one.

Anthropic — Prompt engineering ↗

What is the single biggest improvement I can make to a prompt?

Be specific about the task, the audience, and the output you want. "Write about dogs" gets a generic essay; "In 5 numbered steps, explain crate training to a first-time owner, ≤150 words, no jargon" gets exactly what you need. Vague in, vague out.

What is chain-of-thought, and when should I use it?

It is asking the model to reason step by step before giving its answer ("think through it first, then conclude"). Use it for multi-step problems — maths, logic, planning, debugging — where the reasoning matters. For simple lookups it just adds length.

Anthropic — Prompt engineering ↗

How do I stop the AI making things up?

Ground it: paste the source material and tell it to answer using only that, to quote where possible, and to say "I don't know" when the answer isn't there. Most confident-but-wrong answers come from asking a model to recall facts from memory instead of giving it the facts.

Are few-shot examples worth the effort?

Often they are the fastest quality boost. Showing one to three worked examples of the input → output you want lets the model copy the pattern and format precisely, which is far more reliable than describing the format in words.

Is prompt engineering still needed now that models are smarter?

Less fiddly than it was — you rarely need magic words. But clear instructions, the right context, and structure still change the output materially, and they matter most when the prompt drives an agent or a pipeline rather than a one-off chat.

How is prompt engineering different from context engineering?

Prompting is how you word the request; context engineering is what information the model sees and how it is organised. Prompt engineering is the natural first step — once your asks are clear, context engineering is the sequel.

8Glossary 10 terms

Show the 10 terms
Parts of a prompt
Role
A "You are a…" line that sets the persona and expertise the model should write from.
Context
The background and audience you give the model so it tailors the answer.
Few-shot examples
Showing one or more worked examples in the prompt so the model matches the pattern.
Delimiters / tags
Markers (quotes, ###, XML-style tags) that separate instructions from data so the model doesn't confuse them.
Constraints
Explicit do/don't rules — length, tone, "say if unsure", what NOT to do.
Techniques
Chain-of-thought
Asking the model to reason step by step before answering, which improves multi-step tasks.
Prompt chaining
Breaking a big task into a sequence of prompts, each using the previous output.
Grounding
Anchoring the answer in sources you provide so the model quotes fact instead of inventing it.
Zero-shot
Asking with no examples — relying on the instruction alone.
Pitfalls
Hallucination
When a model states something fluent but false; grounding and "say if unsure" reduce it.

9See also

💬 Discuss this chapter

Ask, share, or report — over on the Heidelberg AI community forum.