/opro_prompt_optimization

Google DeepMind OPRO paper implementation

Primary LanguagePythonApache License 2.0Apache-2.0

OPRO Prompt Optimization

Implementing the GSM8k prompt optimization from the paper "Large Language Models as Optimizers".

Prerequisites

  • Python 3.9+
  • OpenAI API key

Installation

Run pip install -r requirements.txt to install the required packages.

Usage

Run python main.py to run the GSM8k prompt optimization.

Citations

@misc{yang2023large, title={Large Language Models as Optimizers}, author={Chengrun Yang and Xuezhi Wang and Yifeng Lu and Hanxiao Liu and Quoc V. Le and Denny Zhou and Xinyun Chen}, year={2023}, eprint={2309.03409}, archivePrefix={arXiv}, primaryClass={cs.LG} }