Skip to content
AWS Certified AI Practitioner (AIF-C01) Exam Prep

Lesson 20 of 34 · 6 min

x
20/34

RAG, Knowledge Bases and Vector Databases

Video lesson: AIF-C01 20/34: RAG, Knowledge Bases and Vector Databases

RAG (verified, Bedrock Knowledge Bases docs)

Retrieval Augmented Generation (RAG) uses information from data sources to improve the relevancy and accuracy of responses. Flow:

  1. Ingest: convert documents to text, chunk them, create embeddings, store them in a vector index with a link back to the source.
  2. Retrieve: embed the user's query; find semantically similar chunks.
  3. Augment: add the chunks to the prompt.
  4. Generate: the FM answers from that context, optionally with citations.

Knowledge bases also remove the need to continually retrain a model to use your private data (verified).

Amazon Bedrock Knowledge Bases

  • Managed Knowledge Base (AWS recommends it): Bedrock manages ingestion, indexing, storage and retrieval; connectors for Amazon S3, SharePoint, Confluence, Google Drive, OneDrive and a web crawler; document-level permission filtering; agentic retrieval for multi-hop questions; integrates with AgentCore Gateway as an MCP tool.
  • Customer-managed Knowledge Base: you set up the vector store (such as Amazon OpenSearch Serverless, Amazon Aurora, Amazon Neptune) and control parsing and indexing.
  • Features: citations for checking accuracy, reranking models, multimodal retrieval.

Business applications (design guidance)

Employee help desks over HR policies · customer support over product manuals · search across contracts · sales assistants over product catalogues.

AWS vector stores (guide list; verified as Bedrock options where noted)

ServiceNotes
Amazon OpenSearch Service (Serverless or managed cluster)Search and vector engine; Bedrock KB option
Amazon Aurora (PostgreSQL)Relational database with vector support; Bedrock KB option
Amazon Neptune (Neptune Analytics)Graph database; graph-based RAG
Amazon RDS for PostgreSQLVector search with the pgvector extension (general background)
Also supported by Bedrock KBsAmazon S3 Vectors, Pinecone, Redis Enterprise Cloud, MongoDB Atlas

Exam traps

  • Fine-tuning to teach the model this week's prices. Facts change; RAG retrieves current data.
  • RAG removes the need for review. It reduces hallucinations; it doesn't eliminate them.
  • Using DynamoDB as the "vector database" answer when OpenSearch, Aurora, Neptune or RDS for PostgreSQL is listed.

References

  1. Bedrock Knowledge Bases — checked Oct 19, 2026
  2. How knowledge bases work — checked Oct 19, 2026
  3. KB vector store setup — checked Oct 19, 2026
  4. AIF-C01 Domain 3 — checked Oct 19, 2026

Check your understanding

  • Policies change monthly; answers must cite the current policy. Approach?Show answer

    Answer

    RAG with Bedrock Knowledge Bases.
  • What turns chunks into searchable vectors?Show answer

    Answer

    An embeddings model.
  • Name two AWS services that store embeddings.Show answer

    Answer

    Amazon OpenSearch Service, Amazon Aurora (also Neptune, RDS for PostgreSQL).
Previous

Progress is saved in this browser.

Next Lesson