AIF-C01 ยท Designing foundation model applications
What is Retrieval Augmented Generation (RAG) and how do Amazon Bedrock Knowledge Bases implement it?
How RAG grounds a model in private data, its business applications and how Amazon Bedrock Knowledge Bases implements the flow.
Key points
- RAG grounds a model in your own data without retraining it.
- Ingestion: documents are split into chunks, turned into embeddings and stored in a vector store.
- Question time: the query is embedded, similar chunks are retrieved and added to the prompt, and the model answers from that context.
- Knowledge Bases: automates ingestion, embedding and retrieval; can return source citations.
Source: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-how-it-works.html
Practice questions
What is the main problem RAG solves?
- It permanently retrains the model on new documents
- It makes every response faster than a plain model call
- It lets the model answer using your own, up-to-date documents
- It removes the need for any embeddings
Show answer
Answer: C. It lets the model answer using your own, up-to-date documents
RAG supplies the model with relevant, current private content at query time, so answers reflect your data. It does not change model weights, make the model faster, or remove the need for a vector store.
Which steps are part of how a knowledge base prepares and uses data in a RAG flow?
- Splitting source documents into chunks
- Converting chunks to embeddings stored in a vector index
- Updating the foundation model's weights with the documents
- Deleting the original documents after ingestion
- Adding the retrieved chunks to the prompt before generation
Show answer
Answer: A. Splitting source documents into chunks, B. Converting chunks to embeddings stored in a vector index, E. Adding the retrieved chunks to the prompt before generation
Documents are chunked and converted to embeddings stored in a vector index, and at runtime the user query is embedded and matched, then the retrieved text augments the prompt. The model's weights are not updated and documents are not deleted after ingestion.
Because RAG gives the model relevant documents, it guarantees the answer can never contain a hallucination.
Show answer
Answer: False
False. RAG reduces hallucinations by grounding the answer in retrieved text, but poor retrieval or a model that ignores the context can still produce wrong statements. Citations help users verify.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
