RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Horizon Generation.pptx
thanhdowork
106 views
12 slides
Jun 04, 2024
Slide 1 of 12
1
2
3
4
5
6
7
8
9
10
11
12
About This Presentation
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Horizon Generation
Size: 1.19 MB
Language: en
Added: Jun 04, 2024
Slides: 12 pages
Slide Content
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Horizon Generation YANJUN WU Network Science Lab Dept. of Artificial Intelligence The Catholic University of Korea E-mail:[email protected]
1. Introduction Currently, the combination of LLM and CoT has achieved good results on many tasks. Scholars have pointed out that LLM's answers and middle reasoning steps can be illusory. This problem is increasingly seen in zero-shot CoT and long text generation, such as code generation, task planning, and mathematical reasoning. In completing these tasks, the factual availability of middle thinking may be critical. N ow there are several techniques that can already be used to reduce this problem, e.g., with RAG . This paper explores how combining RAG with complex long-term reasoning, with the help of external knowledge (RAG), can reduce the illusion of intermediate reasoning processes ( CoT ).
2. Background RAG (Retrieval-Augmented Generation) is an approach that combines retrieval and generation, where the generative model is revised incrementally based on the retrieved information to produce more accurate and relevant answers or texts. Cot: Instead of the LLM generating the correct answer directly, the LLM first outputs the middle reasoning steps, which are called "thoughts".
3. Pipeline of RAT
๐ผ : How to Cook Spaghetti ๐๐ : GPT-3.5 models 1. ๐ = { ๐ 1, ๐ 2, . . . , ๐๐ } โ ๐๐ (ยท| ๐ผ ) Use the GPT-3.5 model to generate an initial step-by-step thought process based on the task prompt "How to Cook Spaghetti" ๐ = { ๐ 1, ๐ 2, . . . , ๐๐ } Example: suppose the generated initial thought process is ๐ = { ๐ 1: "Prepare Food ", ๐ 2: "Cook Noodles", ๐ 3: "Seasoning"} 2. ๐โ โ ๐ 1, ๐ โ 1 Initialize the draft answer ๐โ and initialize ๐โ with the first think step "Prepare foodโ Example: ๐โ = "Prepare Food โ 3.Repeat next step 3. Pipeline of RAT
4. ๐๐ โ ToQuery ( ๐ผ , ๐โ ) Generate query ๐๐ based on current draft answer ๐โ "Prepare foodโ Example: ๐ 1 = "What are the toppings for spaghetti?" 5. ๐ ๐ โ RetrieveFromCorpus ( ๐๐ ) Retrieving relevant information from a text corpus or the Internet ๐ ๐๏ผ or RAG) Example: suppose that relevant information is retrieved from the Internet "Common ingredients for spaghetti include pasta, tomato sauce, olive oil, garlic, etc.โ 6. ๐โ โ ๐๐ (ยท| ๐ผ , ๐โ , ๐ ๐ ) Based on the retrieved text information "Common ingredients for spaghetti include pasta, tomato sauce, olive oil, and garlic." , use the GPT-3.5 model to revise the draft answer ๐ โ Example: ๐โ = "Prepare food: spaghetti, tomato sauce, olive oil, garlic, etc.โ 7: ๐โ โ CONCAT( ๐โ , ๐๐ +1) Append the next thinking step "Cooking Noodles" to the revised draft answer ๐โ Example: ๐โ = "Prepare the ingredients: pasta, tomato sauce, olive oil, garlic, etc. Cook the pasta." 3. Pipeline of RAT
8: ๐ โ ๐ + 1 Increase index ๐ to start the next round of revisions Example: ๐ = 2 9: until ๐ > ๐ Repeat until all revised thought processes are obtained ๐ โ 1: ๐ Example: iterating to get revised thought processes ๐ โ = "Prepare ingredients: pasta, tomato sauce, olive oil, garlic, etc. Cook pasta. Season to taste.โ 10: return ๐โ Using the revised thought process ๐โ as the final generated result Example: return final generated result ๐โ = "Prepare the ingredients: pasta, tomato sauce, olive oil, garlic, etc. Bring water to a boil, add salt and pasta and cook until pasta is tender but al dente. Add different seasonings to taste." 3. Pipeline of RAT
4. Experiments The experimental results show that RAT is awesome and significantly improves the accuracy and efficiency of generating contexts.
4. Experiments It is more efficient to use RAG to generate CoT .
5. Experiments This iterative process may help to refine the search and reasoning steps based on the updated context, thus allowing for more accurate and related information search, which in turn supports more accurate final answers. These results firmly establish the effectiveness of causal reasoning in long-term problem-solving tasks.
6. Conclusion This paper presents Retrieval Augmented Thinking (RAT), which combines Chain of Thoughts ( CoT ) prompting with Retrieval Augmented Generation (RAG) for challenging long-term reasoning and generative tasks. The key ideas in this paper include using RAG to revise zero-sample thought chains generated by LLM using thoughts as queries, and stepwise revising thoughts and generating responses in a causal manner.RAT , as a zero-sample prompting method, has been shown to have significant advantages over ordinary CoT prompting, RAG, and other baseline methods for challenging code generation, mathematical reasoning, embodied task planning, and creative writing tasks.