AIF-C01 STUDY GUIDE

A foundation model can write a convincing answer, but it cannot automatically know your latest policies, internal manuals, or private business data. Retrieval-Augmented Generation gives it relevant source material at the moment it answers.

CloudExamPro · AWS certification prep · Reviewed October 2026
Short answer

Retrieval-Augmented Generation (RAG) retrieves relevant passages from external data and adds them to a foundation model’s prompt before generation. The model can then produce an answer grounded in those passages instead of relying only on information learned during training.

A foundation model knows a great deal about the world, but it does not automatically know your company’s travel policy, last week’s pricing change, or the repair manual for a specific pump model. It also cannot see information created after its training unless an application supplies that information. Ask it anyway, and it may answer fluently but incorrectly.

Retrieval-Augmented Generation (RAG) addresses this limitation by letting the model look things up before it answers. Rather than relying only on what it learned during training, the application retrieves relevant passages from your data and includes them in the prompt. The model then generates an answer grounded in that material.

Think of the difference between a student taking a closed-book exam and one taking an open-book exam. RAG gives the foundation model access to an approved reference library at question time. We will follow one example throughout: a municipal water utility that wants field technicians to ask questions about hundreds of equipment manuals and safety procedures from a tablet.

The two phases of RAG

Most document-based RAG systems have two phases that happen at different times:

  1. Ingestion (prepared ahead of time): collect and process documents, split them into chunks, create embeddings, and store them in a searchable index.
  2. Retrieval and generation (at question time): search for the most relevant chunks, add them to the prompt, and ask the foundation model to generate an answer.
INGESTION — prepared ahead of time
Documents → Parse → Chunk → Embed → Store in vector index

QUESTION TIME — for each user question
Question → Embed → Search index → Retrieve relevant chunks
         → Build prompt (instructions + chunks + question)
         → Foundation model → Grounded answer

Phase 1: Ingestion

Step 1: Collect and parse the documents

The utility’s manuals arrive as PDFs, Word files, scanned pages, and web pages. Before the system can search them, it must extract usable content. Clean text from a well-structured document is straightforward. Scanned pages need optical character recognition (OCR), while tables, diagrams, and multi-column layouts can be difficult to interpret correctly.

Poor parsing can quietly damage every later step. If a table is extracted in the wrong reading order, the retrieval system may return misleading fragments even when the original manual is accurate. Amazon Textract is one AWS service that can extract text, forms, and tables from documents, including scanned documents.

Step 2: Chunk the content

A 300-page manual is not usually stored as one giant searchable passage. Instead, the text is divided into chunks—smaller passages that can be retrieved individually and supplied to the model as context.

Chunk sizeAdvantageRisk
Too smallCan produce precise matches for a narrow fact.May lose surrounding context. “Replace it every 90 days” is unclear if the chunk does not identify what “it” means.
Too largeKeeps more of the surrounding explanation together.May include irrelevant material, reduce retrieval precision, and consume more of the model’s context window.

Common chunking approaches include:

  • Fixed-size chunking: splits text by a target token count. Neighboring chunks may overlap so that a sentence or idea is not cut off at a boundary.
  • Structure-aware chunking: uses headings, sections, paragraphs, or document structure to keep related content together.
  • Hierarchical chunking: retrieves a small child passage and can return its larger parent section to restore context.
  • Semantic chunking: uses changes in meaning to determine where one chunk should end and another should begin.

There is no universally best chunk size or strategy. Manuals with clear headings may benefit from structure-aware chunking, while other collections need a different approach. Test the strategy with real questions and inspect the passages that are retrieved.

Step 3: Create embeddings

Each chunk is passed through an embedding model, which converts the text into a vector—a list of numbers that represents aspects of its meaning. Chunks with similar meanings can have vectors that are close to one another in the embedding space. This makes semantic search possible even when the user and the document use different wording.

For example, a technician might ask about “lockout,” while a manual describes “de-energizing and tagging out equipment.” A semantic search system can recognize that the concepts are related.

Important rule: query and document vectors must be generated in a compatible embedding space. In a typical RAG setup, use the same embedding model and configuration for ingestion and query embedding. If you switch to an incompatible embedding model, the existing document vectors generally need to be regenerated.

