0% found this document useful (0 votes)
10 views

tyjt

Retrieval-Augmented Generation (RAG) is an AI framework that merges traditional information retrieval with generative large language models to provide accurate and relevant responses. It enhances language models by allowing them to access current and reliable external data during the response generation process. RAG operates through retrieval and pre-processing of information followed by grounded generation, which integrates this data into the language model for improved accuracy.

Uploaded by

code.ai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

tyjt

Retrieval-Augmented Generation (RAG) is an AI framework that merges traditional information retrieval with generative large language models to provide accurate and relevant responses. It enhances language models by allowing them to access current and reliable external data during the response generation process. RAG operates through retrieval and pre-processing of information followed by grounded generation, which integrates this data into the language model for improved accuracy.

Uploaded by

code.ai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Retrieval-Augmented Generation(RAG)

RAG (Retrieval-Augmented Generation) is an AI framework that combines


the strengths of traditional information retrieval systems (such as search
and databases) with the capabilities of generative large language models
(LLMs). By combining your data and world knowledge with LLM language
skills, grounded generation is more accurate, up-to-date, and relevant to
your specific needs.

Why is it needed ?
In traditional language models, responses are generated based solely on
pre-learned patterns and information during the training phase. However,
these models are inherently limited by the data they were trained on, often
leading to responses that might lack depth or specific knowledge. RAG
implementation in an LLM-based question-answering system has two
main benefits: It ensures that the model has access to the most current,
reliable facts, and that users have access to the model’s sources, ensuring
that its claims can be checked for accuracy and ultimately trusted

RAG addresses this limitation by pulling in external data as needed during


the generation process. Here’s how it works: when a query is made, the
RAG system first retrieves relevant information from a large dataset or
knowledge base, then this information is used to inform and guide the
generation of the response.

How does Retrieval-Augmented Generation work?

RAGs operate with a few main steps to help enhance generative AI


outputs:

●​ Retrieval and pre-processing: RAGs leverage powerful search


algorithms to query external data, such as web pages, knowledge
bases, and databases. Once retrieved, the relevant information
undergoes pre-processing, including tokenization, stemming, and
removal of stop words.
●​ Grounded generation: The pre-processed retrieved information is
then seamlessly incorporated into the pre-trained LLM. This
integration enhances the LLM's context, providing it with a more
comprehensive understanding of the topic. The retrieved
information is then used to inform the LLM's response, ensuring it
has up-to-date and accurate facts to build upon, reducing the
chances of hallucination (generating incorrect or fictional
information).

Rag Architecture:
It’s essentially a two-part process involving a retriever component and a
generator component.

You might also like