AIF-C01 Domain 2: Fundamentals of Generative AI

Part 3 of the series

AWS Certified AI Practitioner (AIF-C01)

AWS Certified AI Practitioner Foundational badge

Part 3 of 6 in the AIF-C01 exam prep series for developers. Previous: Domain 1: Fundamentals of AI and ML.

Domain 2 is where the exam checks that you understand how generative AI actually works, and what it costs. As a developer you've probably used an LLM API. This domain asks you to explain what happens underneath: tokens, embeddings, the model lifecycle, and why the bill looks the way it does. It also covers where generative AI is the wrong tool and which AWS service fits which kind of builder.

Domain at a glance#

Domain 2 is 24% of scored content, about 12 of the 50 scored questions.

TaskWhat it covers
2.1Explain the basic concepts of generative AI
2.2Understand the capabilities and limitations of GenAI for business problems
2.3Describe AWS infrastructure and technologies for building GenAI applications

Objective checklist#

#ObjectiveSection
2.1.1Tokens, chunking, embeddings, vectors, prompt engineering, transformers, LLMs, FMs, multimodal and diffusion modelsCore concepts
2.1.2GenAI use casesUse cases
2.1.3The foundation model lifecycleThe foundation model lifecycle
2.1.4Token-based pricing and its effect on cost and performanceToken-based pricing
2.1.5The role of context engineeringOne-liner below; full coverage in Post 5
2.1.6Agentic AI concepts: multi-agent patterns, MCP, memory, tools, orchestrationOne-liner below; full coverage in Post 5
2.2.1Advantages of GenAIAdvantages and disadvantages
2.2.2Disadvantages of GenAIAdvantages and disadvantages
2.2.3Factors for selecting a GenAI modelChoosing a model
2.2.4Business value and metricsBusiness value and metrics
2.3.1AWS services to develop GenAI applicationsAWS services for building GenAI
2.3.2Advantages of AWS GenAI servicesWhy build on AWS
2.3.3Benefits of AWS infrastructure for GenAIWhy build on AWS
2.3.4Cost trade-offs of AWS GenAI servicesCost trade-offs

Basic concepts of generative AI#

Core concepts#

ConceptWhat it isWhy it matters
TokenThe unit a model reads and writes: a word, part of a word, or punctuation. In English, roughly ¾ of a wordContext limits and pricing are both measured in tokens
ChunkingSplitting long documents into smaller pieces before embedding themChunk size and overlap decide what RAG can retrieve. Too small loses context; too large dilutes relevance
EmbeddingA list of numbers (a vector) that represents the meaning of text, an image, or audioSimilar meanings produce nearby vectors, which enables semantic search
VectorThe numeric array an embedding produces; its length is its dimensionalityStored in vector databases and compared by similarity, often cosine similarity
Prompt engineeringDesigning the input to get better outputCovered in Post 4
TransformerThe neural network architecture behind modern LLMs. Self-attention lets it weigh every token against every other token, in parallelWhy LLMs handle long-range context well
Large language model (LLM)A transformer trained on massive text to predict the next tokenThe engine of chat, summarization, and code generation
Foundation model (FM)A large model pre-trained on broad data and adaptable to many tasksLLMs are one kind; FMs can also handle images, audio, and video
Multimodal modelAccepts or produces more than one data type, such as text and imagesAnswering questions about a photo, or generating an image from text
Diffusion modelGenerates images by learning to reverse a noising process, turning random noise step by step into an imageThe architecture behind most modern image generators
Rendering diagram...

Figure: Documents and questions pass through the same embedding model, so their vectors are comparable. This is the retrieval half of RAG.

Use cases#

The guide's examples of what generative AI does well:

  • Content generation: image, video, and audio generation.
  • Text work: summarization, translation, and code generation.
  • Conversation: AI assistants and customer service agents.
  • Retrieval: search and recommendation engines.

What they share: open-ended inputs, outputs that are created rather than looked up, and tolerance for some variation in the answer.

The foundation model lifecycle#

Rendering diagram...

Figure: The foundation model lifecycle, a likely ordering question. Feedback from production drives the next round of data and tuning.

