Code Prompting: a Neural Symbolic Method for Complex Reasoning in Large Language Models. Hu, Y., Yang, H., Lin, Z., & Zhang, M. May, 2023. arXiv:2305.18507 [cs]
Paper doi abstract bibtex Large language models (LLMs) have scaled up to unlock a wide range of complex reasoning tasks with the aid of various prompting methods. However, current prompting methods generate natural language intermediate steps to help reasoning, which can cause imperfect task reduction and confusion. To mitigate such limitations, we explore code prompting, a neural symbolic prompting method with both zero-shot and few-shot versions which triggers code as intermediate steps. We conduct experiments on 7 widely-used benchmarks involving symbolic reasoning and arithmetic reasoning. Code prompting generally outperforms chain-of-thought (CoT) prompting. To further understand the performance and limitations of code prompting, we perform extensive ablation studies and error analyses, and identify several exclusive advantages of using symbolic promptings compared to natural language. We also consider the ensemble of code prompting and CoT prompting to combine the strengths of both. Finally, we show through experiments how code annotations and their locations affect code prompting.
@misc{hu_code_2023,
title = {Code {Prompting}: a {Neural} {Symbolic} {Method} for {Complex} {Reasoning} in {Large} {Language} {Models}},
shorttitle = {Code {Prompting}},
url = {http://arxiv.org/abs/2305.18507},
doi = {10.48550/arXiv.2305.18507},
abstract = {Large language models (LLMs) have scaled up to unlock a wide range of complex reasoning tasks with the aid of various prompting methods. However, current prompting methods generate natural language intermediate steps to help reasoning, which can cause imperfect task reduction and confusion. To mitigate such limitations, we explore code prompting, a neural symbolic prompting method with both zero-shot and few-shot versions which triggers code as intermediate steps. We conduct experiments on 7 widely-used benchmarks involving symbolic reasoning and arithmetic reasoning. Code prompting generally outperforms chain-of-thought (CoT) prompting. To further understand the performance and limitations of code prompting, we perform extensive ablation studies and error analyses, and identify several exclusive advantages of using symbolic promptings compared to natural language. We also consider the ensemble of code prompting and CoT prompting to combine the strengths of both. Finally, we show through experiments how code annotations and their locations affect code prompting.},
urldate = {2023-06-25},
publisher = {arXiv},
author = {Hu, Yi and Yang, Haotong and Lin, Zhouchen and Zhang, Muhan},
month = may,
year = {2023},
note = {arXiv:2305.18507 [cs]},
keywords = {artificial intelligence, computation and language, large language models, uses sympy},
}
Downloads: 0
{"_id":"43jnSDtyddi6nKzmx","bibbaseid":"hu-yang-lin-zhang-codepromptinganeuralsymbolicmethodforcomplexreasoninginlargelanguagemodels-2023","author_short":["Hu, Y.","Yang, H.","Lin, Z.","Zhang, M."],"bibdata":{"bibtype":"misc","type":"misc","title":"Code Prompting: a Neural Symbolic Method for Complex Reasoning in Large Language Models","shorttitle":"Code Prompting","url":"http://arxiv.org/abs/2305.18507","doi":"10.48550/arXiv.2305.18507","abstract":"Large language models (LLMs) have scaled up to unlock a wide range of complex reasoning tasks with the aid of various prompting methods. However, current prompting methods generate natural language intermediate steps to help reasoning, which can cause imperfect task reduction and confusion. To mitigate such limitations, we explore code prompting, a neural symbolic prompting method with both zero-shot and few-shot versions which triggers code as intermediate steps. We conduct experiments on 7 widely-used benchmarks involving symbolic reasoning and arithmetic reasoning. Code prompting generally outperforms chain-of-thought (CoT) prompting. To further understand the performance and limitations of code prompting, we perform extensive ablation studies and error analyses, and identify several exclusive advantages of using symbolic promptings compared to natural language. We also consider the ensemble of code prompting and CoT prompting to combine the strengths of both. Finally, we show through experiments how code annotations and their locations affect code prompting.","urldate":"2023-06-25","publisher":"arXiv","author":[{"propositions":[],"lastnames":["Hu"],"firstnames":["Yi"],"suffixes":[]},{"propositions":[],"lastnames":["Yang"],"firstnames":["Haotong"],"suffixes":[]},{"propositions":[],"lastnames":["Lin"],"firstnames":["Zhouchen"],"suffixes":[]},{"propositions":[],"lastnames":["Zhang"],"firstnames":["Muhan"],"suffixes":[]}],"month":"May","year":"2023","note":"arXiv:2305.18507 [cs]","keywords":"artificial intelligence, computation and language, large language models, uses sympy","bibtex":"@misc{hu_code_2023,\n\ttitle = {Code {Prompting}: a {Neural} {Symbolic} {Method} for {Complex} {Reasoning} in {Large} {Language} {Models}},\n\tshorttitle = {Code {Prompting}},\n\turl = {http://arxiv.org/abs/2305.18507},\n\tdoi = {10.48550/arXiv.2305.18507},\n\tabstract = {Large language models (LLMs) have scaled up to unlock a wide range of complex reasoning tasks with the aid of various prompting methods. However, current prompting methods generate natural language intermediate steps to help reasoning, which can cause imperfect task reduction and confusion. To mitigate such limitations, we explore code prompting, a neural symbolic prompting method with both zero-shot and few-shot versions which triggers code as intermediate steps. We conduct experiments on 7 widely-used benchmarks involving symbolic reasoning and arithmetic reasoning. Code prompting generally outperforms chain-of-thought (CoT) prompting. To further understand the performance and limitations of code prompting, we perform extensive ablation studies and error analyses, and identify several exclusive advantages of using symbolic promptings compared to natural language. We also consider the ensemble of code prompting and CoT prompting to combine the strengths of both. Finally, we show through experiments how code annotations and their locations affect code prompting.},\n\turldate = {2023-06-25},\n\tpublisher = {arXiv},\n\tauthor = {Hu, Yi and Yang, Haotong and Lin, Zhouchen and Zhang, Muhan},\n\tmonth = may,\n\tyear = {2023},\n\tnote = {arXiv:2305.18507 [cs]},\n\tkeywords = {artificial intelligence, computation and language, large language models, uses sympy},\n}\n\n\n\n\n\n\n\n","author_short":["Hu, Y.","Yang, H.","Lin, Z.","Zhang, M."],"key":"hu_code_2023","id":"hu_code_2023","bibbaseid":"hu-yang-lin-zhang-codepromptinganeuralsymbolicmethodforcomplexreasoninginlargelanguagemodels-2023","role":"author","urls":{"Paper":"http://arxiv.org/abs/2305.18507"},"keyword":["artificial intelligence","computation and language","large language models","uses sympy"],"metadata":{"authorlinks":{}}},"bibtype":"misc","biburl":"https://bibbase.org/zotero-group/nicoguaro/525293","dataSources":["YtBDXPDiQEyhyEDZC","tpWeaaCgFjPTYCjg3"],"keywords":["artificial intelligence","computation and language","large language models","uses sympy"],"search_terms":["code","prompting","neural","symbolic","method","complex","reasoning","large","language","models","hu","yang","lin","zhang"],"title":"Code Prompting: a Neural Symbolic Method for Complex Reasoning in Large Language Models","year":2023}