Fundamentals of Generative AI
What you will learn
In this domain, you learn the concept of generative AI foundation models, the characteristics of Transformers and LLMs, the basics of prompt engineering, and core technologies such as Retrieval-Augmented Generation (RAG) and fine-tuning, along with the essential concepts for working with LLMs: tokens, context windows, inference parameters, and embeddings. It is a frequently tested domain that accounts for 24% of the AIF-C01 exam and is the central theme of modern AI use.
Key points
- Foundation Model - a general-purpose model pre-trained on large-scale data that can be repurposed for a variety of tasks
- Large Language Model (LLM) - a foundation model that handles text. Representative examples include models from OpenAI, Anthropic, and Meta, and Amazon's Nova
- AWS tools for building generative AI - Bedrock (an API for foundation models), SageMaker AI and JumpStart (your own models and pre-trained models), Amazon Quick (for business users), Kiro (coding), Strands Agents (an SDK for agents), and Bedrock AgentCore (a foundation for running agents in production)
- Choosing a generative AI model - compare type, performance requirements, capabilities, constraints, and compliance, as well as cost, latency, and model complexity
- The business value of generative AI - measured with metrics such as ROI (return on investment), efficiency, conversion rate, average revenue per user, and customer lifetime value
- Transformer - an architecture that uses the self-attention mechanism and is the standard structure of today's LLMs
- Prompt engineering - the technique of designing instructions (prompts) that elicit the desired output from an LLM
- Zero-shot / few-shot - techniques that have an LLM perform a task with no examples / a few examples
- RAG (Retrieval-Augmented Generation) - retrieves relevant information from an external knowledge base and adds it to the LLM's prompt to improve the accuracy of answers
- The difference between fine-tuning and pre-training - pre-training learns from scratch on large-scale data, while fine-tuning additionally trains an existing model for a specific use
- Hallucination - the phenomenon in which an LLM plausibly generates content that is not factual. It is suppressed with RAG and verification
- Tokens and context windows - a token is the smallest unit of text an LLM handles, and the context window is the upper limit on how many tokens can be processed at once
- Token-based pricing - cost is determined by the number of input and output tokens, and longer inputs and outputs increase both cost and the time until a response. Keep them down by capping output and narrowing the information you send
- Context engineering - the approach of designing what, and how much, to pass to the model from instructions, search results, conversation history, and tool results
- Basics of agentic AI - tool use, memory management, workflow control, multi-agent collaboration, and MCP, which connects agents to external systems
- Inference parameters - lower temperature and top-p values produce more deterministic, consistent output, while higher values produce more diverse, creative output
- Embeddings - numeric vector representations of the meaning of text. Combined with a vector database, they enable semantic similarity search
- Evaluating generated output - combine task-appropriate automatic metrics (ROUGE for summarization, BLEU for translation, and so on) with human evaluation
Terms and concepts
Foundation Model
A large-scale model pre-trained on a large amount of general-purpose data that can be applied to a variety of tasks through fine-tuning or prompts. Its uses are expanding to LLMs for text, image generation, audio, and multimodal applications. With Bedrock, you can use multiple foundation models via an API.
AWS tools for building generative AI
Amazon Bedrock is a service for using multiple foundation models through an API. Amazon SageMaker AI is where you train and deploy your own models, and SageMaker JumpStart is a catalog of pre-trained models and templates you can use there. Amazon Quick is a service through which business users use AI assistants, research, business automation, and BI (Quick Sight), and Kiro is an agentic coding service that drafts specifications from instructions and creates code, documentation, and tests. Strands Agents is an open-source SDK published by AWS for building AI agents, and Amazon Bedrock AgentCore is a foundation that brings together a runtime, memory, tool connections, and identity management for running the agents you build securely in production. Names and categories are as of October 2026.
→ Amazon Bedrock Glossary / → Amazon Quick in Practice / → Spec-Driven Development with Kiro
Prompt engineering
The technique of crafting the instructions that elicit the desired output from an LLM. Techniques include specifying a role ("you are a doctor"), specifying the output format ("answer in JSON"), adding examples (few-shot), and prompting step-by-step thinking (Chain-of-Thought).
RAG (Retrieval-Augmented Generation)
A technique that searches an external knowledge base (internal documents, databases, etc.) for information relevant to a question, adds that information to the LLM's prompt, and then generates an answer. It supplements information the LLM lacks or that is outdated, and it can suppress hallucinations. It is implemented in combination with Bedrock Knowledge Bases or Kendra.
Fine-tuning and pre-training
Pre-training is the process of training a foundation model from scratch on large-scale data and requires enormous computational resources. Fine-tuning is the process of additionally training a pre-trained model on a small amount of data from a specific domain (law, medicine, etc.), increasing expertise while keeping costs low.
Hallucination
The phenomenon in which an LLM plausibly generates information not in the training data or content that differs from the facts. The cause lies in the model's nature of generating "the characters most likely to come next." Its impact is mitigated by providing evidence with RAG, validating output with guardrails, and human review.
Tokens and context windows
A token is the smallest unit in which an LLM processes text. Text is often split more finely than into words, and a symbol or a fragment of a word can each count as one token. The context window is the upper limit on the number of tokens (input plus output) the model can handle in a single call. To work with long documents that exceed the limit, the standard approach is to split them into chunks and use RAG to retrieve only the relevant parts into the context. Pricing is also calculated per token, making tokens an important unit for cost management.
→ Designing a Generative AI Platform / → Handling Long Documents with RAG
Token-based pricing
With on-demand use of Amazon Bedrock as of October 2026, cost is determined by the number of input (prompt) and output (response) tokens, and each model has separate unit prices for input and output. Sending long documents or conversation history unchanged increases input tokens, and asking for long responses increases output tokens, so both increase cost and the time until a response. You keep them down with measures such as setting a maximum output length, narrowing the information you send to the parts that are needed, and using prompt caching for a preamble that is the same every time. For steady, high-volume use, there is also a separate pricing model called Provisioned Throughput, which reserves processing capacity in advance.
Context engineering
In a single call, a foundation model can refer only to the information placed in its context window. The exam guide 1.1 expects you to be able to explain the role that context engineering plays in foundation model applications. In this course, it refers to designing what, and how much, to pass to the model from system instructions, documents retrieved with RAG, conversation history, and tool execution results. If needed information is missing, answers become inaccurate, and if you pack in unnecessary information, input tokens and cost increase.
Basic concepts of agentic AI
An AI agent repeats a cycle until it reaches its goal: it uses the reasoning of a foundation model to decide the next step, calls tools (APIs, search, calculation, and so on), and receives the results. Memory management, which keeps track of the conversation and past results, includes short-term memory used within a single conversation and long-term memory retained across conversations. For complex processing, multiple agents with different roles are combined (multi-agent). Interaction between agents is controlled with patterns such as one in which a coordinating agent assigns work to other agents, or a workflow pattern that passes processing along in a set order. MCP (Model Context Protocol) is a common agreement (protocol) for connecting agents to external tools and data, so you do not need to build a separate connection for each tool.
Inference parameters (temperature / top-p)
Temperature is a parameter that adjusts the randomness of the output: low values (for example, 0.1) yield more deterministic, consistent output, while higher values yield more diverse, creative output. Top-p (nucleus sampling) is a technique that samples only from the highest-probability token candidates whose cumulative probability reaches a threshold. As a rule of thumb, set these low for fact-based Q&A and higher for brainstorming or creative writing.
Embeddings and vector databases
An embedding is the meaning of a piece of text converted into a numeric vector of hundreds to thousands of dimensions. Sentences with similar meanings sit close together in the vector space, enabling similarity search "by meaning." The retrieval side of RAG works exactly this way: vectorize a large document collection, store it in a vector database, and quickly pull out the entries closest to the vector of the question. On AWS, OpenSearch's vector search is a common home for this.
→ Vector Search with OpenSearch / → RAG with Bedrock Knowledge Bases
Evaluating generative AI models (ROUGE / BLEU)
The quality of generated output is evaluated with metrics suited to the task. ROUGE is used to evaluate summarization and measures the word overlap between a generated summary and a reference summary. BLEU is used to evaluate machine translation and measures agreement with reference translations. There are also BERTScore, which measures closeness of meaning with embeddings rather than word matches, and LLM-as-a-judge, which has a separate LLM score the answers. Because automatic metrics alone cannot fully capture fluency or factual accuracy, combining them with human evaluation is standard practice.