type
status
date
slug
summary
tags
category
icon
password
URL
Rating
Least-to-Most Prompting Enables Complex Reasoning in Large Language Models
- Denny Zhou (Google DeepMind): Teach language models to reason
此工作来自 CoT、Self-Consistency 的作者。
CoT 在容易的问题上效果很好,但在难的问题上效果不显著。而 Least-to-Most Prompting 主要是用来解决难的问题。
Least-to-Most Prompting
Least-to-Most Prompting 思路也很简单,就是先把问题分解成更简单的多个子问题,然后再逐个回答子问题,最终获得原始问题的答案:
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F6a84cab3-4f3f-4b53-a226-0739881ccf61%2FUntitled.png?table=block&id=0e10a71e-31d5-4472-9ba2-bb06f853bef5&t=0e10a71e-31d5-4472-9ba2-bb06f853bef5&width=528&cache=v2)
除了上面的技巧,另一个技巧是在prompt中加入了少量样例(few-shot),这样可以显著提升效果。这个技巧在CoT中也有,是个提升效果很通用的方法。
论文中在具体实现时,针对不同的任务,主要设计了以下两种prompt结构(省略了prompt中的少量样例):
- Let's break down this problem:
- 这种方式是调用一次LLM,让它先生成子问题,再生成每个子问题的答案,以及最终答案。所以主要靠样例来规范LLM的输出。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F8b5dbb62-f950-472a-9c85-7c4615bed33a%2FUntitled.png?table=block&id=e2e6e7f4-f905-4043-9226-c57706f5fdf8&t=e2e6e7f4-f905-4043-9226-c57706f5fdf8&width=672&cache=v2)
- To solve “
<problem>
”, we need to first solve: “<subproblem1>
”, “<subproblem2>
”, “<subproblem3>
”, … - 这种方式是迭代生成子问题的答案,汇总所有信息后再生成最终答案。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F81067e0f-dcfe-417f-91ce-b0931f996b3b%2FUntitled.png?table=block&id=da438a4d-8726-47eb-aee5-93a3a947dabd&t=da438a4d-8726-47eb-aee5-93a3a947dabd&width=720&cache=v2)
我理解prompt使用的具体提示词(
break down
or first solve
)不重要,重要的是先分解成子任务,再逐个解答的思路。效果
效果杠杆的。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F60889d5b-6381-4b08-a6e4-b6c3a364c7b9%2FUntitled.png?table=block&id=92f1fc1e-4a04-4c6f-be42-aaeed117176b&t=92f1fc1e-4a04-4c6f-be42-aaeed117176b&width=720&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F4cbec9d4-8c8c-44f9-a223-e1a55ae75e36%2FUntitled.png?table=block&id=3597feb6-5e31-49c4-98df-37044f1946b9&t=3597feb6-5e31-49c4-98df-37044f1946b9&width=768&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fb3657dc6-f077-449f-bed8-3e36a9d2f677%2FUntitled.png?table=block&id=f130ea2f-ae8e-4e69-9c55-7ffa4b07d5fa&t=f130ea2f-ae8e-4e69-9c55-7ffa4b07d5fa&width=768&cache=v2)
<ins/>
- 作者:Breezedeus
- 链接:https://www.breezedeus.com/article/llm-prompt-l2m
- 声明:本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。
相关文章