Retrieval-Augmented Generation (RAG), fine-tuning, and continued pre-training all help adapt foundation-model applications, but they solve different problems. The exam clue is to identify whether the requirement is to supply current knowledge, change model behavior, or continue adapting a model using additional domain data.
RAG: retrieve knowledge at inference time
RAG retrieves relevant information from an external knowledge source and adds it to the prompt before the model generates a response. A typical pipeline ingests documents, chunks them, creates embeddings, stores them in a vector index, retrieves relevant passages for a user query, and supplies those passages as context.
Choose RAG when the application needs answers based on private, frequently updated, or organization-specific documents. Updating the knowledge source and re-indexing it can make new information available without retraining the foundation model. RAG can reduce unsupported answers, but retrieval and generation still need evaluation.
Fine-tuning: adapt model behavior with examples
Fine-tuning continues training a model on a curated dataset so it learns a desired task pattern, style, format, or domain-specific behavior. It is useful when prompting alone does not produce consistent behavior. Fine-tuning is not usually the best first choice for facts that change every day; those facts are often better supplied through retrieval.
Continued pre-training: extend domain knowledge through more training
Continued pre-training exposes a pretrained model to additional large-scale, domain-relevant data so it can adapt its representations and knowledge to that domain. It generally requires more data and training effort than simply retrieving documents or fine-tuning on a smaller set of task examples.
Side-by-side comparison
| Approach | What changes? | Best-fit requirement |
|---|---|---|
| RAG | Context supplied to the model at inference time | Use current or private reference documents |
| Fine-tuning | Model parameters and task behavior | Improve consistent task execution, format, or style |
| Continued pre-training | Model parameters through additional domain training | Adapt a model using substantial domain-specific text or data |
How to choose in an exam scenario
- “The policy documents change weekly” → RAG is a strong fit because the application can retrieve updated source content.
- “The model must consistently return output in a specialized format” → consider fine-tuning if prompting is insufficient.
- “The model needs deeper exposure to a specialized domain corpus” → continued pre-training may be relevant.
- “The answer must cite passages from an internal knowledge base” → RAG is the direct pattern.
Limitations and traps
- RAG does not modify the model’s weights; it supplies additional context at inference time.
- Fine-tuning does not guarantee that the model will know the latest facts after the training cutoff.
- Continued pre-training is not the same as indexing documents for retrieval.
- RAG can still fail when the wrong chunks are retrieved, documents are stale, or the model ignores the supplied context.
- These approaches can be combined when the application needs both specialized behavior and access to current external knowledge.
Test yourself
Question 1
A company wants a foundation model to answer questions using product manuals that are updated every week. It wants to avoid retraining the model after each update. Which approach is the best fit?
- RAG
- Train a model from scratch
- Increase temperature
- Continued pre-training after every document change
Reveal answer
Correct answer: A. RAG retrieves the latest indexed information at inference time without requiring model retraining for every document update.
Question 2
A model understands general language but needs to learn a specialized writing style and consistently follow a domain-specific output format. Which adaptation approach should the team evaluate?
- Vector search only
- Fine-tuning
- Increasing the context window only
- Batch translation
Reveal answer
Correct answer: B. Fine-tuning can adapt model behavior using curated examples of the desired task and format.
Key takeaway
RAG supplies knowledge; fine-tuning adapts behavior; continued pre-training extends domain adaptation through additional training. Choose based on what the scenario actually needs to change.
Related AWS topics
Amazon Bedrock Knowledge Bases · Tokens, Embeddings and Vector Databases · Foundation Model Hallucinations
✦ CloudExamPro Premium
Ready for the AWS Certified AI Practitioner (AIF-C01)?
Move beyond memorizing terms. Practice with realistic, scenario-based questions and detailed explanations that help you understand the AWS AI services and concepts behind each answer.
Original practice questions. No dumps. No shortcuts.