Automatic Model Selection with Large Language Models for Reasoning

James Xu Zhao, Yuxi Xie, Kenji Kawaguchi, Junxian He, Michael Qizhe Xie
5/23/2023
cs.CLcs.AI

Official code: XuZhao0/Model-Selection-Reasoning (30 stars, last commit 2023-12-23).

Abstract

Chain-of-Thought (CoT) and Program-Aided Language Models (PAL) represent two distinct reasoning methods, each with its own strengths. CoT employs natural language, offering flexibility and interpretability, while PAL utilizes programming language, yielding more structured and rigorous logic. We introduce a model selection method to combine the best of both worlds by employing a large language model (LLM) to dynamically select between them. Our theoretical analysis underscores the feasibility of this method, which is further corroborated by empirical results. Our proposed method demonstrates significant performance improvements across eight reasoning datasets with Codex, ChatGPT, and GPT-4. Additionally, our method is complementary to self-consistency; when integrated, it can further enhance performance while significantly reducing computation costs. Moreover, we achieve new state-of-the-art results on GSM8K and SVAMP, with respective accuracies of 96.8% and 93.7%. Our code, data and prompts are available at https://github.com/XuZhao0/Model-Selection-Reasoning

View on arXivView PDF

Code Implementations(1)

Model Selection with Large Language Models for Reasoning (EMNLP2023 Findings)

305Shell, PythonMay 23, 20232 years ago

Similar Papers

Cite this paper

@article{zhao2023automatic,
  title  = {Automatic Model Selection with Large Language Models for Reasoning},
  author = {James Xu Zhao and Yuxi Xie and Kenji Kawaguchi and Junxian He and Michael Qizhe Xie},
  year   = {2023},
  eprint = {2305.14333},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.14333v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.14333.svg)](https://codeofpaper.com/paper/2305.14333)

Discussion