Step 4: Store vectors and metadata

The vectors are stored in a vector store, which indexes them so the system can find vectors that are similar to a query vector. The store also needs the original text or a reference to it, because the model needs readable passages—not just numeric vectors.

Each chunk can also carry metadata, such as its source document, section, publication date, equipment model, department, or access classification. Metadata can help narrow retrieval to the right content and can support authorization rules when implemented by the application.

AWS vector-storage options used with retrieval applications include Amazon OpenSearch Service, Amazon Aurora PostgreSQL-compatible edition with pgvector, Amazon Neptune, and Amazon RDS for PostgreSQL. Amazon Bedrock Knowledge Bases supports multiple vector-store choices; the supported list depends on the knowledge base configuration and evolves, so check the current AWS documentation before selecting one.

Phase 2: Retrieval and generation

Step 5: Embed the question

A technician types: “What’s the lockout procedure before servicing the Model 40 booster pump?” The application converts the question into a vector using the compatible embedding model or managed embedding capability configured for the knowledge base.

Step 6: Retrieve the most relevant chunks

The vector store searches for chunks that are close to the question vector. The system commonly retrieves a limited number of results, sometimes described as top-k. For example, it might start with the five most relevant chunks, then tune that number based on evaluation.

This is semantic search: the system can find relevant content based on meaning, not just exact word matches. Retrieval can be improved with additional techniques:

  • Hybrid search: combines semantic similarity with keyword matching. This is useful when exact part numbers, product codes, or error identifiers matter. In Amazon Bedrock Knowledge Bases, hybrid-search availability and behavior depend on the knowledge base type and vector-store configuration; fully managed knowledge bases use hybrid search.
  • Metadata filtering: restricts results to relevant attributes, such as the correct pump model, department, or document type. For confidential data, filters must be derived and enforced by trusted application-side authorization—not accepted blindly from a user prompt.
  • Reranking: uses a second ranking step or model to reorder candidate passages by relevance, helping move the strongest evidence toward the top.

Not every vector store or configuration supports every retrieval feature. Check the service documentation for the exact capabilities you plan to use.

Step 7: Augment the prompt

The application assembles a prompt containing instructions, the retrieved passages, and the user’s question. A simplified example looks like this:

You are an assistant for water utility field technicians.
Answer using the reference passages below.
If the passages do not contain the answer, say you do not know.
Cite the source document for each statement.

Reference passages:
[1] Booster Pump Manual, Section 4.2: ...
[2] Safety Procedures, Lockout/Tagout: ...

Question:
What is the lockout procedure before servicing the Model 40 pump?

Asking the model to stay within the supplied evidence and admit when the evidence is missing can reduce unsupported answers. It is not a security boundary by itself: retrieved text is still untrusted input, and prompt instructions can be ignored or manipulated.

Step 8: Generate the answer

The foundation model reads the augmented prompt and produces a response. A well-designed application includes citations or source references so the technician can open the original manual and verify the relevant procedure. For a safety-critical task, traceability matters as much as fluent wording. The system should not encourage a technician to act on an unverified AI summary when the approved procedure must be checked.

Why RAG works: grounding

Grounding means anchoring a model’s response in relevant, trusted source material. When retrieval finds the right passages and the model uses them correctly, grounded answers can be:

  • More relevant to company-specific or recently updated information.
  • Verifiable because source citations let users check the original material.
  • Easier to update because changing the documents and refreshing the index can update the information available to the model without retraining its weights.

RAG can reduce hallucinations, but it does not eliminate them. Retrieval can miss the right passage, return outdated material, or rank weak evidence first. The model can also misinterpret a passage, combine separate facts incorrectly, or generate claims that the sources do not support. Evaluate both retrieval quality and answer quality, and use human review for high-impact decisions.

Doing this on AWS: Amazon Bedrock Knowledge Bases

