Course 11 · LLMs & Prompt Engineering · about 10 min
A prompt is a briefing
By the end of this course you can write prompts that get reliable results, ground a model in your own documents, and avoid the most common risks.
Prompt an LLM the way you'd brief a smart new colleague who knows nothing about your situation. A strong briefing usually covers:
- Context: who it's for and the situation,
- Task: exactly what you want,
- Constraints: length, tone, what to avoid,
- Format: list, table, email, JSON,
- Example: what good looks like.
Try itBuild the prompt piece by piece
Tick the parts to include and watch the prompt grow.
CheckWhich prompt will most likely get a useful answer?
Step 2
Show, don't just tell
Giving a few examples of input and the output you want is called few-shot prompting. Asking with no examples is zero-shot. Examples are often the fastest way to get a consistent style or format, because the model copies the pattern.
Pick examples that vary, or the model may copy one too literally.
Try itZero-shot or few-shot?
CheckWhen is few-shot prompting especially useful?
Step 3
Reasoning and bigger tasks
For multi-step problems, asking the model to work through the steps before answering often improves the result. For software, ask for a fixed structure such as JSON or a table, so your code can read the answer.
Big tasks go better as a chain of small prompts, each checked before the next, than as one giant request.
Try itChain the prompts for a report
Tap the first step, then the next.
CheckWhy split a big task into a chain of smaller prompts?
Step 4
Ground it in your data
An LLM doesn't know your company's documents, and its knowledge stops at its training date. Retrieval-augmented generation (RAG) fixes this: search your documents for passages relevant to the question, paste them into the prompt, and tell the model to answer only from them and to say "I don't know" otherwise.
PredictYour HR chatbot uses RAG. An employee asks about a policy that isn't in any document. What should a well-designed bot say?
CheckWhat does RAG add to a prompt?
Step 5
Reliable and safe
Before relying on a prompt, test it on many real examples and check the answers. These tests are called evals. A prompt that works once can fail on the tenth case.
Watch out for prompt injection: text inside a document, email or web page that tries to give the model new instructions ("ignore your rules and…"). Treat retrieved content as data, limit what an AI agent is allowed to do, and never put passwords or other secrets in prompts.
Try itSafe practice or risky?
CheckWhat is prompt injection?
Step 6 · Recap
What you learned
- Brief the model like a new colleague: context, task, constraints, format, example.
- Few-shot examples set style and format quickly.
- Ask for step-by-step work or structured output, and chain big tasks.
- RAG grounds answers in your documents, and the bot should say "I don't know".
- Test prompts with evals and guard against prompt injection.
Quick reviewThree questions from memory. No scrolling back.
You've reached the end of the core path. Mark this course complete below, then claim your certificates.