AIBez Strachuv0.5
BooksRandom
Courses›The Visual Encyclopaedia of AI for the Over-20s›📝 Prompting
Chapter 03

📝 Prompting

~15 min read

📖 Text🎨 App

What Is Prompting?

Prompting is the art of writing instructions for AI that produce the output you actually want. A good prompt specifies the role, task, format, constraints, and examples. Poor prompts get mediocre output. Great prompts get outputs that rival expert work. It is the most transferable AI skill you can learn.

  • Prompting = writing instructions that get great AI output
  • Specify: role, task, format, constraints, and examples
  • Better prompting = better output, faster, every time

Did you know? Anthropic pays 'prompt engineers' six-figure salaries to write system prompts for its enterprise products. The craft is real and valued.

---

System Prompts

A system prompt is a hidden instruction that sets the AI's role, tone, and rules before the user speaks. In the API you set it explicitly. In chat products like Claude.ai or ChatGPT, you can add persistent instructions in settings. Mastering system prompts unlocks building custom AI tools.

  • System prompts set role, tone, and rules before conversation starts
  • Persistent custom instructions are available in all major chat UIs
  • Via the API you have full control over system prompt content

Did you know? Most commercial AI products run on top of extensive system prompts — the 'personality' of a chatbot is usually just a well-crafted system prompt.

---

Chain of Thought

Telling AI to 'think step by step' dramatically improves performance on complex reasoning tasks. The model walks through its logic before giving an answer, catching errors it would have made in a single pass. This technique — chain of thought prompting — is one of the most powerful free optimisations available.

  • Adding 'think step by step' dramatically improves reasoning quality
  • The model catches its own errors during the thinking process
  • Chain of thought is especially powerful for maths and logic tasks

Did you know? In a 2022 Google paper, 'let's think step by step' improved GPT-3's accuracy on maths problems from 18% to 79% — just from those five words.

---

Few-Shot Prompting

Give the model one or two examples of what you want before making your request. This dramatically improves output format and quality. 'Here are two examples of the style I want: [example 1] [example 2]. Now write: [your request].' Examples are worth far more than lengthy instructions.

  • Including examples in your prompt dramatically improves output
  • Show the format, style, and tone you want via examples
  • Even one example can double output quality for formatting tasks

Did you know? Few-shot prompting was one of the first techniques shown to work with large language models, discovered accidentally at GPT-2 scale.

---

Prompt Templates

The best prompts are not one-offs — they are templates you reuse across tasks. A template for 'summarise a legal document', a template for 'generate a test suite from code', a template for 'draft a LinkedIn post'. Building a personal library of proven templates is a high-ROI practice.

  • Build reusable prompt templates for your most common tasks
  • Store them in a notes app or tool like Notion or Obsidian
  • Good templates compound over time — each one saves you hours

Did you know? Claude Code (Anthropic's developer tool) stores reusable prompt knowledge in CLAUDE.md files that load automatically in every session.

---

Avoiding Hallucinations

To reduce AI hallucinations, add instructions like 'if you are not certain, say so clearly' and 'cite sources when possible'. For factual tasks, enable web search. For high-stakes work, ask AI to provide its reasoning so you can check it. Treating AI outputs as drafts, not facts, is essential.

  • Add 'say if unsure' and 'show your reasoning' to reduce errors
  • Enable web search for factual or recent-events queries
  • Treat all AI outputs as drafts to verify, not final facts

Did you know? Studies show AI hallucination rates drop significantly when models are prompted to express uncertainty — they actually do know when they are less sure.

Sign in to track your progress and earn a certificate.

Sign in
🛠️ Tools & Models💻 Coding with AI