Level 7 · Artificial Intelligence and Intelligent Automation · Course 7.1 Foundations
Module 83: Prompt Engineering
Goal: write instructions that get reliable, useful results from a language model: clear instructions with the right context, examples that show what you want, output in a structure your code can use, reusable templates, and a habit of testing prompts rather than trusting them.
You'll need: an AI assistant (or an API playground from a model provider), and a few of your CRM business's documents and enquiries to practise on.
Lessons
- 1Instructions and context15–25 minutes✓
- 2Few-shot examples15–25 minutes✓
- 3Structured output15–25 minutes✓
- 4Templates15–25 minutes✓
- 5Testing prompts15–25 minutes✓
🛠️Module practice: A prompt toolkit for your assistant
- A well-structured answer prompt with role, rules, document and question sections, and "I don't know" behaviour.
- A few-shot classification prompt with a measured improvement over zero-shot.
- A structured extraction prompt with Zod validation.
- Versioned templates in a
prompts/folder. - A 20-question test set with scores for two prompt versions.
✅Module check
Explain in a few sentences, in your own words:
How do you write prompts that work reliably in an application?
Show a good answer
A good answer mentions: clear, specific instructions with role, audience, format, limits and what to do when unsure, plus the context the model lacks, structured with sections; few-shot examples that are correct, realistic and varied; structured JSON output with allowed values and nulls, validated in code; versioned templates kept in version control, separating trusted instructions from untrusted input and keeping secrets out; and testing every version on a test set with edge and adversarial cases, scoring, comparing and re-testing when models change.
📝Module quiz
10 questions · 10 marks each · 100 marks in all · pass mark 70% · retry as often as you like ·
