Plan-and-Solve-Prompting  by AGI-Edgerunners

Research paper code for improved zero-shot chain-of-thought reasoning

created 2 years ago
679 stars

Top 50.9% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides the code for the ACL 2023 paper "Plan-and-Solve Prompting," which enhances zero-shot chain-of-thought reasoning in large language models. It offers a structured approach to problem-solving for researchers and developers working with LLMs, aiming to improve accuracy and interpretability in complex reasoning tasks.

How It Works

The Plan-and-Solve (PS) prompting strategy guides LLMs through a two-stage process: first, devising a plan to tackle a problem, and second, executing that plan step-by-step. This approach contrasts with standard chain-of-thought by explicitly separating planning from execution, which the authors argue leads to more robust and accurate reasoning, particularly for tasks requiring multi-step problem decomposition.

Quick Start & Requirements

  • Install via pip.
  • Requires an OpenAI API key, configured in apikeys.json.
  • Supports text-davinci-003 engine and datasets like SVAMP.
  • For faster inference, multiple API keys can be used with main_threads.py.
  • Official documentation and integration with LangChain's "Plan-and-Execute" are available.

Highlighted Details

  • Implements various PS prompt templates (Prompt_ID 101-307) with increasing complexity and specificity.
  • Demonstrates improved zero-shot reasoning capabilities over standard CoT prompting.
  • Integrated into LangChain's core library as "Plan-and-Execute."

Maintenance & Community

The project is associated with the ACL 2023 paper and has seen community interest, as indicated by Twitter discussions. Further community engagement channels are not explicitly listed.

Licensing & Compatibility

The repository's license is not specified in the README. Compatibility for commercial use or closed-source linking would require clarification on the licensing terms.

Limitations & Caveats

The code is primarily tied to OpenAI's text-davinci-003 model and may require adaptation for other LLMs. The effectiveness of the PS prompting strategy is dependent on the quality of the generated plan and the LLM's ability to follow it.

Health Check
Last commit

2 years ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
25 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Calvin French-Owen Calvin French-Owen(Coounder of Segment), and
2 more.

ReAct by ysymyth

0.7%
3k
GPT-3 prompting code for ReAct research paper
created 2 years ago
updated 1 year ago
Feedback? Help us improve.