pal models,全称为 program-aided language models。需要各位注意,这个方法,真的非常高级,甚至我觉得有点 hack,而且经过我的多次测试,我觉得以 chatgpt 目前的能力,已经不再需要使用这个方法。
但我在很多 pe 的教程里都有看到这个方法,所以我这里就简单介绍一下,这个方法来自于 2022 年,luyu gao ,根据他们的研究,在 llm 模型中,即使使用了前面提到的 chain of thought 的方法,也未必能拿到答案,论文中使用的 prompt 是这样的:
q: roger has 5 tennis balls. he buys 2 more cans of
tennis balls. each can has 3 tennis balls. how many
tennis balls does he have now?
a: roger started with 5 tennis balls. 2 cans of 3 tennis
balls each is 6 tennis balls. 5 6 = 11. the answer is 11.
q: the bakers at the beverly hills bakery baked 200
loaves of bread on monday morning. they sold 93 loaves
in the morning and 39 loaves in the afternoon. a grocery
store returned 6 unsold loaves. how many loaves of
bread did they have left?
论文里提到,当年他们的模型的 output 是这样的:
a: the bakers started with 200 loaves. they sold 93 in
the morning and 39 in the afternoon. so they sold 93
39 = 132 loaves. the grocery store returned 6 loaves. so
they had 200 - 132 - 6 = 62 loaves left.
the answer is 62.
如果你现在将这个 prompt 输入到最新的 chatgpt 答案已经是正确的:
a: the bakers baked 200 loaves of bread. they sold 93 39 = 132 loaves. after the grocery store returned 6 unsold loaves, the bakery had 200 - 132 6 = 74 loaves of bread left. the answer is 74.
当年 luyu gao 的解决方法是在 prompt 里引入代码,并引导模型使用代码来运算和思考,最后答案就是正确的:
未经允许不得转载:凯发k8国际真人 » chatgpt pal models