mshumer/gpt-prompt-engineer

Use prompt errors to improve the prompting

turian opened this issue · 1 comments

turian commented

Let's say a generated prompt gives an error on a test label.

What I sometimes do manually is I ask GPT4 to explain its reasoning, and argue that the correct label should have been FOO.

When it concedes that it was wrong, I then ask it to rewrite the prompt so that it would have gotten this test label correct.

That would be another approach, that is iterative, rather than just randomly picking 10 prompts.

This could be extended further, a little bit based upon the idea of genetic algorithms:

  1. Take the initial prompt, run it, find the errors.
  2. Pick 10 random errors and ask it to rewrite the prompt based upon each.
  3. Ask it to combine different prompts.
  4. Iterate

Feel free to implement something like this, happy to merge in the PR! This makes a lot of sense.