Difference between revisions of "Retrieval-Augmented Generation (RAG)"

From
Jump to: navigation, search
m (Fine-tuning vs. RAG)
m (Fine-tuning vs. RAG)
Line 30: Line 30:
  
 
* <b>RAG</b> is a more efficient and transparent approach than finetuning. This approach is suitable for tasks where labeled data is scarce or expensive to obtain. RAG can also be used to generate creative content, such as poems, code, scripts, and musical pieces. However, RAG may not be as accurate as fine-tuning on tasks that require the model to learn complex patterns and relationships.
 
* <b>RAG</b> is a more efficient and transparent approach than finetuning. This approach is suitable for tasks where labeled data is scarce or expensive to obtain. RAG can also be used to generate creative content, such as poems, code, scripts, and musical pieces. However, RAG may not be as accurate as fine-tuning on tasks that require the model to learn complex patterns and relationships.
 +
 +
  
 
<table>
 
<table>

Revision as of 05:29, 13 September 2023

YouTube ... Quora ...Google search ...Google News ...Bing News

Retrieval-Augmented Generation (RAG) is a method of generating text by first retrieving relevant information from a knowledge base and then generating text based on that information. This can be done by using a retrieval model to find relevant documents or passages, and then using a language model to generate text that is consistent with the retrieved information.


Fine-tuning vs. RAG

  • Fine-tuning is likely to produce better performance than RAG on tasks that require the model to learn complex patterns and relationships. This approach is suitable for use cases like customer code migration, machine translation, question answering, and summarization. However, finetuning can be computationally expensive and time-consuming, and it requires a large amount of labeled data.
  • RAG is a more efficient and transparent approach than finetuning. This approach is suitable for tasks where labeled data is scarce or expensive to obtain. RAG can also be used to generate creative content, such as poems, code, scripts, and musical pieces. However, RAG may not be as accurate as fine-tuning on tasks that require the model to learn complex patterns and relationships.


Feature Fine-tuning RAG
Approach Adapts a pre-trained model to a specific task Generates text by retrieving information from a knowledge base
Performance Better on tasks that require the model to learn complex patterns and relationships More efficient and transparent
Cost More expensive Less expensive
Data requirements Requires a large amount of labeled data Can be used with less labeled data
Accuracy More accurate on tasks that require the model to learn complex patterns and relationships May not be as accurate on these tasks