8

Integration Pattern: Real-Time Retrieval Augmented Generation

In this chapter, we’ll explore another integration pattern that combines the power of Retrieval Augmented Generation (RAG) and generative AI models to build a chatbot capable of answering questions based on the content of PDF files. This approach combines the strengths of both retrieval systems and generative models, allowing us to leverage existing knowledge sources while generating relevant and contextual responses.

One of the key advantages of the RAG approach is its ability to prevent hallucinations and provide better context for the generated responses. Generative AI models, trained on broad data, can sometimes produce responses that are factually incorrect or outdated due ...

Get Generative AI Application Integration Patterns 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.