Prompt Engineering: From Basics to Advanced Techniques
Write prompts that get reliable results: clear instructions, examples, roles, structured output, reasoning, long documents, testing and reusable templates.
Beginner · Generative AI · about 9.5 hours · 4 modules · certificate on completion
Taught by Nkirukà Ezenwà, Braideùn O'Sullivàn, AI Learning Companions.
About this course
The same assistant can give a vague, generic answer or exactly what you need, and the difference is usually the prompt. This course teaches the techniques that make the difference, from the basics to the methods professionals use to build dependable AI features. You'll learn to write clear, direct instructions with the right context, to steer results with examples, roles and system prompts, to get structured output such as JSON, and to improve answers to hard problems with step-by-step reasoning and chains of prompts. Then you'll work with long documents, grounding answers in quotes, and learn the habit that separates prompt engineering from guesswork: testing a prompt against a set of cases with clear criteria, improving it with evidence, and saving the result as a documented, reusable template.
Every module has a hands-on lab in a chat assistant such as Claude, with the files you need, and the course ends with a project: a tested prompt template for a real task of your own.
What you'll learn
- Write clear, direct prompts that give the context a task needs and keep instructions separate from material
- Steer output with examples, roles and system prompts
- Get structured output such as JSON, and better answers to hard problems with step-by-step reasoning and prompt chains
- Work reliably with long documents by structuring them and grounding answers in quotes
- Test prompts against cases with clear criteria, improve them with evidence and save them as reusable templates
Skills you'll gain
Prompt engineering, Few-shot prompting, System prompts, Structured output, Chain-of-thought prompting, Prompt chaining, Long-document prompting, Prompt testing, Prompt templates
Tools
A chat assistant such as Claude
Before you start
None: no programming needed. You need a web browser and an account with a chat assistant such as Claude (claude.ai); a free account is enough. Generative AI Fundamentals is a helpful first course but not required.
Modules
Clear, direct prompts
Write prompts that work the first time: say exactly what you want, give the context a capable newcomer would need, separate instructions from material, and refine in small steps.
- Be clear and direct (10 min)
- Give the right context (12 min)
- Refine prompts step by step (10 min)
- Hands-on lab: Rewrite three vague prompts
Examples, roles and system prompts
Show the model what good looks like with examples, give it a role that sets its expertise and tone, and set lasting instructions with system prompts.
- Teach by example: few-shot prompting (12 min)
- Give the model a role (10 min)
- System prompts and lasting instructions (12 min)
- Hands-on lab: Build a few-shot classifier and a tutor's instructions
Structured output and step-by-step reasoning
Get output that spreadsheets and software can use, get better answers to hard problems by asking for reasoning, and split big jobs into a chain of prompts.
- Ask for structured output (12 min)
- Ask for step-by-step reasoning (12 min)
- Break big tasks into a chain of prompts (10 min)
- Hands-on lab: Extract, reason and chain
Long documents, testing and templates
Work reliably with long documents, test prompts against a set of cases instead of trusting one good reply, and turn your best prompts into reusable templates.
- Working with long documents (12 min)
- Testing prompts against cases (12 min)
- Reusable prompt templates (10 min)
- Hands-on lab: Test and improve a prompt
Project: A tested prompt template for a real task
Choose a real task that recurs in your work, studies or community, such as turning meeting notes into minutes, giving feedback on writing against a rubric, drafting replies to common customer emails, or extracting details from invoices into a table. Build a reusable prompt template for it using the techniques from this course: clear instructions and context, a role or lasting instructions, examples, an exact output format, step-by-step reasoning or a chain where it helps, and tags around every variable. Write success criteria, build a test set of at least eight cases, including edge cases and one designed to trip the prompt up, and test at least three versions, changing one thing at a time. Use invented or anonymised material in your tests, never real personal data.
Part of
The products this course names are trademarks of their owners, who haven't made or endorsed it.