Code Prompting Elicits Conditional Reasoning Abilities in Text+Code LLMs

要約

推論は言語を理解するための基本的な要素です。
複数のタイプの推論のうち、条件付き推論、つまり条件に応じて異なる結論を引き出す機能は、大規模言語モデル (LLM) で十分に研究されていません。
思考連鎖などの最近のプロンプト手法により、推論タスクにおける LLM が大幅に改善されました。
それにもかかわらず、何が LLM の推論能力を引き起こすのかについては、まだほとんど理解されていません。
私たちは、コード プロンプトがテキストとコードでトレーニングされた LLM の条件付き推論をトリガーできると仮説を立てています。
私たちは、自然言語の問題をコードに変換し、生成されたコードを LLM に要求する一連のプロンプトを提案します。
私たちの実験では、条件付き推論を必要とする複数のデータセットにわたって、GPT 3.5 でコード プロンプトのパフォーマンスが 2.6 ~ 7.7 ポイント向上することがわかりました。
次に、コード プロンプトがどのように条件付き推論能力を引き出すのか、またどの機能を通じてそれを引き出すのかを調べる実験を行います。
プロンプトには、インスタンス テキストのセマンティクスを厳密に表す高品質のコードを伴う自然言語テキストが含まれている必要があることがわかりました。
さらに、コード プロンプトがより効率的で、必要なデモンストレーションが少なく、変数や主要なエンティティの優れた状態追跡をトリガーできることを示します。

要約(オリジナル)

Reasoning is a fundamental component for achieving language understanding. Among the multiple types of reasoning, conditional reasoning, the ability to draw different conclusions depending on some condition, has been understudied in large language models (LLMs). Recent prompting methods, such as chain of thought, have significantly improved LLMs on reasoning tasks. Nevertheless, there is still little understanding of what triggers reasoning abilities in LLMs. We hypothesize that code prompts can trigger conditional reasoning in LLMs trained on text and code. We propose a chain of prompts that transforms a natural language problem into code and prompts the LLM with the generated code. Our experiments find that code prompts exhibit a performance boost between 2.6 and 7.7 points on GPT 3.5 across multiple datasets requiring conditional reasoning. We then conduct experiments to discover how code prompts elicit conditional reasoning abilities and through which features. We observe that prompts need to contain natural language text accompanied by high-quality code that closely represents the semantics of the instance text. Furthermore, we show that code prompts are more efficient, requiring fewer demonstrations, and that they trigger superior state tracking of variables or key entities.

arxiv情報

著者 Haritz Puerto,Martin Tutek,Somak Aditya,Xiaodan Zhu,Iryna Gurevych
発行日 2024-01-18 15:32:24+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク