Skip to content

Task Statement 2.1: Explain the Basic Concepts of Generative AI (GenAI)

AWS AIF-C01 Exam Focus: Task 2.1 forms the core of Domain 2 (Fundamentals of GenAI, 24% of exam). It tests your understanding of foundational vocabulary (tokens, embeddings, vector spaces), GenAI modalities, the FM lifecycle, token pricing mechanics, context engineering, and modern Agentic AI design patterns (multi-agent orchestration, MCP, tool calling).


1. Foundational GenAI Concepts & Glossary

Text Processing & Representation

  • Tokens: The basic atomic units of text processed by Large Language Models (LLMs). A token can be a word, sub-word, punctuation mark, or character sequence. As a general rule, 1,000 tokens $\approx$ 750 English words.
  • Chunking: The process of breaking large documents or raw text into smaller, manageable segments prior to generating embeddings. Essential for Retrieval-Augmented Generation (RAG) so retrieved context fits within context window limits.
    • Fixed-Size Chunking: Dividing text by strict character/token count (e.g., 500-token chunks with 50-token overlap).
    • Semantic Chunking: Dividing text based on natural linguistic boundaries (paragraphs, headings, semantic topic shifts).
  • Embeddings: High-dimensional numerical vector representations of data (text, images, audio) that capture semantic meaning. Words or phrases with similar meanings are mapped closer together in vector space.
  • Vectors & Vector Databases:
    • Vectors: Dense arrays of numbers output by embedding models.
    • Vector Database: A specialized database built to store, index, and perform high-speed similarity searches (e.g., Cosine Similarity, Euclidean Distance) over millions of vector embeddings (e.g., Amazon OpenSearch Serverless, Amazon Aurora pgvector).

Model Architectures & Paradigms

  • Transformers: The foundational neural network architecture behind modern LLMs. It uses self-attention mechanisms to process sequential data in parallel, allowing the model to weigh the relevance of every word in a sequence relative to all other words.
  • Foundation Models (FMs): Large multi-billion parameter deep learning models trained on vast, diverse datasets at scale. They possess broad general-purpose capabilities and can be adapted to downstream tasks via prompting, RAG, or fine-tuning.
  • Multi-Modal Models: FMs capable of simultaneously understanding, processing, and generating combinations of different data modalities (e.g., Text-to-Image, Image+Text-to-Text, Text-to-Audio).
  • Diffusion Models: Generative models predominantly used for media generation (image, video, audio). They operate by adding random Gaussian noise to images during training, then learning to iteratively remove noise to synthesize clear, new images from text prompts (e.g., Stable Diffusion, Amazon Titan Image Generator).

2. Generative AI Use Cases & AWS Mapping

Modality / Pattern Real-World Enterprise Use Case AWS Managed Service / Solution
Text Generation & Summarization Executive report generation, legal contract summarization, automated customer email responses. Amazon Bedrock (Anthropic Claude, Meta Llama, Amazon Nova)
Code Generation & Developer Assistance Real-time code completions, unit test writing, code refactoring, legacy code migration. Amazon Q Developer
Conversational AI & Customer Agents Self-service customer support, interactive product assistants, automated IVR systems. Amazon Q Business, Agents for Amazon Bedrock
Enterprise Search & Knowledge Bases Q&A systems over internal enterprise documentation with exact source citations. Amazon Bedrock Knowledge Bases
Media Generation (Image/Video) Automated marketing asset creation, product design mockup generation, video editing. Amazon Bedrock (Amazon Titan Image Generator, Stability AI)
Synthetic Data Generation Generating anonymized training data for fraud models or healthcare research. Amazon SageMaker AI, Amazon Bedrock

3. The Foundation Model (FM) Lifecycle

Developing and operationalizing FM applications follows an iterative 7-stage lifecycle:

