Stage 1: Prompt Well and Build Your First LLM App · Lesson 1.1 of 12

How to talk to an AI model

About 1 hour

Why this matters: A prompt is the instruction you give an AI. Better instructions give better answers. This is the most useful AI skill there is, and you don't need to code.

What a large language model (LLM) is

An LLM is a program trained on huge amounts of text to predict what words come next. That simple trick lets it write, summarize, explain and reason. It doesn't 'know' your situation unless you tell it, so context is everything.

The four parts of a strong prompt

1) Role: who should the AI act as ("You are an experienced HR partner"). 2) Task: exactly what you want done. 3) Context: the background, audience and constraints. 4) Format: how the answer should look (bullet points, a table, under 150 words).

Two habits that change everything

Give examples of what good looks like (this is called 'few-shot' prompting). And ask the model to think step by step before answering on anything tricky. If a reply misses, don't start over. Say what to change.

Watch & read

Your steps

  1. 1Watch the first 20 minutes of Karpathy's intro video to see how LLMs work.
  2. 2Work through the first lessons of one beginner course below (the DeepLearning.AI course is about 1.5 hours; the Anthropic tutorial is self-paced).
  3. 3Open the practice box below. Run the weak prompt, then rewrite it using role, task, context and format, and compare the results.

Practice

Run this deliberately vague prompt, then improve it with role, task, context and format. Notice the difference.

You're done when…

You can explain the four parts of a strong prompt and you've seen a rewrite clearly beat the original.