RAG vs Fine-Tuning vs Prompt Engineering: The Customization Ladder for AIF-C01
AWS AI Practitioner · Foundation Models

RAG vs Fine-Tuning vs Prompt Engineering: Picking the Right Rung for AIF-C01

To make a foundation model fit a business, start with the cheapest option that works: prompt engineering first, then retrieval-augmented generation (RAG) for missing knowledge, then fine-tuning for missing behavior. The AWS AI Practitioner (AIF-C01) exam tests this as a cost ladder that also includes model distillation and pre-training (objective 3.1.5).

Last updated October 2026.

The one question that decides it

Is the model missing knowledge or missing behavior?

Missing knowledge means facts: this quarter's price list, internal policies, product manuals. Put those in the prompt or retrieve them with RAG. Missing behavior means a skill, style or format the model cannot produce reliably however you ask: a house writing style, a specialized classification, a domain vocabulary used consistently. That calls for training.

Most wrong answers on this topic come from mixing the two up, usually by choosing fine-tuning to teach facts that change every week.

The five rungs, cheapest first

1. In-context learning (prompt engineering)

Instructions and a few examples go in the prompt; the model's weights never change. There is no training cost, only extra prompt tokens on every call. It is best for format, tone and simple rules a handful of examples can show, and changes take minutes. The limit is the context window, and long prompts cost tokens on every request.

2. Retrieval-augmented generation

Relevant passages are retrieved from your documents and added to the prompt. On AWS this is Amazon Bedrock Knowledge Bases with a vector store. You pay for embeddings, the vector store and the retrieved tokens, but there is no model training. Updating knowledge is a data sync, not a retrain, and answers can cite their sources. It adds facts, not skills.

3. Fine-tuning

Further training of an existing model on labeled prompt and response pairs, so its weights change. You pay for data preparation and a training job up front, then for hosting the custom model. It is the right tool for consistent new behavior, but it needs hundreds to thousands of good examples, and new facts mean another training run.

4. Model distillation

A large teacher model answers your prompts, and those answers train a smaller student model. Amazon Bedrock Model Distillation automates this. AWS states distilled models are up to 500% faster and up to 75% less expensive than the original models, with less than 2% accuracy loss for use cases like RAG. Use it when a big model is accurate but too slow or costly at volume.

5. Pre-training

Training a foundation model from scratch on a huge body of mostly unlabeled data. It needs massive data, large accelerator clusters for weeks or months, and a specialist team. On the exam it is almost never the answer for a single business; continued pre-training on unlabeled domain text is the cheaper middle ground.

Objective 3.1.5 from the official AIF-C01 exam guide, version 1.1, which added distillation. Distillation figures from the Amazon Bedrock Model Distillation product page, checked 23 October 2026.

Side by side

OptionUp-front costWhat it changes
Prompt engineeringNoneFormat and instructions
RAGLowKnowledge
Fine-tuningMediumBehavior and skill
DistillationMedium to highBig-model skill in a small model
Pre-trainingExtremeEverything

Per-request cost runs the other way at the top: prompting and RAG add tokens to every call, while a fine-tuned or distilled model adds hosting, and distillation's small model is the cheapest to run at volume.

Signal words on the exam

The common trap: a scenario says the model gives outdated answers about frequently changing products and offers fine-tuning as an option. Fine-tuning would be out of date again after the next change. RAG keeps answers current with a sync.

They combine

The rungs are not exclusive. A fine-tuned model that has learned a house style can still use RAG for current facts, and every option still needs a well-written prompt. On the exam, though, the question usually asks for the first or most cost-effective step, and that is the lowest rung that closes the gap.

FAQ

What is the difference between RAG and fine-tuning?

RAG adds knowledge at request time by retrieving relevant documents into the prompt, so the model itself does not change. Fine-tuning changes the model's weights by training it on labeled examples, which teaches new behavior such as a style or specialized task.

When should you use RAG instead of fine-tuning on AWS?

Use RAG when the model needs private or frequently changing information, especially if answers must cite sources. On AWS that means Amazon Bedrock Knowledge Bases; updating knowledge is a data sync rather than a new training job.

What is model distillation in Amazon Bedrock?

Distillation trains a smaller student model on answers generated by a larger teacher model for your prompts. AWS states distilled models are up to 500% faster and up to 75% less expensive than the originals, with less than 2% accuracy loss for use cases like RAG.

Which customization approach is cheapest for a foundation model?

Prompt engineering, also called in-context learning. It needs no training and no extra hosting, and the only cost is the additional prompt tokens on each request.

Climb the ladder chapter by chapter

Unit 3 of the Certified AIF-C01 course covers model choice, RAG, vector stores, the customization ladder, prompting and evaluation, with exam-style questions in every chapter.

Open the AIF-C01 course →