Domain 2 of 5 · Chapter 1 of 3

Generative AI Concepts

The vocabulary of generative AI: tokens to context window

You arrive knowing generative AI produces new content; this section gives you the precise terms behind it. Task Statement 2.1 is almost entirely a vocabulary test: the AIF-C01 stem hands you a one-line definition and asks for the term, or names a term and asks what it does. The overview lists the terms; this section nails down each definition precisely so you can recognize it under any phrasing.

Tokens

A generative model never operates on raw characters. AWS defines a token as "a sequence of characters that a model can interpret or predict as a single unit of meaning"[1], and a token is not the same as a word. For text models a token can be a whole word, a sub-word fragment with grammatical meaning (such as "-ed"), a punctuation mark ("?"), or a common phrase ("a lot"). The practical consequence is the one the exam tests: pricing and limits are measured in tokens, not words or characters, and a rough English rule of thumb is that a token is about three-quarters of a word. Both the text you send (the prompt) and the text the model produces (the completion) are counted in tokens.

Embeddings and vectors

An embedding is the numeric form of meaning. Foundation models can convert input into embeddings[1], and an embedding is a vector, a fixed-length list of numbers, that represents the semantic meaning of text, an image, or other data so that items with similar meaning sit close together in vector space[2]. "Vector" is just the mathematical name for that ordered list of numbers; "embedding" is what we call a vector when it encodes meaning. The whole point is comparison by meaning rather than by exact words: "car" and "automobile" land near each other even though they share no letters, which is why embeddings power semantic search and Retrieval Augmented Generation (RAG). RAG retrieves your own most relevant passages and adds them to the prompt at query time, the mechanism detailed in How generative AI differs from traditional ML below. On AWS, models such as Amazon Titan Text Embeddings convert text into these numeric vectors[3], and the vectors are stored in a vector database that indexes them for fast similarity search[4].

Chunking

Chunking is the preprocessing step of splitting a large document into smaller passages before embedding each piece. You chunk for two reasons: a single embedding represents one bounded passage well but a whole book poorly, and the model's context window cannot hold an entire corpus at once. In a RAG pipeline you chunk the source documents, embed each chunk, store the vectors, then at query time retrieve only the few most relevant chunks, so chunking is what makes large knowledge bases searchable and feedable to a model.

Prompt, completion, and the context window

The input you give the model is the prompt; the text it generates back is the completion (or response). The context window is the maximum number of tokens the model can take into account at once for a single request[5], and the critical exam fact is that the prompt and the completion share the same finite budget. Send a very long prompt and you leave less room for the answer; ask for a very long answer and you constrain how much input fits. Content beyond the window is truncated, which is exactly why a long document is chunked and retrieved rather than pasted in whole. A separate inference parameter caps the completion length (maximum tokens), and that cap directly bounds both latency and cost without improving answer quality. The figure below traces this path: the prompt's tokens enter the model, the model runs inference, and it returns the completion's tokens, with the prompt and completion drawing from one shared context window.

Quick-reference definitions

Term One-line definition (exam form)
Token The smallest unit of meaning a model reads or predicts; ~¾ of a word, billed per token
Embedding A numeric vector that encodes the meaning of text/image so similar items are near each other
Vector The ordered list of numbers itself (an embedding is a vector that encodes meaning)
Chunking Splitting a large document into smaller passages before embedding them
Prompt The input text sent to the model
Completion The text the model generates in response
Context window Max tokens the model can attend to per request; prompt + completion share this budget
Promptinput tokensFoundation modelruns inferenceCompletionoutput tokensContext windowone shared token budget for prompt + completion
Prompt to model to completion: input tokens enter the model, inference returns output tokens, and the prompt and completion share one context-window budget.

Foundation models, LLMs, transformers, multimodal & diffusion

Beyond the data-handling terms, Task 2.1 expects you to identify the model concepts: what a foundation model is, what makes an LLM, the architecture underneath (transformers), and the families that extend generative AI past text (multimodal and diffusion).

Foundation models (FMs)

AWS defines foundation models as large deep-learning models pre-trained on vast quantities of broad, unlabeled data, which can then be adapted to a wide range of downstream tasks[6]. Two words carry the meaning. Broad: an FM is trained on a general corpus, not built for one narrow task, so a single model can summarize, translate, classify, draft, and chat. Adapted: one expensive pre-training run produces a reusable base that organizations customize cheaply (through prompting, RAG, or fine-tuning) instead of training a model from scratch. This is the defining economics of generative AI on AWS, and it is why an AI practitioner typically selects and adapts an existing FM (for example through Amazon Bedrock, which offers a choice of high-performing FMs from leading providers via a single API[7]) rather than building one.

