AWSApplications of Foundation Models

Amazon Bedrock Knowledge Bases — Managed RAG on AWS

Amazon Bedrock Knowledge Bases is the managed RAG service on AWS, and the AIF-C01 exam tests when to reach for it instead of building retrieval yourself. This page walks through a representative practice question and the decision rule behind it.

Short answer

The correct answer is C. Create an Amazon Bedrock Knowledge Base over the S3 bucket and call the RetrieveAndGenerate API from the application.

Amazon Bedrock Knowledge Bases is purpose-built for this scenario. You point the service at an Amazon S3 data source, and Bedrock handles the full RAG pipeline: automatic chunking of documents, embedding generation with a model such as Amazon Titan Text Embeddings or Cohere Embed, and storage in a managed vector store (Amazon OpenSearch Serverless by default, or Aurora PostgreSQL with pgvector, Pinecone, Redis Enterprise Cloud, or MongoDB Atlas). At query time, your application calls the RetrieveAndGenerate API with a user question; Bedrock retrieves the top-k relevant chunks, injects them into the prompt for a foundation model like Anthropic Claude, and returns a grounded answer with citations pointing to the exact source passages. When the medical affairs team uploads revised guidelines, you trigger a data source sync and the new content is immediately retrievable — no retraining. The decisive clues in the scenario are source citations required, twice-monthly updates, no vector database experience, and minimal operational overhead. Knowledge Bases collapses what would otherwise be a multi-component RAG stack into a single managed service, which is why AIF-C01 questions with these signals point here rather than to a DIY pipeline or fine-tuning.

The Question

A healthcare company wants a chat assistant that answers clinician questions using 8,000 internal clinical guideline documents stored in Amazon S3. Answers must cite the specific source passage, the content is updated by the medical affairs team twice a month, and the engineering team has no experience running vector databases or embedding pipelines. Which AWS approach best fits the requirement with the least operational overhead?

AFine-tune a foundation model in Amazon Bedrock on the guideline corpus and serve it through provisioned throughput
BBuild a custom RAG pipeline on Amazon SageMaker with a self-managed OpenSearch cluster and LangChain orchestration
CCreate an Amazon Bedrock Knowledge Base over the S3 bucket and call the RetrieveAndGenerate API from the applicationCorrect
DEmbed the guidelines into every prompt sent to Amazon Bedrock using a long-context foundation model

Why C is correct

Amazon Bedrock Knowledge Bases is purpose-built for this scenario. You point the service at an Amazon S3 data source, and Bedrock handles the full RAG pipeline: automatic chunking of documents, embedding generation with a model such as Amazon Titan Text Embeddings or Cohere Embed, and storage in a managed vector store (Amazon OpenSearch Serverless by default, or Aurora PostgreSQL with pgvector, Pinecone, Redis Enterprise Cloud, or MongoDB Atlas). At query time, your application calls the RetrieveAndGenerate API with a user question; Bedrock retrieves the top-k relevant chunks, injects them into the prompt for a foundation model like Anthropic Claude, and returns a grounded answer with citations pointing to the exact source passages. When the medical affairs team uploads revised guidelines, you trigger a data source sync and the new content is immediately retrievable — no retraining. The decisive clues in the scenario are source citations required, twice-monthly updates, no vector database experience, and minimal operational overhead. Knowledge Bases collapses what would otherwise be a multi-component RAG stack into a single managed service, which is why AIF-C01 questions with these signals point here rather than to a DIY pipeline or fine-tuning.

Why the other options are wrong

Option A: Fine-tune a foundation model in Amazon Bedrock on the guideline corpus and serve it through provisioned throughput

Fine-tuning bakes knowledge into model weights and does not produce citations, which violates the sourcing requirement. It also must be re-run every time guidelines change and requires a provisioned throughput commitment, which is the opposite of low operational overhead.

Option B: Build a custom RAG pipeline on Amazon SageMaker with a self-managed OpenSearch cluster and LangChain orchestration

A custom RAG pipeline on SageMaker with self-managed OpenSearch and LangChain works, but it forces the team to operate vector infrastructure, embedding jobs, and orchestration code. The scenario explicitly rules this out by calling out no vector database experience and minimum overhead.

Option D: Embed the guidelines into every prompt sent to Amazon Bedrock using a long-context foundation model

Stuffing 8,000 documents into every prompt exceeds the context window of every current foundation model, explodes per-call token cost, and still does not produce structured citations. Long context is not a substitute for retrieval at this corpus size.

How Amazon Bedrock Knowledge Bases Works

Amazon Bedrock Knowledge Bases is the managed retrieval-augmented generation service inside Amazon Bedrock. Its job is to take your private documents and make a foundation model answer questions over them, with citations, without you running any retrieval infrastructure. The end-to-end flow is straightforward. First, you register a data source. Supported connectors include Amazon S3, Confluence, Salesforce, Microsoft SharePoint, and a built-in web crawler. Second, Bedrock ingests the data: it chunks each document using a configurable strategy (default fixed-size, hierarchical, or semantic chunking), calls an embedding model such as Amazon Titan Text Embeddings v2 or Cohere Embed to vectorize each chunk, and writes the vectors into a vector store. You pick the vector store at setup time — Amazon OpenSearch Serverless is the default managed option, and Aurora PostgreSQL with pgvector, Pinecone, Redis Enterprise Cloud, and MongoDB Atlas are also supported. Third, your application queries the knowledge base through one of two APIs. Retrieve returns the top-k matching chunks and lets you plug them into your own prompt; RetrieveAndGenerate does the full RAG loop — retrieves chunks, builds a grounded prompt, invokes a foundation model (Anthropic Claude, Amazon Nova, Meta Llama, and others), and returns a cited answer in one call. When your source data changes, you trigger a data source sync and the index updates. You reach for Knowledge Bases when you want managed RAG with citations, your documents live in a supported connector, and you do not want to own chunking, embedding, or vector-store operations. You build RAG yourself only when you need a data source that is not supported, a custom retrieval strategy like hybrid BM25 plus vector with re-ranking, or tight control over each pipeline stage.

Ready to see how you'd score?

Take the free practice quiz and find out which AWS Certified AI Practitioner domains you need to focus on. No signup required.

Practice 5 similar questions

Same cert, same or adjacent domain. Use these after reviewing the explanation.

Related AWS Certified AI Practitioner Practice Questions