There are several ways to make a foundation model better at your task, and they differ enormously in cost, effort and time. From cheapest to most expensive, they are: in-context learning (putting instructions and examples in the prompt), Retrieval Augmented Generation (RAG), fine-tuning, model distillation, and pre-training a model from scratch. The exam often asks for the lowest-cost approach that still meets a requirement, so knowing this ladder, and what each step actually changes, is essential.
In-Context Learning
In-context learning means guiding the model through the prompt alone: clear instructions plus a few examples of the input and desired output. This is also called few-shot prompting. No training happens and the model's weights don't change, so there's no upfront cost and you can change behavior in minutes. The trade-off is that the instructions and examples add input tokens to every single request. At very high volumes, a long block of examples repeated on every call becomes a real running cost.
Retrieval Augmented Generation
RAG adds knowledge rather than behavior. Relevant passages from your documents are retrieved and added to each prompt. There's still no model training, but there are new running costs: creating embeddings for your documents, storing them in a vector database, and the extra input tokens from the retrieved passages on every request. RAG is the usual answer when the model needs company facts that change over time.
Fine-Tuning
Fine-tuning trains an existing model further on your labeled examples, changing its weights so it performs better at a specific task, style or format without long instructions in every prompt. Costs move upfront: in Amazon Bedrock you pay for training based on the tokens processed, a monthly storage charge for the custom model, and inference for the custom model. You also need good labeled data and must repeat the work when requirements change.
Model Distillation
Distillation transfers skill from a large, capable "teacher" model to a smaller, faster "student" model for one specific use case. In Amazon Bedrock, you provide prompts for your use case; Bedrock generates responses from the teacher and uses them to fine-tune the student. There's an upfront cost, including inference charges for the teacher's responses, but the result is a model that's cheaper and faster to run at high volume while staying close to the teacher's accuracy on that task.
Pre-Training
Pre-training builds a foundation model from scratch on a huge general dataset. It takes massive computing resources and months of time, and AWS notes that it can cost millions of dollars. For almost every business, using and adapting an existing foundation model is far cheaper and faster.
| Approach | Changes the model? | Upfront cost | Ongoing cost driver |
|---|---|---|---|
| In-context learning | No | None | Extra prompt tokens per call |
| RAG | No | Low (embeddings, vector store) | Storage and retrieved tokens |
| Fine-tuning | Yes | Medium (training) | Custom model storage and inference |
| Distillation | Yes (student) | Medium (teacher calls, training) | Low: small model inference |
| Pre-training | New model | Very high | Hosting a large model |
On the Exam
Start at the bottom of the ladder and stop at the first approach that meets the requirement. New behavior or format with a few examples: in-context learning. Current company facts: RAG. Consistent specialized behavior at scale: fine-tuning. Large-model quality at small-model cost: distillation. Pre-training is almost never the right answer.