From the course: Oracle Cloud Infrastructure Generative AI Professional

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Retrieval augmented generation (RAG)

Retrieval augmented generation (RAG)

(soft music) - [Hemant] Let us understand what is retrieval-augmented generation. Traditional language models generate responses based solely on their training data, which can become outdated. RAG addresses this by retrieving up-to-date information from external sources and providing this additional and specific information to LLM along with the user query, thus enhancing the context provided to the LLM for generating a more relevant response. A few benefits of this approach are: Standard LLMs can sometimes carry forward biases or errors present in their training data. RAG can mitigate this by pulling in a variety of perspectives and sources, leading to more balanced and accurate responses. RAG can also overcome model limitations such as token limits, since we are only feeding top-k search results to the LLMs instead of the whole documents. RAG allows models to handle a broader range of queries without the need for exponentially larger training datasets. Let us see how a basic…

Contents