Stage Key Operational Activities AWS Tooling
1. Data Selection & Curation Gathering, cleaning, deduplicating, and filtering massive pre-training or fine-tuning datasets; scrubbing PII. Amazon S3, AWS Glue, SageMaker Data Wrangler
2. Model Selection Evaluating pre-trained FMs based on latency, cost, modality, context window size, and licensing. Amazon Bedrock Model Evaluation, SageMaker JumpStart
3. Pre-Training Unsupervised learning on massive datasets to learn language/world representations (costly, resource-intensive). SageMaker AI on AWS Trainium / EC2 UltraClusters
4. Adaptation Customizing pre-trained FMs for specific business tasks via Prompt Engineering, RAG, or Fine-Tuning. Amazon Bedrock Knowledge Bases, Bedrock Fine-Tuning
5. Model Evaluation Benchmarking output accuracy, toxicity, and hallucinations against baseline metrics (ROUGE, BLEU, Human Review). Amazon Bedrock Model Evaluation
6. Deployment & Serving Hosting FMs for production inferencing behind serverless managed APIs or provisioned capacity endpoints. Amazon Bedrock On-Demand / Provisioned Throughput
7. Feedback & Alignment Incorporating human feedback (RLHF) and monitoring live prompts to continuously refine guardrails. Amazon Augmented AI (A2I), Bedrock Guardrails

4. Token-Based Pricing & Inference Performance

Understanding token mechanics is critical for controlling application costs and optimizing response latency.

