Automatic Prompt Engineer

screen shot for Automatic Prompt Engineer

Large Language Models Are Human-Level Prompt Engineers

Automatic Prompt Engineer (APE) is a groundbreaking tool designed to automate the creation of high-quality prompts for large language models (LLMs). It addresses the critical need for effective prompts, which are often handcrafted by humans and are essential for optimal LLM performance. APE employs an innovative approach inspired by program synthesis, treating instructions as programs that can be automatically generated and optimized. By searching through a pool of candidate prompts generated by an LLM and then selecting prompts based on their evaluated zero-shot performance with another LLM, APE consistently outperforms LLM baselines and rivals or surpasses human-generated prompts across a wide range of NLP tasks.

APE is highly adaptable, offering a flexible interface with different types of templates for evaluation, prompt generation, and demonstrations. Its functionality can be accessed via the find_prompts function, as well as a simplified simple_ape function for streamlined usage. Furthermore, APE has demonstrated its ability to steer models toward enhanced truthfulness and/or informativeness and to improve few-shot learning. With available cost estimations, a Colab notebook, and a GUI, APE is accessible to both researchers and practitioners seeking to leverage the power of optimized prompts in their LLM applications.

https://github.com/keirp/automatic_prompt_engineer

Similar