Writing effective prompts is key to getting the most out of AI systems like ChatGPT and Midjourney. GPT Prompt Engineer makes optimizing prompts easy by automatically generating and rating options.
This open-source project asks you to describe your desired task and test cases. It then uses GPT-4 or GPT-3.5 Turbo to generate multiple possible prompts.
Each prompt is tested against your examples and rated using an ELO score. This lets you easily see which prompts perform best for your use case.
How to use it:
1. Launch the notebook through Google Colab or as a local Jupyter notebook instance.
2. Locate the line
openai.api_key = "ADD YOUR KEY HERE" and enter your OpenAI API key.
3. Clearly outline your use case by succinctly describing your task. Subsequently, input specific test cases—these are prompts you’d want AI responses for.
4. Decide on the number of prompts you want to generate. A tip: starting with ten prompts is usually cost-effective and efficient.
5. You can generate, test, and rank prompts by invoking the function
generate_optimal_prompt(description, test_cases, number_of_prompts).
6. Once done, a table featuring the ELO ratings will be showcased, with prompts listed in order of efficacy. Higher ratings equate to superior prompts.