Using GPT-3 to rewrite a regex legibly, construct positive/negative examples, and write Python 3 unit tests, all in a single prompt. Playground link: beta.openai.com/playground/p…
Aug 24, 2022 · 12:22 AM UTC
Note the output isn’t perfect — in this example, one of the positive test cases isn’t matched by the regex. My point with this is that GPT-3 can help you write the code needed to verify its work, and find value despite its imperfections.
Also illustrates importance of ordering in multi-task generations. Note the Python tests exactly the cases we listed above it, even though we didn’t request that explicitly. Each step in a generation guides the later ones, and you can use this your advantage.