Large language models (LLMs)

A large language model is a foundation model trained on enormous amounts of text so it can understand and generate natural language and other content[8]. In other words, an LLM is the text-and-language flavor of a foundation model. Every LLM is an FM; not every FM is an LLM (an image-generation FM is a foundation model but not a language model). On the exam, "foundation model" is the umbrella term and "LLM" is the text-specialized subset; recognizing that nesting disarms a common distractor. The figure below shows that nesting: the foundation-model box contains the LLM, multimodal, and diffusion families as members, with the transformer named as the architecture inside the LLM.

Transformers and self-attention

Modern LLMs are built on the transformer, a neural-network architecture whose core innovation is the self-attention mechanism[9]. Conceptually, self-attention lets the model weigh how much every other token in the context should influence each token, capturing long-range relationships across a whole passage in parallel rather than reading strictly left to right. That parallelism is why transformers scaled to today's LLMs where earlier sequential architectures (which processed one token at a time) plateaued. For AIF-C01 you do not need the mathematics; you need to recognize that "transformer" is the architecture behind LLMs and "self-attention" is the mechanism that lets it consider the full context at once.

Multimodal models

A multimodal model accepts or produces more than one type of data, for example taking an image plus a text prompt and returning a text answer, or generating an image from a text description. A single multimodal FM can therefore reason across text, images, audio, or video instead of being limited to one. AWS's own Amazon Nova family includes multimodal understanding models that accept text, image, and video input[10], illustrating the concept on AWS. The exam cue is simple: when a use case mixes input or output types ("analyze this image and describe it," "caption a video"), the answer is a multimodal model.

Diffusion models

Diffusion models are the family behind most high-quality image generation. They are trained to reverse a step-by-step noising process: starting from random noise, the model progressively denoises toward a coherent image, conditioned on a text prompt. The exam-relevant distinction is by technique and modality (LLMs (transformers) generate text, while diffusion models generate images) and many production systems combine both. When a stem describes generating or editing images from a prompt, "diffusion model" is the term being tested.

Foundation model (FM)broad, pre-trained base; adapt rather than buildLarge language modelgenerates textTransformerself-attention architectureMultimodal modelmore than one data typeDiffusion modelgenerates images
The foundation model is the umbrella over the LLM (built on the transformer), the multimodal model, and the diffusion model; LLMs generate text, diffusion generates images.

How generative AI differs from traditional ML

The single most-tested conceptual contrast in Domain 2 is generative AI versus traditional (discriminative) machine learning. Getting this distinction crisp answers a whole cluster of questions.

Discriminative vs generative

Traditional, discriminative ML learns a boundary that maps an input to a fixed output, a class label or a number. "Is this email spam or not?", "What is this house worth?", "What is the fraud risk score?" each return one definite answer drawn from a known set. Generative AI instead learns the underlying patterns of its training data well enough to create new content (text, images, audio, code) in response to a prompt[11]. A discriminative classifier answers which category / what value is this?; a generative model answers produce something new that looks like this. That difference also explains determinism: a discriminative classifier returns the same label for the same input, whereas generative output is non-deterministic by default and can vary (and can hallucinate) from one call to the next.

Pre-train once, then adapt

Where traditional ML usually trains a task-specific model on a labeled dataset you assemble, generative AI flips the cost structure: you reuse the pre-trained-once foundation model[6] and adapt it cheaply, the broad-base-then-adapt economics from Foundation models (FMs) above. The payoff for this contrast is that a practitioner can build a useful application with no large labeled dataset and no ML team. The lifecycle the exam names (data selection, model selection, pre-training, fine-tuning, evaluation, deployment, and feedback) is this same "expensive broad pre-training, then targeted adaptation" pattern.

Why embeddings power semantic search and RAG

Because embeddings place semantically similar items near each other in vector space, you can compare meaning instead of matching keywords. Convert your documents and a user's question into embeddings, and the closest vectors are the most relevant passages, that is semantic search, and it works even when the query and the document share no exact words. Retrieval Augmented Generation builds on this: at query time it retrieves the most relevant chunks from your own data and injects them into the prompt so the model answers from current, private context instead of only its frozen training knowledge[12], which reduces hallucination. The diagram below models AWS's own canonical RAG flow. On AWS the vectors live in a vector database or vector engine such as Amazon OpenSearch Service[13], and Amazon Bedrock Knowledge Bases provides the end-to-end managed RAG pipeline[14] (ingest, chunk, embed, retrieve) so you do not build it yourself. Embeddings are the connective tissue: they are the conceptual term in 2.1 and the mechanism behind the RAG and vector-store questions in Domain 3.