StageWhat happens
Data selectionGather and curate large, diverse, high-quality training data
Model selectionChoose an architecture, or an existing model to build on
Pre-trainingSelf-supervised training on massive unlabeled data; the expensive part
Fine-tuningAdapt the model to specific tasks with smaller, often labeled datasets
EvaluationMeasure quality, safety, and bias against benchmarks and human review
DeploymentServe the model through an API or endpoint
FeedbackCollect user feedback and monitoring data to improve the next iteration

Most builders never pre-train. They pick a pre-trained model and start at fine-tuning or, more often, just at deployment with good prompts.

Token-based pricing#

Objective 2.1.4 is new, and it covers cost and performance together.

How pricing works:

  • Foundation model APIs charge per token.
  • Input and output tokens are priced separately.
  • Output tokens usually cost several times more than input tokens.
Cost per request=Tin106×Pin+Tout106×Pout\text{Cost per request} = \frac{T_{\text{in}}}{10^6} \times P_{\text{in}} + \frac{T_{\text{out}}}{10^6} \times P_{\text{out}}

Here TT is the number of tokens and PP is the price per million tokens.

Worked example (illustrative prices). A support chatbot uses a model priced at 3.00 USD per million input tokens and 15.00 USD per million output tokens. Each request sends 1,500 input tokens, of which 1,200 are the same system prompt every time, and receives 300 output tokens. It handles 100,000 requests a day.

Input:150 M tokens×3.00=450 USD/dayOutput:30 M tokens×15.00=450 USD/day\begin{aligned} \text{Input:} \quad & 150 \text{ M tokens} \times 3.00 = 450 \text{ USD/day} \\ \text{Output:} \quad & 30 \text{ M tokens} \times 15.00 = 450 \text{ USD/day} \end{aligned}

Now turn on prompt caching for the 1,200-token system prompt, with cached reads billed at about 10% of the normal input price.

Cached input:120 M tokens×0.30=36 USD/dayUncached input:30 M tokens×3.00=90 USD/day\begin{aligned} \text{Cached input:} \quad & 120 \text{ M tokens} \times 0.30 = 36 \text{ USD/day} \\ \text{Uncached input:} \quad & 30 \text{ M tokens} \times 3.00 = 90 \text{ USD/day} \end{aligned}

Input cost drops from 450 to about 126 USD a day, ignoring small cache-write charges. Nothing about the application changed except that the repeated prefix is no longer reprocessed.

How tokens affect performance:

  • Longer input means higher latency. The model must process the whole prompt before producing the first token.
  • Longer output means a longer response time, because output is generated one token at a time.
  • Prompt caching also cuts latency, not just cost, because the cached prefix isn't reprocessed.

Amazon Bedrock's inference options all trade cost against speed and guarantees:

OptionPrice vs. StandardBest for
Standard (on-demand)Baseline, pay per tokenMost synchronous traffic
PriorityAbout 75% moreLatency-critical, customer-facing paths
FlexAbout 50% lessWork that tolerates slower, variable response times
BatchAbout 50% less; asynchronous through S3Offline bulk jobs: classification, summarization, evaluation
ReservedFixed price for reserved tokens per minutePredictable, mission-critical traffic
Provisioned ThroughputHourly charge for dedicated capacityGuaranteed throughput and hosting custom models

Beyond these options, three levers change the size of the bill:

  • Prompt caching: cached reads are up to about 90% cheaper, and cached prefixes cut latency. It requires a stable prefix.
  • Intelligent Prompt Routing: sends each request to the cheapest model in a family that can handle it.
  • Model distillation: trains a small model to imitate a large one for a narrow task. Covered in Post 4.

Context engineering and agentic concepts#

  • Context engineering (2.1.5) is deciding what goes into the model's context window at each step: instructions, retrieved documents, conversation history, tool definitions, and memory. It's the cost math above applied to accuracy. More tokens cost more, add latency, and eventually make answers worse.
  • Agentic AI concepts (2.1.6) are how agents use tools, memory, MCP, and multi-agent patterns to complete multi-step tasks.

