Abstract
Recent progress in large language models (LLMs) like GPT-4 and PaLM-2 has brought significant advancements in solving math problems. In particular, OpenAI's latest version of GPT-4, known as GPT-4 Code Interpreter, shows remarkable performance on challenging math datasets. In this paper, we explore the effect of code on enhancing LLMs' reasoning capability by introducing different constraints on the Code Usage Frequency of GPT-4 Code Interpreter. We found that its success can be primarily attributed to its powerful skills in generating and executing code, evaluating the execution result, and rectifying its solution when receiving unreasonable outputs. Based on this, we propose a novel prompting method, explicit code-based self-verification (CSV). This method employs a zero-shot prompt on the GPT-4 Code Interpreter to encourage it to use code to self-verify its answers. In instances where the verification state is "False", the model will automatically amend its solution. Furthermore, we recognize that the states of the verification result indicate the confidence of a solution, which can improve the effectiveness of majority voting. With GPT-4 Code Interpreter and CSV, we achieve an impressive zero-shot accuracy of various mathematical problem-solving benchmarks. © 2024 12th International Conference on Learning Representations, ICLR 2024. All rights reserved.
| Original language | English |
|---|---|
| Title of host publication | The Twelfth International Conference on Learning Representations, ICLR 2024 |
| Publisher | International Conference on Learning Representations, ICLR |
| Number of pages | 27 |
| Publication status | Published - May 2024 |
| Event | 12th International Conference on Learning Representations (ICLR 2024) - Messe Wien Exhibition and Congress Center, Vienna, Austria Duration: 7 May 2024 → 11 May 2024 https://iclr.cc/Conferences/2024 https://openreview.net/group?id=ICLR.cc/2024/Conference |
Publication series
| Name | International Conference on Learning Representations, ICLR |
|---|
Conference
| Conference | 12th International Conference on Learning Representations (ICLR 2024) |
|---|---|
| Place | Austria |
| City | Vienna |
| Period | 7/05/24 → 11/05/24 |
| Internet address |
Bibliographical note
Research Unit(s) information for this publication is provided by the author(s) concerned.Funding
This project is funded in part by National Key R&D Program of China Project 2022ZD0161100, and in part by General Research Fund of Hong Kong RGC Project 14204021.
RGC Funding Information
- RGC-funded