Token Cost Dynamics

  • Input Tokens vs. Output Tokens: Vendors charge separately for input tokens (the prompt + context) and output tokens (the model's generated response). Output tokens are significantly more expensive than input tokens because each output token requires an iterative generation pass through the entire neural network.
  • Prompt Caching: A performance and cost optimization feature that saves pre-computed Key-Value (KV) states for frequently reused system prompts or context blocks. Reduces latency and input token costs by up to 90%.

Inference Latency Metrics

  • Time to First Token (TTFT): The duration it takes for the model to process input tokens and begin streaming the very first output token. Highly dependent on input prompt length.
  • Token Generation Rate (Tokens/Sec): The speed at which subsequent output tokens are produced. Directly affects user-perceived responsiveness.

AWS Bedrock Consumption Models

Consumption Model Operational Mechanics Billing Basis Best For
On-Demand Pay-as-you-go serverless model with zero upfront commitment. Shared multi-tenant compute. Per 1,000 Input and Output Tokens processed. Unpredictable traffic, prototyping, low-to-medium volume workloads.
Provisioned Throughput Reserving dedicated, guaranteed compute capacity (Model Units) for a specific FM. Hourly rate per Model Unit (1-month or 6-month commitment). Large-scale production apps requiring strict SLAs, high throughput, or custom fine-tuned models.
Batch Inference Submitting large volumes of non-real-time prompts processed asynchronously offline. Per Token (typically at a ~50% discount compared to On-Demand). Bulk document summarization, offline dataset processing, nightly analytics.

5. Context Engineering vs. Prompt Engineering

  • Prompt Engineering: The art of phrasing, structuring, and formatting individual prompt strings (instructions, examples) to guide an FM toward generating desired outputs.
  • Context Engineering: The broader system-level architectural discipline of managing, assembling, and optimizing the complete dynamic context state provided to the FM during runtime.

Key Components of Context Engineering

  1. System Instructions: High-level rules defining model persona, constraints, and output formatting.
  2. Retrieved External Knowledge (RAG): Dynamically injecting relevant vector search results into the prompt context.
  3. Conversation History (Memory): Maintaining short-term turn history while truncating or summarizing old turns to prevent context overflow.
  4. Few-Shot Examples: Supplying relevant input-output pairs dynamically based on user query intent.
  5. Tool Definitions: Passing JSON schemas describing available external APIs the model can call.

Context Window Trade-offs

  • Cost Scaling: Input token costs scale linearly with context length.
  • Latency Impact: Larger context windows increase Time to First Token (TTFT).
  • Attention Degradation ("Lost in the Middle"): LLMs tend to attend strongly to information placed at the very beginning and very end of long contexts, often ignoring details buried in the middle.

6. Foundational Agentic AI Concepts

An AI Agent uses a Foundation Model as its central reasoning engine to autonomously plan, invoke external tools, process intermediate observations, and execute multi-step workflows to achieve a high-level goal.

Core Agent Architecture Components

  • Reasoning Engine: The underlying LLM that analyzes goals, breaks them down into sub-tasks, and selects appropriate actions (e.g., ReAct framework: Reason $\rightarrow$ Act $\rightarrow$ Observe).
  • Tool Usage (Function Calling): Defining external systems (APIs, SQL databases, calculators, Lambda functions) using OpenAPI schemas so the agent can execute real-world actions.
  • Memory Management:
    • Short-Term Memory: Manages state and intermediate reasoning steps across the current task execution.
    • Long-Term Memory: Stores persistent user preferences and past interactions across sessions using vector databases or key-value stores.
  • Workflow Orchestration: Managing execution loops, retry logic, error handling, and human-in-the-loop approval thresholds.

Multi-Agent System Patterns

When a task is too complex for a single agent, Multi-Agent Orchestration distributes tasks across specialized agents.

Multi-Agent Pattern Communication Flow Best For
Supervisor / Hierarchical A central coordinator agent assigns sub-tasks to specialized worker agents and synthesizes final outputs. Complex tasks requiring strict governance and centralized control.
Sequential / Pipeline Agent A completes step 1, passes output to Agent B for step 2, and so on. Fixed multi-step processing pipelines (e.g., Code Write $\rightarrow$ Security Scan $\rightarrow$ Deploy).
Peer-to-Peer / Collaborative Specialized agents communicate directly with each other to negotiate, debate, and refine solutions. Open-ended research, creative brainstorming, complex problem solving.

Model Context Protocol (MCP) & AWS Agent Services

  • Model Context Protocol (MCP): An open standard that simplifies how AI agents connect to external data sources, enterprise tools, and business APIs. Instead of building custom integration code for every API, agents use MCP servers as universal plug-and-play connectors.
  • Agents for Amazon Bedrock: Fully managed AWS feature that builds, configures, and orchestrates AI agents. Automatically handles prompt creation, short-term memory, and tool invocation via AWS Lambda.
  • Amazon Bedrock AgentCore & Strands Agents: AWS frameworks and runtime environments for building, securing, and deploying enterprise multi-agent workflows with state management and identity controls.

7. Exam Decision Rules & Common Pitfalls

High-Yield Decision Rules

  1. Select Output Tokens as the main cost driver when optimizing LLM budget — output generation is significantly more expensive per token than prompt ingestion.
  2. Select Prompt Caching when a prompt template includes large, repetitive context blocks (e.g., 20-page system policies) used across thousands of requests.
  3. Select Provisioned Throughput in Amazon Bedrock when an application requires guaranteed throughput, zero cold-start throttling, or hosting a custom fine-tuned model.
  4. Select Batch Inference when processing large volumes of non-time-sensitive documents offline to achieve maximum cost savings (~50% discount).
  5. Select Agents for Amazon Bedrock when an application must autonomously break down multi-step tasks, call external APIs via Lambda, and execute actions.
  6. Select Semantic Chunking over fixed-size chunking when preserving complete sentences, heading contexts, and logical paragraphs is critical for RAG quality.

Common Exam Traps

  • Trap 1: Confusing On-Demand with Provisioned Throughput
    • On-Demand cannot guarantee dedicated capacity during regional demand spikes. If a question emphasizes strict SLAs and guaranteed quota, select Provisioned Throughput.
  • Trap 2: Misinterpreting Context Window Limits
    • Having a 1-million token context window does NOT mean you should dump entire databases into the prompt. It increases cost, latency, and risk of "lost in the middle" attention degradation. Use RAG for targeted retrieval instead.
  • Trap 3: RAG vs. Function Calling (Tools)
    • Use RAG when the model needs to read static external information. Use Function Calling / Tools when the model needs to take an action, modify data, or query dynamic real-time APIs.