You can build each RAG component yourself, but Amazon Bedrock Knowledge Bases provides a managed way to connect data sources, create embeddings, store and retrieve information, and generate responses. The exact choices vary by knowledge base type and configuration.

  1. Connect a data source. Amazon S3 is a common starting point. Supported managed connectors also include services such as Confluence, Google Drive, Microsoft SharePoint, OneDrive, Salesforce, ServiceNow, Zendesk, and a web crawler; the current list depends on the managed knowledge base offering.
  2. Choose an embedding approach. Depending on the knowledge base type, you may use a service-managed embedding option or configure a supported embedding model.
  3. Choose a vector store. Use a supported managed option or connect a vector store that meets the service’s requirements.
  4. Configure chunking and ingestion. Select the available chunking approach, then start or sync ingestion so the source content is parsed, chunked, embedded, and indexed.

At question time, two API operations are especially useful:

OperationWhat it does
RetrieveReturns relevant source chunks (and supported source content) so your application can construct its own prompt and call a model separately.
RetrieveAndGenerateCombines retrieval with model invocation and returns a natural-language response with citations to source chunks.

Knowledge Bases can also be used with Amazon Bedrock Agents. Amazon Bedrock Guardrails includes contextual grounding checks that can evaluate whether a response is relevant to a supplied reference and grounded in it. AWS documents supported use cases such as summarization, paraphrasing, and question answering with reference text; the contextual grounding check does not support conversational QA or chatbot use cases. Treat it as a targeted safeguard, not universal protection.

Common exam trap

When source documents change, refresh or re-sync the knowledge base so the updated content is processed and indexed. You do not retrain or fine-tune the foundation model just to update the external knowledge used by RAG.

Keeping RAG secure

RAG connects a model to organizational data, so security must be part of the architecture from the start.

  • Access control: if a knowledge base contains public product guides and confidential HR documents, an employee must not retrieve HR content unless authorized. Enforce authorization before or during retrieval using trusted identity and entitlement data. Metadata filters and separate knowledge bases can help, but a prompt saying “do not reveal confidential documents” is not an access-control mechanism.
  • Sensitive data: classify and scan source data before ingestion. Amazon Macie can help discover sensitive data in Amazon S3. Bedrock Guardrails can apply configured sensitive-information filters to supported model inputs and outputs.
  • Untrusted content: retrieved documents may contain hidden or malicious instructions. Treat retrieved passages as data to analyze, not instructions that override the application’s system rules.
  • Encryption and auditing: use encryption controls appropriate to the selected data source and vector store, manage keys securely, and retain logs needed to investigate access and application activity.

When RAG isn’t enough

SituationBetter or complementary approach
The model needs a consistent tone, format, or specialized behavior.Fine-tuning may help shape behavior; combine it with RAG if the application also needs changing external knowledge.
The task needs a small, fixed set of facts.Include the facts directly in the prompt when they fit and do not need a separate retrieval system.
The task needs live information such as current inventory or an account balance.Call an authorized API or business system; an agent can help coordinate the call when the workflow requires decisions.
The task requires multiple steps or actions.Use an agent or a conventional workflow, depending on whether the sequence is dynamic or fixed.

Common RAG failure modes

SymptomLikely causeTypical fix
Confident but incorrect answerThe right passage was not retrieved, or the model did not use the evidence correctly.Improve retrieval, tighten task instructions, evaluate grounding, and add human review where needed.
Relevant topic but vague passagesChunks are too small or lose surrounding context.Adjust chunk size, overlap, or structure-aware chunking.
Exact part numbers are missedSemantic search alone may not emphasize exact identifiers.Use hybrid keyword and semantic search where supported.
Outdated answersThe index has not been refreshed after source changes.Re-sync the data source and monitor ingestion status.
Useful evidence is ranked too lowRetrieval ranking is weak or the query is ambiguous.Tune top-k, improve query formulation, or add reranking where supported.
Restricted content is exposedAuthorization was not enforced at retrieval.Apply server-side entitlement checks and metadata filtering, or separate knowledge bases by audience.
Tables produce garbled answersDocument parsing failed to preserve table structure.Improve extraction and parsing, and test table-heavy documents separately.

A complete scenario

Return to the water utility. The team builds a knowledge base from 400 PDF manuals stored in an S3 bucket. It checks the source material for sensitive information, uses structure-aware chunking because the manuals have clear sections, and attaches metadata for equipment model and document type.

