Study Hub / AWS Certified AI Practitioner (AIF-C01) / Domain 2.0
AWS AI Practitioner (AIF-C01) Domain 2.0: Fundamentals of Generative AI — Explained
Domain 2.0 is the vocabulary of the AI boom: how large language models actually work (tokens, transformers, training), how you adapt them (fine-tuning, RAG, prompt engineering), and what they're good and bad at. Conceptual, not mathematical.
How LLMs work: tokens to transformers
- Tokens — models don't read words; they read tokens (word pieces: "unbelievable" might be 2–3 tokens). Context windows and pricing are measured in tokens — everything about LLM scale is token math.
- Transformers — the architecture behind modern LLMs: attention mechanisms let the model weigh which earlier tokens matter for predicting the next one. "Attention is all you need" wasn't modesty — it was the blueprint.
- Training in two phases — pre-training (learn language from massive text: next-token prediction at internet scale) then fine-tuning/alignment (instruction tuning, RLHF — teach it to be helpful, honest, and safe).
- Foundation models — large pre-trained models adapted to many tasks (as opposed to training from scratch per task). The economic breakthrough: train once, adapt everywhere.
- Parameters — the model's learned weights (billions/trillions). More parameters ≈ more capability, more cost — but architecture and data quality matter as much as raw size.
Adapting models: fine-tuning, RAG, and agents
- Prompt engineering — shaping behavior through instructions: clear task framing, examples (few-shot), step-by-step reasoning ("chain of thought"), output format specs. The cheapest adaptation — no training required.
- RAG (Retrieval-Augmented Generation) — the model retrieves relevant documents at query time and grounds its answer in them. Fixes staleness (knowledge cutoff) and hallucinations about your data — without retraining.
- Fine-tuning — additional training on your examples to specialize behavior/style. More effort than prompting, deeper adaptation; doesn't efficiently inject facts (that's RAG's job).
- When to use which — need current/proprietary facts? RAG. Need consistent style/format/behavior? Fine-tuning (or good prompting). Both? Common in production.
- Agents — models that act: plan multi-step tasks, call tools/APIs, observe results, iterate. The step from "answer questions" to "do the workflow."
Capabilities, limits, and model types
- What LLMs do well — summarization, drafting, translation, code assistance, classification, conversational interfaces. Pattern completion at scale.
- Hallucinations — fluent, confident, wrong output. Models predict plausible text, not truth — verification matters wherever accuracy does. RAG and human review are the mitigations.
- Diffusion models — the image-generation family (Stable Diffusion, DALL-E): learn to reverse noise into images from text prompts. Different architecture, same "foundation model" idea.
- Embeddings — text as vectors (number lists) where similar meanings sit near each other. The machinery behind semantic search and RAG retrieval.
- Multimodal models — handling text + images + audio together. The direction everything is moving: one model, many senses.
The must-memorize table: adaptation techniques
How to make a foundation model yours.
| Technique | What it does | Use when |
|---|---|---|
| Prompt engineering | Shapes behavior via instructions/examples | Quick adaptation, no training |
| RAG | Retrieves your documents at query time | Current/proprietary facts needed |
| Fine-tuning | Additional training on your examples | Consistent style/behavior/domain |
| Agents | Model plans and calls tools iteratively | Multi-step workflows |
Try it: 4 sample questions
Sample questions to check your understanding of this domain. Answers and full reasoning are tucked under each one.
1. A company's chatbot gives outdated answers about products launched after the model's training cutoff. Retraining is too expensive. What's the standard fix?
- A. A. Prompt engineering alone
- B. B. RAG — retrieve current product docs at query time and ground answers in them
- C. C. Buy a bigger model
- D. D. Fine-tune on the old catalog
Show answer & reasoning
B. RAG solves staleness without retraining: the model pulls fresh documents per query and answers from them. Prompting (A) can't supply facts the model never learned; fine-tuning (D) on old data doesn't add new facts efficiently. Cutoff problems → retrieval.
2. What is a token, and why does it matter for cost and context?
- A. A. A user login credential
- B. B. The unit models read — word pieces; context windows and API pricing are both measured in tokens
- C. C. A type of neural network
- D. D. An encryption key
Show answer & reasoning
B. Tokenization splits text into model-digestible pieces ("unbelievable" → 2–3 tokens). Two consequences: the context window (how much the model can consider) is a token budget, and providers bill per token. Token math is LLM economics.
3. A team needs their support bot to always answer in the company's exact tone and format, across thousands of queries. Which adaptation fits best?
- A. A. RAG
- B. B. Fine-tuning — train on examples of the desired style so the behavior is consistent and baked in
- C. C. A bigger context window
- D. D. Embeddings
Show answer & reasoning
B. Consistent style/behavior across many queries is fine-tuning's job: the pattern becomes the model's default rather than a prompt it might drift from. RAG (A) supplies facts, not style. "Always sound like us" → fine-tune (after trying good prompting first — cheapest wins when it works).
4. A model confidently states a completely fabricated legal citation. What is this phenomenon, and what are the two standard mitigations?
- A. A. Overfitting — use more data
- B. B. Hallucination — fluent plausible-but-false output; mitigate with RAG grounding and human verification
- C. C. Tokenization error — use fewer tokens
- D. D. Mode collapse — retrain from scratch
Show answer & reasoning
B. Hallucinations are the core LLM failure mode: the model predicts plausible text, not true text. Mitigations: ground answers in retrieved sources (RAG) and keep humans verifying where accuracy matters. It's not a bug to patch out — it's the architecture's nature to design around.
This was one domain. The simulator drills all 5.
This free preview covered Fundamentals of Generative AI (Domain 2.0, 24%). Not covered here: Applications of Foundation Models (Domain 3.0, 28%); Security, Compliance & Governance for AI Solutions (Domain 5.0, 14%). The applied domains — foundation-model use cases and AI security/governance — stay in the paid guide and practice bank. The ByteBar Practice Exam Simulator drills every domain with 1,000 exam-style questions — $9.99 one-time unlocks all 28 exams. Prefer to read? The full AWS AI Practitioner Study Guide is in the ByteBar shop on Etsy.
Practice Exam Simulator — $9.99 one-time, all 28 exams Full Study Guides on Etsy