Capabilities and limitations#

Advantages and disadvantages#

Advantages (2.2.1)Disadvantages (2.2.2)
Adaptability: one model handles many tasksHallucinations: confident, fluent, false output
Responsiveness: answers in secondsInterpretability: hard to explain why it said what it said
Conversational capability: natural-language interactionInaccuracy: errors, outdated knowledge from a training cutoff
Content generation: text, images, code, audioNondeterminism: the same prompt can produce different outputs
Simplicity: capabilities without training your own modelAlso: bias from training data, cost at scale, latency for long outputs

Nondeterminism comes from sampling. The model picks each next token from a probability distribution, and parameters like temperature control how much randomness is allowed. Lowering temperature makes answers more consistent, but it doesn't make them correct.

Choosing a model#

FactorQuestion to ask
Model type and modalityText only, or images, audio, video? Generate or understand?
Performance requirementsHow accurate does it need to be for this task?
CapabilitiesReasoning, code, tool use, languages supported?
ConstraintsContext window size, data residency, availability in your Region
ComplianceLicensing, regulatory requirements, data handling
CostPrice per token at your expected volume
LatencyDoes a user wait for the answer?
Model complexity and sizeBigger models are more capable, slower, and more expensive; is a smaller one good enough?

The right model is the smallest, cheapest one that meets the requirement, not the best-scoring one on a leaderboard.

Business value and metrics#

MetricWhat it measures
Return on investment (ROI)Value delivered relative to total cost
EfficiencyTime or effort saved per task
Conversion rateShare of users who complete a desired action, such as a purchase
Average revenue per user (ARPU)Revenue divided by active users
Customer lifetime value (CLV)Total revenue expected from a customer over the relationship
AccuracyShare of outputs that are correct
Cross-domain performanceHow well the model performs across different tasks or domains

AWS infrastructure and technologies#

AWS services for building GenAI#

ServiceWhat it isWho it's for
Amazon BedrockServerless API access to foundation models from Amazon and third parties, plus Knowledge Bases, Guardrails, Model Evaluation, Prompt Management, Flows, and customizationDevelopers building GenAI apps without managing infrastructure
Amazon SageMaker AIFull platform to build, train, tune, and deploy your own modelsML teams that need full control
SageMaker JumpStartHub of pre-trained open-source and proprietary models that you deploy or fine-tune on your own SageMaker endpointsTeams wanting a specific open model on infrastructure they control
Amazon QuickAgentic workspace for business users: BI, research, and no-code automation over company dataAnalysts and business teams
KiroAgentic, spec-driven IDEDevelopers writing and maintaining code
Strands AgentsOpen-source SDK for building agents in codeDevelopers building agents
Amazon Bedrock AgentCoreManaged platform for running agents securely in productionTeams deploying agents at scale

Bedrock, JumpStart, and SageMaker AI sit on a control-versus-convenience spectrum:

Amazon BedrockSageMaker JumpStartSageMaker AI (custom)
InfrastructureNone to manageEndpoints in your accountEverything in your account
ModelsCurated catalog through one APIHub of pre-trained modelsAnything you build
PricingPer token or per requestPer instance-hourPer instance-hour
ControlLeastMoreMost
EffortLeastModerateMost

Amazon Nova is Amazon's own family of foundation models on Bedrock, and it's on the in-scope list. Exam questions typically use the original names:

ModelRole
Nova MicroText only; lowest latency and cost
Nova LiteLow-cost multimodal (text, image, video input)
Nova ProBalanced capability and cost
Nova PremierMost capable; useful as a teacher for distillation
Nova Canvas / Nova ReelImage generation / video generation
Nova SonicSpeech-to-speech conversation

Amazon has since introduced the Nova 2 generation (such as Nova 2 Lite and Nova 2 Sonic), plus Nova Act for browser-automation agents and Nova Forge for building custom Nova model variants. Know the roles above; check current model availability before building anything real.

Why build on AWS#