Technicians ask questions from a tablet. The application authenticates each technician, applies the relevant access rules, retrieves passages for the specified pump model, and asks the foundation model to answer with citations. The prompt tells the model to say “I couldn’t find this in the manuals” rather than guess. When engineering revises a manual, the team uploads the new version and refreshes the knowledge base. The model itself does not need to be retrained just because the source document changed. Safety-critical procedures display the source section so technicians can verify the official instructions before acting.

Common mistakes and misconceptions

  • “RAG trains the model on my data.” RAG retrieves external information at request time; it does not, by itself, change the model’s weights.
  • “RAG eliminates hallucinations.” It can reduce unsupported answers, but retrieval and generation can both fail.
  • “More retrieved chunks are always better.” Extra passages consume context and can distract the model from the strongest evidence.
  • “Any embedding model works for queries.” Query and document vectors must be compatible and produced in the same intended embedding space.
  • “Updating a document requires retraining.” Usually the knowledge base must be refreshed and re-indexed; the foundation model does not need retraining for that update.
  • “RAG automatically handles access control.” Authorization must be deliberately enforced by the application and retrieval architecture.

Exam-focused insights for AIF-C01

The current AWS Certified AI Practitioner exam guide explicitly includes RAG in Domain 3, Task Statement 3.1. It asks candidates to define RAG, describe its business applications, and recognize Amazon Bedrock Knowledge Bases. It also names AWS services that can store embeddings in vector databases, including Amazon OpenSearch Service, Amazon Aurora, Amazon Neptune, and Amazon RDS for PostgreSQL.

For exam preparation, practice these skills:

  • Recognize the RAG signal: “use our internal documents,” “retrieve current information,” “ground the answer,” or “without retraining the model.”
  • Place each component: parsing, chunking, and document embedding happen during ingestion; query embedding, retrieval, prompt augmentation, and generation happen at question time.
  • Connect AWS services: Bedrock Knowledge Bases supports managed RAG; embedding models create vectors; vector stores index them; Guardrails can provide additional safeguards.
  • Choose RAG versus fine-tuning: frequently changing knowledge points toward RAG; changing model behavior or task style may point toward fine-tuning.
  • Understand the limits: RAG improves access to relevant information but does not guarantee correctness or replace authorization.

Key takeaways

  • RAG gives a foundation model relevant external passages at question time so the response can be grounded in your data.
  • Ingestion parses, chunks, embeds, and indexes documents. At question time, the system embeds the query, retrieves matches, augments the prompt, and generates an answer.
  • Chunking, hybrid search, metadata filtering, and reranking can improve retrieval quality when supported and configured correctly.
  • Amazon Bedrock Knowledge Bases manages much of the RAG pipeline. Retrieve returns source chunks; RetrieveAndGenerate combines retrieval with response generation and citations.
  • Refresh the knowledge base when source documents change. Enforce authorization at retrieval and treat retrieved content as untrusted input.

Original AIF-C01 practice questions

These are original, unofficial educational practice questions written by CloudExamPro. They are not actual AWS exam questions.

Question 1

During the ingestion phase of a RAG system, what is the primary purpose of generating embeddings for document chunks?

A. To translate the chunks into another language
B. To represent each chunk’s meaning as a vector so similar content can be found by similarity search
C. To reduce the number of documents stored in Amazon S3
D. To fine-tune the foundation model on the chunks

👉 Click to reveal the answer & explanation

Correct answer: B.

  • B is correct: Embeddings represent content as vectors, enabling semantic similarity search at query time.
  • A is incorrect: Embeddings are not translations.
  • C is incorrect: Embedding does not reduce or delete the original documents.
  • D is incorrect: RAG supplies external context; it does not fine-tune the model.

Question 2

A university wants a question-answering assistant grounded in admissions policies stored in Amazon S3. The team wants a managed service that handles ingestion and retrieval without building the pipeline from scratch. Which option is the best fit?

A. Amazon Bedrock Knowledge Bases
B. Amazon Transcribe
C. AWS Artifact
D. Amazon Polly

👉 Click to reveal the answer & explanation