At a glance

Decision axis Traditional (discriminative) ML Generative AI
Output A label, class, or number (one definite answer) New content: text, image, audio, or code
Core question Which category / what value is this? Produce something new that looks like this
Training data Often task-specific, frequently labeled Vast, broad corpus for pre-training; mostly unlabeled
Determinism Deterministic for a given input Non-deterministic by default; can hallucinate
How you build it Train a model on your dataset Adapt a pre-trained foundation model (prompt, RAG, fine-tune)
Ingest timeChunk documentsEmbed each chunkVector databasestores the vectorsQuery timeEmbed questionRetrieve relevantchunksnearest vectorsInject into promptModel answers
Retrieval Augmented Generation: at ingest, chunk documents, embed the chunks, store the vectors; at query, embed the question, retrieve the nearest chunks, inject into the prompt.

Exam-pattern recognition (AIF-C01 Task 2.1)

Task 2.1 questions are short term-definition items, not long scenarios. The skill is matching a definition to its term (or a term to its job) and rejecting near-miss distractors. Train on the mappings below.

Definition-to-term cues

Stem cue (what the question describes) Correct term
"Smallest unit of text a model reads/predicts; billing is measured in these" Token
"Numeric vector that captures meaning so similar items are close together" Embedding
"Splitting a long document into smaller passages before embedding" Chunking
"Maximum number of tokens the model can consider in one request" Context window
"Large model pre-trained on broad data, adaptable to many tasks" Foundation model (FM)
"A text-focused foundation model that understands/generates language" Large language model (LLM)
"Architecture using self-attention that underpins modern LLMs" Transformer
"Model that handles more than one data type (text + image + …)" Multimodal model
"Model that generates images by reversing a noising process" Diffusion model
"Comparing by meaning rather than keywords" Semantic search (via embeddings)

Why the right answer is right

  • Token vs word. If an option says cost or limits are measured "per word" or "per character," it is wrong. Bedrock and FMs count tokens[1], and a token is often a sub-word fragment.
  • Embedding vs raw text. Semantic search and RAG compare embeddings (vectors), not the original strings; an answer that says it matches keywords is describing lexical search, not semantic search.
  • FM vs LLM. "Foundation model" is the umbrella; "LLM" is the text subset. If a question describes a general model adaptable across modalities and tasks, choose foundation model; if it specifically says language/text, LLM is the tighter fit.
  • Transformer vs the model itself. The transformer is the architecture (with self-attention) underneath LLMs. Do not confuse it with a specific named model.
  • Multimodal vs diffusion. Multimodal = more than one data type in/out; diffusion = the image-generation technique. A multimodal model may use diffusion for its image part, but the terms answer different questions.
  • Context window is shared. The prompt and the completion draw from the same token budget; an option implying the window only limits input (or only output) is wrong.
  • Generative vs discriminative. If the desired output is a fixed label, class, or number, the task is traditional/discriminative ML, not generative AI. Even when an LLM could be forced to do it, a classic classifier is the better-fit answer.

Disambiguation traps

  • "Bigger context window / bigger model is always better." Wrong: a larger window and a larger model raise cost and latency and can dilute focus; retrieving only relevant chunks via RAG usually beats stuffing everything in.
  • "Use a generative model for a tabular fraud score." Wrong: structured classification/regression is cheaper, faster, and more interpretable with a classic supervised model.
  • "Generative output is deterministic." Wrong by default: the same prompt can yield different completions; you reduce (but never fully guarantee) variability by lowering inference randomness.
  • "Vectors and embeddings are different things." A vector is the list of numbers; an embedding is a vector that encodes meaning. On the exam they refer to the same artifact in a RAG/search context.

When two terms both seem to fit, pick the one whose defining property matches the stem exactly. The unit-of-meaning detail selects token, the encodes-meaning detail selects embedding, and the more-than-one-data-type detail selects multimodal. That property-matching habit decides nearly every Task 2.1 item.

Traditional (discriminative) ML vs. Generative AI

