Coder Social home page Coder Social logo

xiaopengli1 / plan-and-solve-prompting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from agi-edgerunners/plan-and-solve-prompting

0.0 0.0 0.0 23.78 MB

Code for our ACL 2023 Paper "Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models".

Home Page: https://arxiv.org/abs/2305.04091

Python 100.00%

plan-and-solve-prompting's Introduction

Plan-and-Solve-Prompting

Code for our ACL 2023 Paper "Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models".

πŸ”₯ We are honored to announce that Plan-and-Solve Prompting has been added to the core library of LangChain, that is, Plan-and-Execute. Find out what people are saying about it on Twitter and AI Daily Paper.

showcase_ps_prompting

πŸ€– Run Plan-and-Solve-Prompting

Set an api-key of OpenAI API in the file apikeys.json

python main.py --prompt_id 201 \
--dataset SVAMP \
--engine text-davinci-003 \
--learning_type zero_shot

πŸ€– Run Plan-and-Solve-Prompting with threads

For faster inference, set 8 different api-keys of OpenAI API in the file apikeys.json

python main_threads.py --prompt_id 201 \
--dataset SVAMP \
--engine text-davinci-003 \
--learning_type zero_shot

showcase_ps_prompting_exp

πŸ§‘β€πŸ³ Prompts

Prompt_ID Type Trigger Sentence
101 CoT Let's think step by step.
201 PS Let's first understand the problem and devise a plan to solve the problem. Then, let's carry out the plan to solve the problem step by step.
301 PS+ Let's first understand the problem, extract relevant variables and their corresponding numerals, and devise a plan. Then, let's carry out the plan, calculate intermediate variables (pay attention to correct numeral calculation and commonsense), solve the problem step by step, and show the answer.
302 PS+ Let's first understand the problem, extract relevant variables and their corresponding numerals, and devise a complete plan. Then, let's carry out the plan, calculate intermediate variables (pay attention to correct numerical calculation and commonsense), solve the problem step by step, and show the answer.
303 PS+ Let's devise a plan and solve the problem step by step.
304 PS+ Let's first understand the problem and devise a complete plan. Then, let's carry out the plan and reason problem step by step. Every step answer the subquestion, "does the person flip and what is the coin's current state?". According to the coin's last state, give the final answer (pay attention to every flip and the coin’s turning state).
305 PS+ Let's first understand the problem, extract relevant variables and their corresponding numerals, and make a complete plan. Then, let's carry out the plan, calculate intermediate variables (pay attention to correct numerical calculation and commonsense), solve the problem step by step, and show the answer.
306 PS+ Let's first prepare relevant information and make a plan. Then, let's answer the question step by step (pay attention to commonsense and logical coherence).
307 PS+ Let's first understand the problem, extract relevant variables and their corresponding numerals, and make and devise a complete plan. Then, let's carry out the plan, calculate intermediate variables (pay attention to correct numerical calculation and commonsense), solve the problem step by step, and show the answer.

⭐ Star History

Star History Chart

😸 Cite

If you find Plan-and-Solve-Prompting useful for your research and applications, please kindly cite using this BibTeX:

@article{wang2023plan,
  title={Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models},
  author={Wang, Lei and Xu, Wanyu and Lan, Yihuai and Hu, Zhiqiang and Lan, Yunshi and Lee, Roy Ka-Wei and Lim, Ee-Peng},
  journal={arXiv preprint arXiv:2305.04091},
  year={2023}
}

plan-and-solve-prompting's People

Contributors

demoleiwang avatar hzq950419 avatar lyh-yf avatar wanyu778 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.