Correct answer: A.

  • A is correct: Bedrock Knowledge Bases is the managed capability for connecting data sources and supporting retrieval-based, grounded generation.
  • B is incorrect: Transcribe converts speech to text.
  • C is incorrect: AWS Artifact provides compliance reports and agreements.
  • D is incorrect: Polly converts text to speech.

Question 3

A company updates its return-policy document in the S3 bucket behind its RAG assistant, but the assistant keeps quoting the old policy. What is the most appropriate action?

A. Retrain the foundation model from scratch
B. Increase the model’s temperature
C. Re-sync the knowledge base data source so the updated document is processed and indexed
D. Switch to a text-to-speech model

👉 Click to reveal the answer & explanation

Correct answer: C.

  • C is correct: The index may still contain the old content. Refreshing ingestion updates the chunks and embeddings from the source document.
  • A is incorrect: Retraining is unnecessary because the policy is supplied through retrieval, not stored in the model weights.
  • B is incorrect: Temperature affects generation behavior, not the stored knowledge-base index.
  • D is incorrect: Text-to-speech is unrelated to document retrieval.

Question 4

A RAG assistant retrieves passages on the right topic, but each passage is a single sentence stripped of surrounding context. The model therefore produces vague answers. Which change is most likely to help?

A. Reduce the context window
B. Adjust chunking to use larger or structure-aware chunks that keep related context together
C. Switch to a smaller embedding vector without testing
D. Disable retrieval so the model answers from memory

👉 Click to reveal the answer & explanation

Correct answer: B.

  • B is correct: Chunks that are too small can lose context. Larger or structure-aware chunks may preserve the relationships needed to answer.
  • A is incorrect: A smaller context window leaves less room for useful evidence.
  • C is incorrect: Changing vector dimensions without testing does not address missing context and requires re-embedding.
  • D is incorrect: Removing retrieval removes the external grounding and can increase unsupported answers.

Question 5

A company’s knowledge base contains public product guides and confidential HR documents. Employees from all departments use the assistant, but only HR staff may see HR content. What is the most reliable approach?

A. Add a prompt instruction telling the model not to reveal HR documents to non-HR users
B. Enforce authorization at the retrieval layer, such as separating content or filtering results using trusted user entitlements
C. Ask users to promise not to request HR information
D. Increase the number of chunks retrieved

👉 Click to reveal the answer & explanation

Correct answer: B.

  • B is correct: Enforcing authorization before restricted content reaches the model is stronger than relying on the model to refuse disclosure.
  • A is incorrect: Prompt instructions are not an access-control boundary.
  • C is incorrect: An honor-system promise is not a security control.
  • D is incorrect: Retrieving more chunks can increase exposure rather than protect confidential data.

Frequently asked questions

Do I need a vector database for RAG?

You need a way to search embeddings by similarity. This can be a dedicated vector database or a database with vector-search support. Bedrock Knowledge Bases can create or connect to a supported vector store, depending on the configuration.

Is RAG better than fine-tuning?

They solve different problems. RAG supplies external knowledge, especially information that changes. Fine-tuning changes model behavior or adapts it to a task or domain. Some applications use both.

How many chunks should I retrieve?

There is no universal number. Retrieve enough evidence to answer the question without flooding the context window, then tune the number using representative test questions.

Can RAG work with images or tables?

Yes, but it requires suitable parsing and model support. Tables need careful extraction, while images may require multimodal embedding or a description generated by an appropriate model. Check the capabilities of the specific service and configuration.

How do I know whether my RAG system is working well?

Build a test set of real questions with known answers. Evaluate retrieval (whether the right passages were found) and generation (whether the answer is correct and supported by those passages). Add human review for important or safety-sensitive use cases.

Official AWS references

CloudExamPro · AIF-C01 PRACTICE

Turn your AIF-C01 study into measurable exam readiness

Check your understanding with original practice questions, review every explanation, and identify the domains that need more work. When you are ready for full-length practice, explore the Premium package. No dumps. No shortcuts.

Take the free AIF-C01 diagnostic examExplore AIF-C01 Premium practice exams

COMING SOON • BLACK FRIDAY MEETS CYBER MONDAY
Something BIG Is Coming! Get ready for an exclusive offer on AWS certification exam preparation. November 27–30, 2026
Starts in--d --h --m --sView Pricing Plans