Decision axisTraditional MLGenerative AI
OutputA label, class, or numeric prediction (one definite answer)New content: text, image, audio, or code (open-ended)
Core questionWhich category / what value is this?Produce something new that looks like this
Training dataOften task-specific, frequently labeledVast, broad corpus for pre-training; mostly unlabeled
Typical taskClassification, regression, clustering, fraud scoringSummarization, chat, translation, image/code generation
DeterminismDeterministic for a given inputNon-deterministic by default; can hallucinate
How you build itTrain a model on your datasetAdapt a pre-trained foundation model (prompt, RAG, fine-tune)

Sharp facts the exam loves — give these one last read before exam day.

Cheat sheet

Sharp facts the exam loves — scan these before test day.

A token is a model's unit of meaning, not a word

A token is a sequence of characters a model interprets or predicts as a single unit of meaning, which is not the same as a word: it can be a whole word, a sub-word fragment with grammatical meaning (such as "-ed"), a punctuation mark (such as "?"), or a common phrase (such as "a lot"). Both the prompt you send in and the completion the model generates back are counted in tokens, so token count drives length and cost.

Trap Assuming one token always equals one word. A token is usually a fragment, so token counts run higher than word counts.

3 questions test this
Foundation-model cost and limits are measured in tokens

Foundation-model spend and length limits are billed and constrained in tokens, not words or characters: Amazon Bedrock on-demand pricing charges separately for input and output tokens, so model choice plus prompt and response length drive the bill. A token is typically a fragment of a word rather than a full word, so token totals exceed word totals, but the exact ratio varies by model and tokenizer.

Trap Treating cost or context limits as measured per word or per character. They are counted in tokens, which don't map one-to-one to words.

5 questions test this
An embedding is a numeric vector that encodes meaning

An embedding transforms input into a vector of numerical values so different objects can be compared by similarity through a shared numerical representation, placing items with similar meaning close together in that vector space. A vector is just the ordered list of numbers; calling it an embedding signals that the numbers encode semantic meaning. Because comparison is by meaning rather than exact characters, "car" and "automobile" land near each other.

Trap Treating an embedding as a stored copy of the original text or characters rather than a numeric encoding of its meaning.

6 questions test this

Embeddings place semantically similar items near each other in vector space, so you can retrieve by meaning instead of matching exact words: convert documents and the user query into embeddings, then find the nearest vectors to surface the most relevant passages. This works even when the query and a document share no literal words, which keyword (lexical) search cannot do.

Trap Calling keyword matching semantic search. Matching shared words is lexical search; semantic search compares embedding meaning.

5 questions test this
Chunking splits documents into passages before embedding

Chunking is the preprocessing step that splits a large document into smaller passages, each of which is embedded and written to the vector index for retrieval. You chunk because one embedding represents a single bounded passage well but a whole book poorly, and because the model's context window can't hold an entire corpus at once. Chunking is what makes large knowledge bases searchable and feedable to a model.

Trap Embedding a whole long document as one vector instead of chunking it, since a single embedding represents a bounded passage well but a full document poorly.

Prompt is the input, completion is the output

The prompt is the input you provide to guide the model; inference is the model generating the completion (response) from that prompt. Both the prompt and the completion are counted in tokens, and each request stands alone. The model has no memory of prior turns unless you include them in the prompt.

Trap Assuming the model remembers earlier turns on its own, when each request is independent unless you include prior context in the prompt.

The context window is a shared input-plus-output token budget

The context window is the maximum number of tokens a model can consider at once for a single request, and the prompt and the completion share that one finite budget. A very long prompt leaves less room for the answer, and a long requested answer constrains how much input fits. Content beyond the window is dropped, which is why long documents are chunked and retrieved rather than pasted whole.

Trap Assuming the context window caps only the input. It bounds prompt and completion together, so a long answer eats into room for context.

5 questions test this
A foundation model is a broad, reusable base you adapt

A foundation model (FM) has a large number of parameters and is pre-trained on a massive amount of broad, mostly unlabeled data, producing a general-purpose base that can generate text or images and convert input into embeddings. One expensive pre-training run yields a reusable model that organizations customize cheaply through prompting, RAG, or fine-tuning instead of training from scratch. A practitioner typically selects and adapts an existing FM rather than building one.

Trap Reaching for from-scratch training to specialize a model when prompting, RAG, or fine-tuning an existing FM is the intended, far cheaper path.

6 questions test this
Every LLM is a foundation model, but not vice versa

A large language model (LLM) is a foundation model pre-trained on vast amounts of text so it can understand and generate natural language, the text-and-language flavor of an FM. Every LLM is a foundation model, but not every foundation model is an LLM: an image-generation FM is a foundation model that is not a language model. "Foundation model" is the umbrella term; "LLM" is the text-specialized subset.

