Introduction to Customizing Foundation Models
Choosing between prompt engineering, RAG and fine-tuning, writing task-specific prompts, selecting fine-tuning strategies and preventing catastrophic forgetting.
- 4 lessons
- Module quiz
Foundation models can be adapted to a task in several ways, with increasing effort and cost. Prompt engineering changes only the instructions. RAG supplies knowledge at request time. Fine-tuning trains the model on examples to change its behaviour or format. Distillation trains a smaller model to match a larger one, and continued pre-training teaches a model a domain from unlabelled text.
Choosing among them depends on the problem: knowledge problems, such as answering from frequently changing documents, call for RAG, while behaviour or format problems call for better prompts first and fine-tuning if prompts are not enough. Fine-tuning also carries a risk, catastrophic forgetting, in which the model loses general abilities.
What the exam expects
Questions test the rule that frequently changing facts belong in RAG rather than fine-tuning, the customisation methods available in Amazon Bedrock, and recognising catastrophic forgetting from evaluation results.
How this module is organised
Choosing the Lightest Effective Customization Approach compares the approaches. Engineering Task-Specific Prompts explains how to write and manage effective prompts. Choosing a Fine-Tuning Strategy explains fine-tuning in Bedrock and SageMaker AI, and Preventing Catastrophic Forgetting During Fine-Tuning explains how to detect and avoid it.
- Choosing the Lightest Effective Customization Approach Lesson 1
- Engineering Task-Specific Prompts Lesson 2
- Choosing a Fine-Tuning Strategy Lesson 3
- Preventing Catastrophic Forgetting During Fine-Tuning Lesson 4
- Practise and review
- Checkpoint Practice activities across the module
- Test your knowledge 4 questions