Prompt Engineering Introduction

Prompt Engineering Beginner 3 min read Published
In this lesson

A prompt is what you type into an AI tool. Prompt engineering is the skill of writing prompts that get useful, accurate answers on the first try instead of the fifth. It needs no coding, so it’s useful for everyone: students, developers, teachers, marketers, shop owners.

The same AI can give a vague, generic reply or a precise, ready-to-use one. The difference is almost always the prompt.

The tools#

You’ll use the same skills in all of them:

ToolMade byGood to know
ChatGPTOpenAIThe most widely used chatbot
ClaudeAnthropicStrong at writing, long documents and code
GeminiGoogleBuilt into Google apps and Android
Microsoft CopilotMicrosoftInside Windows, Edge and Office
GitHub Copilot, CursorGitHub, AnysphereAI inside your code editor

Most have a free version that is more than enough to practise this course.

How a chatbot writes an answer#

These tools are built on a large language model (LLM). An LLM was trained on a huge amount of text to do one thing: predict the next piece of text. Pieces of text are called tokens; a token is a word or part of a word. Step through it:

The model reads your prompt, scores every possible next token, picks one, adds it, and repeats until the answer is complete. It doesn’t look facts up in a database (unless the tool adds web search); it continues text in the way that seems most likely given everything it has read.

That explains three things you’ll notice:

  1. Your prompt is the starting text. Clear, detailed starting text leads to a better continuation.
  2. Answers vary. Ask twice and you may get different wording, because the next token is partly chosen at random. A setting called temperature controls how much.
  3. It can sound confident and still be wrong. Producing likely-sounding text isn’t the same as checking facts. This is called hallucination, and you’ll learn to manage it in the last lesson.

Same question, two prompts#

A vague prompt:

Tell me about Python.

You’ll get a general essay that tries to cover everything for nobody in particular.

A better prompt:

I'm a commerce student with no coding experience. In 5 short bullet points,
explain what Python is used for in finance and accounting jobs, with one
real example task for each.

Now the AI knows who you are, what you want, how much and in what shape. The answer is shorter and far more useful.

You don’t need magic words or secret tricks. Write the way you’d brief a smart new colleague who knows nothing about your situation: who it’s for, what you need, and what a good answer looks like.

What this course covers#

  1. Writing clear instructions
  2. Roles and context
  3. Teaching by example (few-shot prompts)
  4. Step-by-step thinking and breaking big tasks down
  5. Getting tables, lists and JSON back
  6. Using AI to learn coding and to work faster
  7. Limits, safety and using AI responsibly
Quick check

Why might the same prompt give a different answer each time? Because the model picks each next token with some randomness. It’s normal; ask it to be more specific, or regenerate.

Summary#

  • A prompt is your instruction; prompt engineering is writing it well.
  • LLMs write by predicting one token at a time, starting from your prompt.
  • Clear prompts say who it’s for, what you want, how much and in what format.

Quick quiz

3 questions. Check what stuck and earn 2 XP for each right answer.

1How does an LLM produce an answer?
2Why can the same prompt give different answers?
3What is a hallucination?

Progress is saved in this browser. Create a free account to keep it on every device.