Trap Treating "foundation model" and "LLM" as synonyms. Image and other non-text FMs are foundation models but not LLMs.

Transformers are the architecture behind modern LLMs

Modern LLMs are built on the transformer, a neural-network architecture of encoders and decoders whose core innovation is the self-attention mechanism. The transformer is an architecture, not a specific named model; for AIF-C01 you only need to recognize that it is what underpins today's LLMs.

Self-attention weighs the whole context in parallel

Self-attention lets the model weigh how much every other token in the context should influence each token, capturing long-range relationships across a whole passage in parallel rather than strictly left to right. That parallelism is why transformers scaled to today's LLMs, where earlier architectures that processed one token at a time plateaued.

Trap Picturing self-attention as reading strictly left to right one token at a time, when it weighs every token against every other in parallel.

A multimodal model handles more than one data type

A multimodal model accepts or produces more than one type of data (text, images, audio, or video) for example taking an image plus a text prompt and returning a text answer, or generating an image from a text description. A single multimodal FM can reason across modalities for richer context. The exam cue is a use case that mixes input or output types.

14 questions test this
Diffusion models generate images by reversing added noise

Diffusion models are the family behind most high-quality image generation. Forward diffusion progressively adds Gaussian noise to an image until only random noise remains; the model learns to reverse that process, iteratively denoising from random noise toward a coherent image, most commonly conditioned on a text prompt. LLMs (transformers) generate text while diffusion models generate images, and production systems often combine both.

Trap Assuming a transformer LLM produces the images. Text comes from the LLM, but the image itself is generated by a diffusion model.

10 questions test this
Generative AI creates new content; discriminative ML predicts a label

Traditional, discriminative ML classifies data points, mapping an input to a fixed output such as a class label or a number (spam vs. not-spam, a price, a fraud score). Generative AI instead learns the patterns of its training data well enough to create new content (text, images, audio, video, code) in response to a prompt. A discriminative model answers "which category or value is this?"; a generative model answers "produce something new that looks like this."

Trap Picking a discriminative, label-predicting model for a task that requires creating new content, since classification answers "which category?" rather than "produce something new."

7 questions test this
Generative output is non-deterministic by default

A discriminative classifier returns the same definite label for the same input, but generative output is stochastic by default: at each step the model samples the next token from a probability distribution, so the same prompt can yield different completions and the model can hallucinate. Lowering the temperature steepens that distribution toward higher-probability tokens for more deterministic responses (temperature 0 is greedy decoding), but you reduce variability without ever fully guaranteeing determinism.

Trap Expecting identical output every call like a classifier. Generation samples from a distribution, so completions vary unless you constrain randomness.

6 questions test this
OpenSearch is AWS's recommended Bedrock vector store, not the only one

To store embeddings and query them by similarity (nearest-neighbor / semantic search), Amazon OpenSearch Service is AWS's recommended vector database for Amazon Bedrock, and Bedrock Knowledge Bases can quick-create an OpenSearch Serverless collection as the default fully managed store. It is not the sole option, though: Bedrock Knowledge Bases also supports Aurora PostgreSQL (pgvector), Neptune Analytics, Amazon S3 Vectors, and third-party stores like Pinecone, Redis, and MongoDB Atlas.

Trap Assuming OpenSearch is the only AWS vector store for Bedrock. It is the recommended default, but Aurora pgvector, Neptune, and S3 Vectors also qualify.

4 questions test this
Titan Multimodal Embeddings put text and images in one vector space

Amazon Titan Multimodal Embeddings translates text, an image, or a combination of both into an embedding that carries the semantic meaning of each in the same shared vector space, enabling search and recommendation by comparing meaning rather than matching words. It is the model to pick for visual product search where users query by text, by image, or by both.

Trap Reaching for a text-only embedding model for visual search, when only a multimodal embedding model places images and text in one shared vector space.

6 questions test this

Also tested in

References

  1. Key definitions for Amazon Bedrock (tokens, embeddings)
  2. What is embeddings in machine learning?
  3. Amazon Titan Text Embeddings models
  4. What is a vector database?
  5. Inference parameters for foundation models (context window)
  6. What are foundation models?
  7. What is Amazon Bedrock?
  8. What is a large language model (LLM)?
  9. What are transformers in artificial intelligence?
  10. What is Amazon Nova?
  11. What is generative AI?
  12. What is Retrieval Augmented Generation (RAG)?
  13. Vector search for Amazon OpenSearch Serverless
  14. Amazon Bedrock Knowledge Bases