Based on the AIF-C01 exam guideReport an error
In Week 3 we learned the principles of generative AI and the concepts of foundation models (FMs), prompt engineering, and RAG. This week we move to "how do you actually use them on AWS." This week ties directly to Domain 3, "Applications of Foundation Models" (28%), the heaviest domain, and a large share of exam questions ask "which AWS AI service fits this scenario?" At the center of that is Amazon Bedrock.
Bedrock's core value fits in one sentence: "Use large foundation models through API calls alone, without buying GPUs or hosting models yourself." It is serverless, so no infrastructure management is needed at all.
Bedrock is an "FM marketplace" that gathers models from several providers in one place.
| Provider | Representative models | Strength |
|---|---|---|
| Anthropic | Claude | Reasoning, long context, conversation |
| Amazon | Titan, Nova | Text, image, and embeddings; cost-efficient |
| Meta | Llama | Open-weights family, customizable |
| Mistral AI | Mistral, Mixtral | Lightweight and fast |
| Cohere | Command, Embed | Embeddings and search |
| Stability AI | Stable Diffusion | Image generation |
💡 Related theory: Bedrock is the generative AI version of "Infrastructure as API." Traditionally, running a huge model required thousands of GPUs and an operations team. Bedrock abstracts all of that away, so a developer only has to think about "which model do I send which prompt to." On the exam, when a scenario says "I want to pick from several FMs and use them without managing infrastructure," Bedrock is the answer.
Two common misconceptions.
The criterion for picking one model among many is not a simple "performance ranking." The AIF exam asks about trade-offs.
The exam guide adds multilingual support, model size and complexity, whether customization is possible, regulatory compliance, and prompt caching support as selection criteria. To pick candidates on evidence rather than intuition, use Amazon Bedrock Model Evaluation.
| Evaluation method | Who scores | Fits when |
|---|---|---|
| Automatic (programmatic) evaluation | Computes predefined metrics | You want a quick comparison using a built-in dataset or your own prompt dataset |
| Human evaluation | Your employees or domain experts | The quality needs human judgment, such as tone or brand fit |
| Judge model evaluation (LLM-as-a-judge) | Another LLM assigns scores and reasons | You want judgments close to human evaluation, quickly and at scale |
| RAG evaluation | LLM-based metrics | You want to check whether the knowledge base finds relevant content and answers well |
As a hypothetical example, a customer support team first handled every inquiry with the top-performing model, and its costs exploded. On analysis, 80% of the inquiries were simple FAQs. Once they routed those to a cheap lightweight model and sent only the complex inquiries to the high-performance model, costs fell 60% while quality held. The key lesson is that "the most expensive model is not the best."
A foundation model knows only general knowledge up to the time it was trained. It does not know "our company's internal policies" or "the latest product manual." RAG (Retrieval-Augmented Generation) solves this.
The RAG flow looks like this.
User question → Search the company document DB for related content → Attach the search results to the prompt → The FM answers based on that evidence
Bedrock has a Knowledge Bases feature that automates this process. When we upload documents to S3, Bedrock splits them into small pieces on its own (chunking), converts them into embeddings, and stores them in a vector database. When a user asks a question, it finds the pieces with similar meaning and passes them to the model along with the question.
The work is split across two points in time.
| When | What happens | When it is redone |
|---|---|---|
| In advance (ingestion) | Read documents → split into chunks → embed → store in the vector store | Re-sync whenever the documents change |
| At question time (retrieval and generation) | Embed the question → search for nearby chunks → attach them to the prompt → generate the answer | On every request |
💡 Related theory: RAG is often compared with fine-tuning. Fine-tuning trains the model further to change its "ability/tone," while RAG leaves the model as it is and brings in "the latest knowledge/facts" from outside. RAG is advantageous for frequently changing internal data, when sources must be made explicit, and when you want to reduce hallucination. On the exam, if you see "I want it to answer with the latest information but retraining the model every time is a burden," the answer is RAG/Knowledge Bases.
Putting generative AI into a real service brings risks: profanity, violent content, mentions of competitors, exposure of personal information, and drifting off to unrelated topics. Amazon Bedrock Guardrails is a safety mechanism that filters these inputs and outputs.
What Guardrails guards against:
| Protection area | What it does |
|---|---|
| Harmful content filter | Blocks hate, insults, sexual content, violence, misconduct, and prompt attacks, with a strength level per category |
| Denied topics | Set the model not to answer specific topics (for example, medical advice or investment recommendations) |
| Sensitive information (PII) | Masks or blocks personal information such as national ID numbers and emails; custom patterns can be added with regular expressions |
| Word filter | Blocks banned words, profanity, and competitor names |
| Contextual grounding check (hallucination detection) | Filters out answers that stray from the supplied source documents or are irrelevant to the question |
| Automated Reasoning check | Verifies an answer against logical rules you have defined |
ApplyGuardrail API, you can also apply just the guardrail, separately, without calling a model.A basic FM only "generates text" and cannot take real actions (looking up an order, changing a reservation). Amazon Bedrock Agents lets the model reason across multiple steps while calling external APIs (Lambda and others) or a Knowledge Base to complete an actual task.
For example, given the request "Change my flight to tomorrow," an Agent (1) calls the user's reservation lookup API → (2) checks whether a change is possible → (3) calls the change API → (4) reports the result in natural language. It plans and executes this kind of multi-step task by itself.
An Agent is a structure that combines "reasoning + tool use." The model judges "what should I do now," picks and calls the tool (API) it needs, looks at the result, and decides the next action. If Knowledge Bases is "reading (searching)," Agents goes as far as "acting (executing)." On the exam, if "the model must go beyond a simple answer and perform real work across multiple steps," the answer is Agents.
Be aware that the names are changing.
| Feature | One word | Problem it solves | What it cannot solve |
|---|---|---|---|
| Knowledge Bases | Read | Internal and up-to-date knowledge the model lacks | Real actions such as changing an order |
| Agents | Act | Carrying out work that spans several steps | Blocking harmful output |
| Guardrails | Block | Harmful, sensitive, or off-topic inputs and outputs | Supplying knowledge |
| Model customization | Reshape | Building tone and specialized-task performance into the model | Reflecting facts that change daily |
| Prompt Management | Manage | Prompt reuse, versioning, and comparing variants | The model's lack of knowledge |
| Model evaluation | Measure | Comparing which model or configuration is better | Improving quality itself |
It is common to use three of them together. For a travel agency chatbot, the refund policy is read through Knowledge Bases, an agent executes reservation changes through APIs, and Guardrails is applied across the whole conversation.
Customization is the way to change the model itself within Bedrock.
| Method | Billing basis | Fits when |
|---|---|---|
| On-demand | Input tokens + output tokens | The default. Traffic is uneven, or you are just starting |
| Batch inference | Upload multiple prompts to S3 and process them asynchronously in bulk | Large jobs that need no immediate answer (such as nightly summaries) |
| Provisioned Throughput | Model units (MU) × hours; the longer the commitment (none, 1 month, 6 months), the bigger the discount | You have steady, heavy traffic and need guaranteed throughput |
| Prompt caching | Tokens read from the cache are billed at a lower rate | Long documents or instructions repeat in every request |
| Model customization | Tokens processed for training + a monthly storage fee for the custom model | You do fine-tuning or distillation |
| Clue in the question | Answer | Eliminated option and why |
|---|---|---|
| "Several FMs through a single API without managing infrastructure" | Amazon Bedrock | Install on EC2 yourself: you take on the infrastructure |
| "Answer from internal documents but avoid retraining" | Knowledge Bases (RAG) | Fine-tuning: retrain every time the documents change |
| "The answer must show its sources" | Knowledge Bases | Guardrails: it only filters, and does not supply evidence |
| "Block profanity, competitor names, and personal information consistently across all models" | Guardrails | Prompt instruction: it has no enforcement power |
| "Filter out content not found in the source documents" | Guardrails contextual grounding check | Adjusting temperature: it does no comparison against sources |
| "Look up an order, then also change the shipping address" | Agents | Knowledge Bases: it only reads |
| "Quality at the level of a large model, but cheaper and faster" | Distillation | Provisioned Throughput: it guarantees throughput and does not shrink the model |
| "Summarize 100,000 documents overnight, no immediate answer needed" | Batch inference | Provisioned Throughput: it buys always-on capacity |
| "Choose, with evidence, which of two models fits our work" | Model evaluation | Picking the bigger model by gut feeling |
Tomorrow we look at Amazon SageMaker, the partner of Bedrock and the service where you "train and deploy your own ML models," and learn to tell when to use Bedrock and when to use SageMaker.
Click a choice to reveal the answer and explanation.
Question 1
A startup wants to call foundation models from multiple companies (Claude, Llama, Titan, etc.) through a single API without buying GPUs or hosting directly. What is the most appropriate service?
Question 2
You want a chatbot to answer with latest information based on internal company documents, but you want to avoid the cost of retraining the model every time. What is the most appropriate approach?
Question 3
You want to consistently filter inputs and outputs of a generative AI chatbot to prevent profanity, competitor mentions, and personal info exposure. Which Bedrock feature should you use?
Question 4
You want the model to autonomously perform multi-step tasks in response to requests like "Check my order status and change shipping address if possible," calling external APIs to complete actual work. What is the appropriate feature?
Question 5
When choosing a model in Bedrock, which criterion is most distant from consideration?