Advantages of AWS GenAI services (2.3.2):

  • Accessibility: many models through one API.
  • Lower barrier to entry: no ML expertise needed to start.
  • Efficiency: managed infrastructure and scaling.
  • Cost-effectiveness: pay per use, plus caching, batch, and distillation to cut costs.
  • Speed to market.
  • Ability to meet business objectives, with built-in evaluation and guardrails.

Benefits of AWS infrastructure (2.3.3):

BenefitWhat it means
SecurityEncryption in transit and at rest, IAM access control, private connectivity with PrivateLink. Bedrock doesn't use your prompts and outputs to train its base models or share them with model providers
ComplianceServices covered by AWS compliance programs, with reports available in AWS Artifact
Shared responsibilityAWS secures the infrastructure; you secure your data, access, and application
SafetyBuilt-in controls such as Bedrock Guardrails

AWS also builds its own ML chips: AWS Trainium for training and AWS Inferentia for inference. Both offer lower cost and better energy efficiency than general-purpose GPUs for supported workloads. They're useful as a distractor-eliminator and for the sustainability questions in Domain 4.

Cost trade-offs#

Trade-off (2.3.4)What to weigh
ResponsivenessFaster responses cost more (Priority tier, bigger instances)
Availability and redundancyCross-Region inference spreads traffic across Regions for throughput and resilience
PerformanceLarger models perform better on hard tasks but cost more per token
Regional coverageNot every model is available in every Region; data residency may limit your choices
Token-based pricingGreat for spiky or low volume; can get expensive at sustained high volume
Provisioned throughputPredictable capacity and cost, but you pay whether you use it or not
Custom modelsTraining costs plus dedicated hosting; only worth it when prompting and RAG aren't enough

Service cheat sheet#

Service or featureOne line
Amazon BedrockServerless foundation models through one API
Bedrock batch inferenceAbout 50% cheaper asynchronous bulk processing
Bedrock prompt cachingReuses a repeated prompt prefix; cheaper and faster
Bedrock Intelligent Prompt RoutingRoutes each request to the cheapest capable model in a family
Bedrock Provisioned ThroughputDedicated model capacity billed hourly
SageMaker AIBuild, train, and deploy your own models
SageMaker JumpStartPre-trained model hub deployed on your SageMaker endpoints
Amazon NovaAmazon's foundation model family on Bedrock
AWS Trainium / AWS InferentiaAWS chips for cost-efficient training / inference

Commonly confused#

If the scenario says…AnswerNot…Because
Find documents with similar meaningEmbeddings and vector searchTokensTokens count text; embeddings encode meaning
Split a 300-page manual before indexingChunkingTokenizationChunking splits documents; tokenization splits text into model units
Generate images from textDiffusion modelTransformer LLMDiffusion models denoise toward an image
Same 3,000-token system prompt on every callPrompt cachingBatch inferenceThe problem is repetition, not timing
Classify 2 million reviews overnightBatch inferenceProvisioned ThroughputOffline and asynchronous; about 50% cheaper
Traffic mixes trivial and hard questionsIntelligent Prompt RoutingA bigger modelRoute easy requests to a cheaper model
Deploy an open-source model on infrastructure you controlSageMaker JumpStartAmazon BedrockBedrock is serverless; JumpStart gives you your own endpoint
Same question, different answer each timeNondeterminismHallucinationConsistency problem, not a truth problem
Business users want AI over company data without codeAmazon QuickKiroKiro is for developers

Practice questions#

Q1 (ordering). Put the stages of the foundation model lifecycle in order.

  • A. Deployment
  • B. Pre-training
  • C. Data selection
  • D. Evaluation
  • E. Fine-tuning
Show answer

C → B → E → D → A.

Select the data, pre-train on it, fine-tune for the task, evaluate, then deploy. Model selection, between data selection and pre-training, and feedback, after deployment, complete the full lifecycle.

Q2. A company's Bedrock-based assistant sends the same 3,000-token system prompt with every request. Costs are high and responses feel slow. What is the most effective change?

  • A. Switch to batch inference
  • B. Enable prompt caching for the system prompt
  • C. Fine-tune the model so it no longer needs the system prompt
  • D. Purchase Provisioned Throughput
Show answer

