Skill 3.1.5

Explain the cost tradeoffs of various approaches to FM customization (for example, pre-training, fine-tuning, in-context learning, RAG, model distillation)

Key Concepts

In-context learning (prompt engineering, few-shot examples): cheapest, no training, but adds tokens to every request. RAG: moderate cost (embeddings, vector store, retrieval tokens), keeps knowledge fresh without retraining. Fine-tuning: training cost and often hosting costs, changes model behaviour or style for specific tasks; needs labelled data.

Model distillation: train a smaller student model from a larger teacher's outputs to cut inference cost and latency. Continued pre-training adapts to a domain with unlabelled data. Pre-training from scratch is by far the most expensive and rarely justified.