The traditional way to do RAG is to find information relevant to a query - and then incorporate it into the LLM prompt together with the question we w

AI Adventures: A Programmer’s Journey

submited by
Style Pass
2024-04-29 06:30:04

The traditional way to do RAG is to find information relevant to a query - and then incorporate it into the LLM prompt together with the question we want it to answer. Something like:

Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming. 

The main problem with that approach is that there is no error-correction mechanism - if the retrieved information is wrong or not enough there is no second chance to fix that. Adaptive RAG, Corrective RAG and similar improve on this by letting the LLM decide if the retrieved information is enough and then repeat the search (with potentially changed parameters - like expanded context size or sources) if needed.

The earlier “ReAct” paper, proposed a different, and more promissing procedure: it asked the LLM to use a search engine and create the search queries itself, then evaluate the results in an iterative loop of looking for the right info. I believe there are numerous advantates in that approach:

Leave a Comment