text
What if the retrieval goes wrong? 🐕
What if the retrieval goes wrong? 🐕
new_line
new_line
text
Retrieval Augmented Generation (RAG) is a strategy to alleviate LLM hallucinations and improve the quality of generated responses.
Retrieval Augmented Generation (RAG) is a strategy to alleviate LLM hallucinations and improve the quality of generated responses.
new_line
new_line
text
A standard RAG architecture has two main blocks: a Retriever and a Generator.
A standard RAG architecture has two main blocks: a Retriever and a Generator.
new_line
new_line
text
1️⃣ When the system receives an input sequence, it uses the Retriever to retrieve the top-K most relevant documents associated with the input sequence. These documents typically come from an external source (e.g., Wikipedia) and are then concatenated to the original input's context.
1️⃣ When the system receives an input sequence, it uses the Retriever to retrieve the top-K most relevant documents associated with the input sequence. These documents typically come from an external source (e.g., Wikipedia) and are then concatenated to the original input's context.
new_line
new_line
text
2️⃣ It then uses the Generator to generate a response given the gathered information in the first step.
2️⃣ It then uses the Generator to generate a response given the gathered information in the first step.
new_line
new_line
text
But what happens if the retrieval goes wrong and the retrieved documents are of very low quality?
But what happens if the retrieval goes wrong and the retrieved documents are of very low quality?
new_line
new_line
text
Well, in such cases, the generated response will probably be of low quality, too. 🫠
Well, in such cases, the generated response will probably be of low quality, too. 🫠
new_line
new_line
text
But here is where CRAG (Corrective RAG) *might* help. I say it might help because the paper is very new — only one week old, and I don't know if someone has actually tried this in practice 😅
But here is where CRAG (Corrective RAG) *might* help. I say it might help because the paper is very new — only one week old, and I don't know if someone has actually tried this in practice 😅
new_line
new_line
text
However, the idea is to add a Knowledge Correction block between the Retrieval and Generation steps to evaluate the retrieved documents and correct them if necessary.
However, the idea is to add a Knowledge Correction block between the Retrieval and Generation steps to evaluate the retrieved documents and correct them if necessary.
new_line
new_line
text
This step goes as follows:
This step goes as follows:
new_line
new_line
text
🟢 If the documents are correct, they will be refined into more precise knowledge strips and concatenated to the original context to generate a response.
🟢 If the documents are correct, they will be refined into more precise knowledge strips and concatenated to the original context to generate a response.
new_line
new_line
text
🔴 If the documents are incorrect, they will be discarded, and instead, the system searches the web for complementary knowledge. This external knowledge is then concatenated to the original context to generate a response.
🔴 If the documents are incorrect, they will be discarded, and instead, the system searches the web for complementary knowledge. This external knowledge is then concatenated to the original context to generate a response.
new_line
new_line
text
🟡 If the documents are ambiguous, a combination of the previous two resolutions is triggered.
🟡 If the documents are ambiguous, a combination of the previous two resolutions is triggered.
new_line
new_line
text
The experimental results from the paper show how the CRAG strategy outperforms traditional RAG approaches in both short and long-form text generation tasks.
The experimental results from the paper show how the CRAG strategy outperforms traditional RAG approaches in both short and long-form text generation tasks.
new_line
new_line
text
Paper: 
Paper: 
resource
https://huggingface.co/papers/2401.15884
paper
2401.15884
https://huggingface.co/papers/2401.15884
Corrective Retrieval Augmented Generation (2401.15884)
What if the retrieval goes wrong? 🐕

Retrieval Augmented Generation (RAG) is a strategy to alleviate LLM hallucinations and improve the quality of generated responses.

A standard RAG architecture has two main blocks: a Retriever and a Generator.

1️⃣ When the system receives an input sequence, it uses the Retriever to retrieve the top-K most relevant documents associated with the input sequence. These documents typically come from an external source (e.g., Wikipedia) and are then concatenated to the original input's context.

2️⃣ It then uses the Generator to generate a response given the gathered information in the first step.

But what happens if the retrieval goes wrong and the retrieved documents are of very low quality?

Well, in such cases, the generated response will probably be of low quality, too. 🫠

But here is where CRAG (Corrective RAG) *might* help. I say it might help because the paper is very new — only one week old, and I don't know if someone has actually tried this in practice 😅

However, the idea is to add a Knowledge Correction block between the Retrieval and Generation steps to evaluate the retrieved documents and correct them if necessary.

This step goes as follows:

🟢 If the documents are correct, they will be refined into more precise knowledge strips and concatenated to the original context to generate a response.

🔴 If the documents are incorrect, they will be discarded, and instead, the system searches the web for complementary knowledge. This external knowledge is then concatenated to the original context to generate a response.

🟡 If the documents are ambiguous, a combination of the previous two resolutions is triggered.

The experimental results from the paper show how the CRAG strategy outperforms traditional RAG approaches in both short and long-form text generation tasks.

Paper: https://huggingface.co/papers/2401.15884
👍
osanseviero samusenps NeuralNovel nickandbro abellion