Task 2.1: Explain the basic concepts of generative AI (GenAI)
Fundamentals of GenAI · 4,042 words · source: Certified-AI-Practitioner-AIF-C01/domain-2/task-2-1-cheat-sheet.md
Domain 2: Fundamentals of GenAI
Task Statement 2.1: Explain the basic concepts of generative AI (GenAI)
Domain 2 is 24% of scored exam content. Task 2.1 focuses on foundational GenAI vocabulary, model types, common use cases, the foundation model lifecycle, token-based cost thinking, context engineering, and basic agentic AI concepts.
Use this sheet to build the mental model for later Domain 2 and Domain 3 questions. Most exam questions for this task are matching, definition, ordering, or "which concept explains this scenario?"
Exam Objective Map
You should be able to:
| AWS exam objective | What to know for the exam |
|---|---|
| Define foundational GenAI concepts | Tokens, tokenizers, context windows, chunking, embeddings, vectors, prompt engineering, LLMs, FMs, multimodal models, diffusion models |
| Identify GenAI use cases | Text/image/video/audio generation, summarization, AI assistants, translation, code generation, customer service agents, search, recommendations |
| Describe the FM lifecycle | Data selection, model selection, pre-training, fine-tuning, evaluation, deployment, feedback |
| Explain token-based pricing | Input and output tokens affect cost, quotas, latency, and context-window design |
| Describe context engineering | Provide the model with the right instructions, examples, retrieved information, memory, tools, and constraints at inference time |
| Define foundational agentic AI concepts | Agents, tools, memory, orchestration, workflow patterns, multi-agent systems, MCP, inter-agent communication |
The Big Picture
Generative AI creates new content rather than only classifying, predicting, or detecting existing patterns.
AI
Machine learning
Deep learning
Generative AI
Foundation models
Large language models
Multimodal models
Diffusion models
Agentic AI systems can use FMs, tools, memory, APIs, and orchestration
Exam shortcut:
GenAI creates.
LLMs generate and understand language.
FMs are broad reusable models.
Embeddings turn meaning into vectors.
Context engineering decides what the model sees at inference time.
Agents use models plus tools to pursue goals.
Core GenAI Terms
| Term | Exam-ready definition | Example |
|---|---|---|
| Generative AI | AI that creates new content such as text, code, images, video, audio, or synthetic data. | Draft product descriptions or generate images from text |
| Foundation model (FM) | A large model trained on broad data that can be adapted to many downstream tasks. | Use a text FM for summarization, Q&A, and classification |
| Large language model (LLM) | A foundation model focused on language tasks, commonly based on transformer architecture. | Chat assistant, document summarizer, code helper |
| Prompt | The input instructions, content, question, examples, and constraints sent to a model. | "Summarize this policy in five bullets." |
| Completion / response | The output generated by the model from the prompt. | Summary, answer, code, image description |
| Inference | Running a model on new input to produce output. | Invoke a Bedrock model with a user prompt |
| Token | A unit of text used by a model; it can be a word, part of a word, punctuation, or other symbol depending on the tokenizer. | "foundation" might be one token or split into subword tokens |
| Tokenizer | Component that converts text into token IDs from the model's vocabulary. | Convert a prompt into numeric input IDs |
| Vocabulary | The set of tokens that a model can represent. | Words, subwords, punctuation, special tokens |
| Context window | The maximum amount of input and generated text a model can handle in one request or conversation turn. | Prompt + retrieved context + chat history + output |
| Prompt engineering | Designing prompts to improve model output quality. | Add role, task, examples, format, and constraints |
| In-context learning | Including examples or relevant information in the prompt so the model can adapt at inference time. | Few-shot examples inside the prompt |
| Zero-shot prompting | Ask the model to perform a task without examples. | "Classify this review as positive or negative." |
| One-shot prompting | Provide one example before the task. | One labeled review, then a new review |
| Few-shot prompting | Provide multiple examples before the task. | Several input/output pairs in the prompt |
| Embedding | A numerical vector representation of data that captures semantic meaning. | Convert a paragraph into a vector for similarity search |
| Vector | An ordered list of numbers representing features or meaning in a mathematical space. | [0.041, 0.056, -0.018, ...] |
| Chunking | Splitting larger content into smaller pieces so it can be embedded, retrieved, or fit into a context window. | Split a PDF into paragraph-sized chunks |
| Vector database / vector index | A store optimized for finding semantically similar vectors. | Retrieve related policy chunks for RAG |
| RAG | Retrieval Augmented Generation; retrieve relevant context and add it to the prompt before generation. | Answer from company docs without retraining the model |
| Context engineering | Designing the full model context: prompt, examples, retrieved data, memory, tools, constraints, and conversation state. | Add user profile, policy snippets, system instructions, and tool definitions |
| Parameter | A learned model weight adjusted during training. More parameters can increase capacity but also cost and resource needs. | Billions of learned weights in an FM |
| Fine-tuning | Supervised adaptation of a base model with task-specific examples. | Teach a model to output a company-specific format |
| RLHF | Reinforcement learning from human feedback; aligns model behavior with human preferences. | Human-ranked responses improve assistant helpfulness |
Tokens, Context, and Cost
Tokens matter because GenAI inference is commonly priced and limited by token usage.
| Concept | Why it matters for the exam |
|---|---|
| Input tokens | The prompt, system instructions, examples, retrieved context, chat history, and tool definitions all consume tokens. |
| Output tokens | Generated text also consumes tokens and can increase latency and cost. |
| Context window | If the prompt plus context is too large, content must be shortened, chunked, summarized, or retrieved more selectively. |
| Token quotas | Token usage can count against per-minute or per-day service quotas. |
| Model-specific tokenization | Different models can count tokens differently, so token estimates are model-specific. |
| CountTokens API | Amazon Bedrock can estimate input token usage before sending inference requests for supported models. |
Cost and performance tradeoff:
More context can improve quality.
More context also increases token cost, latency, and risk of irrelevant information distracting the model.
Exam traps:
- A longer prompt is not automatically better.
- Input tokens and output tokens can both affect cost.
- Token counting is model-specific.
- Context-window size is a hard design constraint; use chunking, summarization, retrieval, or prompt compression when content is too large.
Embeddings, Vectors, and Chunking
GenAI models work with numbers, not raw human meaning. Embeddings and vectors are how text, images, or other data can be represented mathematically.
| Concept | What it does | Exam signal phrase |
|---|---|---|
| Embedding model | Converts text, images, or other data into vector embeddings. | "Represent meaning numerically" |
| Vector space | Mathematical space where similar meanings are closer together. | "Semantic similarity" |
| Chunking | Breaks large content into smaller pieces before embedding or retrieval. | "Split documents into manageable pieces" |
| Vector index | Stores vectors for similarity search. | "Find the most relevant chunks" |
| Query embedding | Converts the user's question into a vector for retrieval. | "Compare query to document vectors" |
Typical RAG-style flow:
Ingestion:
Documents -> chunks -> embeddings -> vector index
Runtime:
User question -> query embedding -> retrieve similar chunks -> augment prompt -> FM response
Exam shortcut:
Chunking prepares content.
Embeddings encode meaning.
Vectors enable similarity search.
Retrieved chunks provide context.
Transformer-Based LLMs
Transformers are the core architecture behind many modern LLMs.
| Concept | Exam-ready meaning |
|---|---|
| Transformer | Neural network architecture designed to process sequences and capture contextual relationships. |
| Self-attention | Mechanism that helps the model weigh which parts of the input are important when producing each output token. |
| Position embeddings / encodings | Help the model understand token order. |
| Pre-training | Large-scale training on broad data so the model learns language patterns and representations. |
| Fine-tuning | Additional training to adapt a pre-trained model to a specific task, domain, style, or output pattern. |
You do not need low-level math for the exam. Know that self-attention lets transformer models learn relationships between tokens across a sequence, which supports language understanding and generation.
Model Types and Architectures
| Model or architecture | What it is | Best association |
|---|---|---|
| LLM | Text-focused generative model, commonly transformer-based. | Text generation, summarization, Q&A, translation, code |
| Foundation model | Broad model that can support many tasks and be adapted. | Reusable base model |
| Multimodal model | Model that can process or generate more than one modality. | Text + image, text + audio, image captioning, visual Q&A |
| Diffusion model | Generative model that learns to reverse a noising process to create data. | Image generation, upscaling, inpainting, some audio use cases |
| Stable Diffusion | Diffusion approach that works in latent space instead of raw pixel space. | Text-to-image generation |
| GAN | Generative adversarial network with generator and discriminator networks. | Older/common image generation architecture concept |
| VAE | Variational autoencoder that learns compressed latent representations for generation. | Latent-space generative modeling |
Exam traps:
- LLMs are not the only GenAI model type.
- Multimodal means multiple data modalities, not just multiple languages.
- Diffusion models are strongly associated with image generation, denoising, inpainting, and upscaling.
- Transformers are strongly associated with modern LLMs and language generation.
Unimodal vs Multimodal
| Type | Meaning | Example |
|---|---|---|
| Unimodal | Uses one modality for input/output. | Text-only LLM that takes text and returns text |
| Multimodal | Uses multiple modalities as input and/or output. | Image captioning, visual question answering, text-to-image generation |
Common multimodal tasks:
- Image captioning: image input -> text output
- Visual question answering: image + question -> text answer
- Text-to-image synthesis: text prompt -> image output
- Image editing: image + instruction -> modified image
- Speech or audio generation: text or prompt -> audio output
GenAI Use-Case Chooser
| Use case | What GenAI does | AWS anchor |
|---|---|---|
| Text generation | Writes, rewrites, expands, or transforms text. | Amazon Bedrock |
| Summarization | Compresses long content while preserving main ideas. | Amazon Bedrock, Amazon Q |
| AI assistant | Answers questions or helps complete tasks through conversation. | Amazon Q, Amazon Bedrock |
| Translation | Converts text between languages; GenAI can help with context-sensitive translation. | Amazon Translate, Amazon Bedrock |
| Code generation | Produces code snippets, functions, tests, or explanations. | Amazon Q Developer |
| Customer service agent | Handles customer questions, retrieves knowledge, and can trigger actions. | Amazon Bedrock Agents, Amazon Lex, Amazon Q |
| Search | Uses embeddings and retrieval for semantic search. | Bedrock Knowledge Bases, vector databases |
| Recommendation engine | Suggests items or content based on user/context signals. | Amazon Personalize, SageMaker AI, Bedrock for natural-language recommendation explanations |
| Image generation | Creates or edits images from prompts. | Bedrock models, SageMaker JumpStart models |
| Video generation | Generates or transforms video content. | Multimodal GenAI model pattern |
| Audio generation | Creates audio, voices, or music-like output. | Multimodal/audio GenAI model pattern |
Exam shortcut:
Generate content -> GenAI.
Answer from private documents -> RAG / knowledge base.
Use APIs and complete steps -> agent.
Need prebuilt deterministic translation or speech service -> managed AI service can be better.
Foundation Model Lifecycle
The exam guide names this lifecycle:
Data selection -> Model selection -> Pre-training -> Fine-tuning -> Evaluation -> Deployment -> Feedback
| Stage | Purpose | What to remember |
|---|---|---|
| Data selection | Choose relevant, high-quality, representative data. | Data quality, bias, licensing, privacy, and harmful content matter. |
| Model selection | Pick a base model or service that fits task, modality, cost, latency, context length, and risk. | Do not default to the largest model. |
| Pre-training | Train a model on broad data to learn general patterns. | Expensive, compute-heavy, usually done by model providers or large organizations. |
| Fine-tuning | Adapt a pre-trained model with task-specific examples. | Useful when prompting/RAG is not enough for behavior, style, or format. |
| Evaluation | Test quality, safety, alignment, and business fit. | Use technical metrics, human review, benchmarks, and task-specific checks. |
| Deployment | Integrate the model into an application, endpoint, API, assistant, or workflow. | Consider latency, scale, monitoring, security, and cost. |
| Feedback | Collect user signals, corrections, monitoring data, and human review. | Drives prompt changes, retrieval changes, fine-tuning, or model replacement. |
Practical project flow from Skill Builder:
Identify use case
-> Experiment and select
-> Adapt, align, and augment
-> Evaluate
-> Deploy and iterate
-> Monitor
Exam traps:
- Pre-training from scratch is usually the most expensive path.
- Prompt engineering and in-context learning are often tried before fine-tuning.
- RAG augments model input at inference time; fine-tuning changes model behavior through training.
- Evaluation is iterative and should happen before and after deployment.
Adaptation Methods
| Method | Changes model weights? | Best for | Cost/complexity |
|---|---|---|---|
| Prompt engineering | No | Improve instructions, output format, and task clarity. | Lowest |
| In-context learning | No | Teach by examples inside the prompt. | Low, but uses tokens |
| RAG / knowledge base | No | Add private or current knowledge at inference time. | Medium |
| Fine-tuning | Yes | Improve domain behavior, style, structured output, or specific task performance. | Higher |
| Pre-training from scratch | Yes | Build a new general model from massive data. | Highest |
Memory hook:
Prompting changes instructions.
RAG changes context.
Fine-tuning changes behavior.
Pre-training creates the base capability.
Context Engineering
Prompt engineering is about the prompt text. Context engineering is broader: it is about everything the model receives and can use during inference.
| Context element | What it contributes |
|---|---|
| System instructions | Role, rules, safety boundaries, tone, and task priorities |
| User prompt | The user's immediate request |
| Conversation history | Prior turns and continuity |
| Examples | In-context learning and output patterns |
| Retrieved chunks | Grounding from documents, databases, or knowledge bases |
| Memory | Persisted facts or preferences across interactions |
| Tool definitions | APIs/functions the model can call |
| Output constraints | Format, schema, length, citations, or style |
| Guardrails | Content, topic, safety, and policy controls |
Good context engineering aims to:
- Give the model enough relevant information to complete the task.
- Keep irrelevant information out of the context window.
- Balance quality against token cost and latency.
- Ground responses in trusted sources when accuracy matters.
- Make tool use and workflow steps explicit.
Exam trap: context engineering is not only "write a better prompt." It includes retrieval, memory, tools, orchestration, and constraints.
Agentic AI Concepts
An AI agent uses a model to reason over goals, context, and available tools, then chooses actions to complete a task.
| Concept | Exam-ready meaning | Example |
|---|---|---|
| Agent | AI system that can plan, choose actions, use tools, and pursue a goal. | Support agent that checks order status and opens a ticket |
| Tool usage | Agent calls an external function, API, database, workflow, or code interpreter. | Call a CRM API |
| Workflow orchestration | Coordination of steps, dependencies, retries, approvals, and handoffs. | Route refund request to the right process |
| Memory management | Store and retrieve relevant state across turns or tasks. | Remember customer preferences or previous steps |
| Multi-agent system | Multiple agents with specialized roles collaborate on complex tasks. | Researcher, planner, coder, tester agents |
| Supervisor agent | Agent that routes tasks to collaborator agents and combines results. | Mortgage assistant routes to new-loan or existing-loan agent |
| Multi-agent communication | Agents exchange messages, share memory, delegate tasks, or negotiate. | Planner asks researcher for sources |
| MCP | Model Context Protocol; a protocol pattern for connecting agents to external tools and systems. | Bedrock AgentCore Gateway MCP configuration for external tools |
Agentic Patterns
| Pattern | Best for | Exam clue |
|---|---|---|
| Single agent with tools | A focused task that needs external actions. | "Call an API, retrieve info, update a record" |
| Workflow agent | Predictable multi-step process with central orchestration. | "Follow an approval workflow" |
| Supervisor + collaborators | Complex task requiring specialized agents and routing. | "One agent delegates to domain experts" |
| Peer multi-agent collaboration | Open-ended reasoning where agents share, debate, or divide work. | "Multiple autonomous agents negotiate or cooperate" |
Exam traps:
- A chatbot is not automatically an agent. It becomes agentic when it can plan, use tools, manage state, or orchestrate actions.
- Multi-agent collaboration is useful for complex tasks, but it adds coordination, latency, cost, and governance complexity.
- Tools need permissions, security controls, validation, and error handling.
AWS Service Anchors For Task 2.1
Task 2.1 is mostly conceptual, but know these service anchors:
| Concept | AWS anchor |
|---|---|
| Managed access to foundation models | Amazon Bedrock |
| Experiment with and invoke FMs | Amazon Bedrock playgrounds and runtime APIs |
| Embeddings and RAG with managed workflow | Amazon Bedrock Knowledge Bases |
| Build agents that use tools and knowledge bases | Amazon Bedrock Agents |
| Multi-agent collaboration | Amazon Bedrock Agents multi-agent collaboration |
| MCP for external tools | Amazon Bedrock AgentCore Gateway MCP configuration |
| Pretrained models and templates | SageMaker JumpStart |
| Custom model building and deployment | Amazon SageMaker AI |
| Code generation assistant | Amazon Q Developer |
| Enterprise AI assistant | Amazon Q Business |
Do not over-focus on service implementation for Task 2.1. The exam objective is concept recognition.
Comparison Drills
| Prompt | Correct association |
|---|---|
| "Break a long document into smaller pieces before embedding." | Chunking |
| "Represent paragraphs as lists of numbers for semantic search." | Embeddings / vectors |
| "Find related documents by meaning, not exact keyword match." | Vector similarity search |
| "Prompt plus retrieved chunks exceeds model limit." | Context window / token limit problem |
| "Estimate request cost before inference." | Token counting |
| "Include three examples in the prompt." | Few-shot prompting / in-context learning |
| "Model handles text and images together." | Multimodal model |
| "Generate an image by iteratively denoising random noise." | Diffusion model |
| "Model decides to call an API to complete a task." | Agent tool use |
| "Supervisor routes subtasks to specialist agents." | Multi-agent collaboration |
| "Add current company policy text to the prompt at runtime." | RAG / context engineering |
| "Train model on broad internet-scale data." | Pre-training |
| "Adapt a base model with labeled company examples." | Fine-tuning |
| "Improve model behavior with human preference feedback." | RLHF |
One-Page Memorization Version
- GenAI creates new content: text, code, images, video, audio, or synthetic data.
- Foundation models are broad reusable models; LLMs are language-focused FMs.
- Tokens are the units models process; input and output tokens affect cost, quotas, latency, and context limits.
- A tokenizer converts text into token IDs from the model vocabulary.
- A context window limits how much prompt, retrieved context, chat history, and output fit in one request.
- Embeddings are numerical vectors that capture semantic meaning.
- Chunking splits large documents into pieces for embedding, retrieval, or context-window fit.
- Vector similarity search finds semantically related chunks.
- Transformers use self-attention and are the core architecture behind many modern LLMs.
- Multimodal models use more than one modality, such as text plus images.
- Diffusion models are strongly associated with image generation, denoising, upscaling, and inpainting.
- FM lifecycle: data selection, model selection, pre-training, fine-tuning, evaluation, deployment, feedback.
- Prompting changes instructions; RAG changes context; fine-tuning changes model behavior.
- Context engineering includes prompts, retrieved data, memory, tool definitions, constraints, and orchestration.
- Agents use models plus tools, memory, and workflow orchestration to pursue goals.
- Multi-agent systems split complex work across specialized agents.
- MCP helps connect agents to external tools and systems.
- Bedrock is the AWS anchor for managed foundation models, RAG, and agents.
Mini Practice Questions
A company wants to answer employee questions from internal policy documents without retraining a model. Which concept fits?
- Answer: RAG / context engineering, commonly with Amazon Bedrock Knowledge Bases.
A document is too large to fit into a model's context window. What technique helps prepare it for retrieval?
- Answer: Chunking, followed by embeddings and storage in a vector index.
A model converts a paragraph into
[0.041, 0.056, -0.018, ...]so similar paragraphs can be found. What is this representation?- Answer: An embedding vector.
A GenAI request includes a long system prompt, five examples, retrieved documents, chat history, and asks for a long answer. What cost factor increases?
- Answer: Token usage. Both input and output tokens can affect cost and performance.
A model can accept an image and answer natural-language questions about that image. What type of model is this?
- Answer: Multimodal model.
A model generates images by starting from noise and iteratively removing noise. What model class is this?
- Answer: Diffusion model.
A support assistant searches a knowledge base, calls an order-status API, and opens a case if needed. What makes it agentic?
- Answer: It uses tools and orchestrates actions toward a goal.
A team wants several specialized agents to work together, with one agent routing tasks to others. What pattern fits?
- Answer: Multi-agent collaboration with a supervisor and collaborator agents.
A company has tried prompt engineering and RAG, but the model still fails to follow a required output style. What adaptation method might help?
- Answer: Fine-tuning with task-specific examples.
What is the difference between prompt engineering and context engineering?
- Answer: Prompt engineering designs the prompt text; context engineering designs the full inference context, including instructions, examples, retrieval, memory, tools, constraints, and workflow state.
Sources
Official AWS and course sources used:
- AWS Certification: Content Domain 2: Fundamentals of GenAI
- AWS Certification: AWS Certified AI Practitioner exam overview
- AWS Skill Builder: AWS Artificial Intelligence Practitioner Learning Plan
- AWS Skill Builder: Exam Prep Plan: AWS Certified AI Practitioner (AIF-C01 - English)
- Local Skill Builder transcript references:
.agent/skills/aws-builder-content/references/Domain-2/task-statement-2-1-lesson-1.mdthroughlesson-5.md - Local learning path reference:
.agent/skills/aws-learning-path/references/Domain-2-Fundamentals-of-GenAI.md - Amazon Bedrock User Guide: Overview
- AWS Prescriptive Guidance: Overview of vectors
- Amazon Bedrock User Guide: How Amazon Bedrock knowledge bases work
- Amazon Bedrock User Guide: Monitor your token usage by counting tokens before running inference
- Amazon Bedrock User Guide: Use multi-agent collaboration with Amazon Bedrock Agents
- AWS Prescriptive Guidance: Multi-agent collaboration
- AWS CloudFormation Template Reference: AWS::BedrockAgentCore::Gateway GatewayProtocolConfiguration