5

Harnessing the Power of RAG

By now, we know the FMs are trained using large datasets. However, the data used to train FMs might not be recent, and this can cause the models to hallucinate. In this chapter, we will harness the power of RAG by augmenting the model with external data sources to overcome the challenge of hallucination.

We will explore the importance of RAG in generative AI scenarios, how RAG works, and its components. We will then delve into the integration of RAG with Amazon Bedrock, including a fully managed RAG experience by Amazon Bedrock called Knowledge Bases. The chapter will then take a hands-on approach to the implementation of Knowledge Bases and using APIs.

We will explore some real-world scenarios of RAG and discuss ...

Get Generative AI with Amazon Bedrock now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.