hands-on lab

Enhancing Generative AI Models With Retrieval-Augmented Generation (RAG)

Up to 30m
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Large language models (LLMs) are already proven to be capable of generating human-like responses, but these responses can be enhanced to provide more accurate and relevant information. Retrieval-Augmented Generation (RAG) is a technique that combines the strengths of LLMs and information retrieval systems to generate text that is both fluent and factually accurate.

In this lab, you will learn about Retrieval-Augmented Generation, its use cases, and common components. You will also learn how to implement RAG in a Python application.

Learning objectives

Upon completion of this beginner-level lab, you will be able to:

  • Explain the concept of Retrieval-Augmented Generation (RAG) and its use cases
  • Implement RAG in a Python application using LangChain and Amazon Bedrock

Intended audience

  • Candidates for the AWS Certified Machine Learning Specialty certification
  • Cloud Architects
  • Software Engineers


Familiarity with the following will be beneficial but is not required:

  • Python
  • Amazon Bedrock

The following content can be used to fulfill the prerequisites:

Environment before

Environment after

About the author
Jun Fritz, opens in a new tab
Cloud Labs Developer
Learning paths

Jun is a Cloud Labs Developer with previous experience as a Software Engineer and Cloud Developer. He holds the AWS Certified Solutions Architect and DevOps Engineer Professional certifications. He also holds the AWS Certified Solutions Architect, Developer, and SysOps Administrator Associate certifications. 

Jun is focused on giving back to the growing cloud community by sharing his knowledge and experience with students and creating engaging content. 

Covered topics
Lab steps
Introduction to Retrieval-Augmented Generation (RAG)
Implementing Retrieval-Augmented Generation (RAG) in Python