Answer: B. Prompt caching reuses the repeated prefix. Cached reads are much cheaper and cut time to first token.

  • A is for offline jobs, not an interactive assistant.
  • C adds training and hosting cost and removes flexibility.
  • D buys capacity but doesn't stop reprocessing the same tokens.

Q3. An e-commerce company wants to categorize 2 million product reviews with a foundation model. Results are needed by the next morning, and cost is the main concern. Which option fits best?

  • A. Bedrock on-demand calls from a Lambda function
  • B. Bedrock batch inference
  • C. Bedrock Priority tier
  • D. A SageMaker AI real-time endpoint
Show answer

Answer: B. Batch inference processes large offline jobs asynchronously at about half the on-demand price.

  • A works but costs more.
  • C costs more in exchange for lower latency.
  • D keeps an endpoint running for something that doesn't need real-time responses.

Q4 (matching). Match each concept to its description.

Concept
1. Token
2. Embedding
3. Chunking
4. Diffusion model

Descriptions:

  • A. A numeric vector that captures the meaning of content
  • B. Splitting documents into smaller pieces for retrieval
  • C. The basic unit of text a model reads and generates
  • D. A model that generates images by progressively removing noise
Show answer

1 → C, 2 → A, 3 → B, 4 → D.

Q5 (multiple response). Which TWO are recognized disadvantages of generative AI?

  • A. Hallucinations
  • B. Inability to process natural language
  • C. Nondeterministic outputs
  • D. Requirement to label all input data
  • E. Inability to generate images
Show answer

Answer: A and C.

  • B and E are the opposite of what GenAI does.
  • D confuses GenAI with supervised learning; foundation models are pre-trained on unlabeled data.

Q6. A data science team wants to run a specific open-source LLM on infrastructure they control, with the ability to fine-tune it and choose instance types. Which service fits best?

  • A. Amazon Bedrock
  • B. Amazon SageMaker JumpStart
  • C. Amazon Quick
  • D. Amazon Comprehend
Show answer

Answer: B. JumpStart deploys pre-trained models, including open-source ones, to SageMaker endpoints in your account, with control over instances and fine-tuning.

  • A is serverless, with no infrastructure control.
  • C is a business-user workspace.
  • D is a pre-trained NLP service.

Q7. A CFO asks whether a GenAI customer-support assistant has been worth the investment. Which metric best answers the question?

  • A. BLEU score
  • B. Return on investment (ROI)
  • C. F1 score
  • D. Token throughput
Show answer

Answer: B. The stakeholder wants business value.

  • A and C measure model quality.
  • D is an operational metric.

Q8. Users report that a Bedrock-based assistant gives noticeably different answers when they ask the same factual question twice. The answers are all correct but worded and structured differently, which confuses them. What should the team adjust first?

  • A. Lower the temperature
  • B. Add a knowledge base
  • C. Fine-tune the model
  • D. Increase maximum output tokens
Show answer

Answer: A. This is nondeterminism, not hallucination. Lower temperature makes token selection more deterministic and responses more consistent.

  • B addresses factual grounding, which isn't the problem here.
  • C is expensive and unnecessary.
  • D only allows longer answers.

Key takeaways#

  • Tokens count; embeddings mean. Chunking decides what retrieval can find.
  • Know the lifecycle order: data selection → model selection → pre-training → fine-tuning → evaluation → deployment → feedback.
  • Input and output tokens are priced separately, and output costs more. Longer inputs increase latency.
  • Match the cost lever to the problem:
    • Repeated prompt → prompt caching.
    • Offline bulk work → batch or Flex.
    • Mixed difficulty → Intelligent Prompt Routing.
    • Guaranteed capacity → Provisioned Throughput or Reserved.
  • Hallucination is a truth problem; nondeterminism is a consistency problem. Different fixes.
  • Bedrock → JumpStart → SageMaker AI trades convenience for control.
  • Match the persona to the service. Business users → Quick. Developers writing code → Kiro. Agent builders → Strands and AgentCore.

Next: Domain 3: Applications of Foundation Models.

Sources#

Share:

Related Articles