Title: Hi HN,<p>One of the things that frustrates me about Copilot is that all tasks posed to it must be in the form of a completion. By writing clever comments you can get it to generate a few lines of code or a short function body, but you never get coherent long-form generations just from mashing the tab key.<p>I’m working on a different approach. Instead of requiring you specify your code generation task through stilted comments, you can use GPT-3 to fill in what I call “instructional templates”. They’re like f-strings, except the English goes on the inside and the Python goes on the outside. Additionally, each instruction’s location and surrounding context can aid in interpreting it, allowing instructions to be impressively terse.<p>I’ve collected 10 examples of the method on a Twitter thread here. Most code examples are in Python, but I also demonstrate generating CSV, NDJSON, R, Markdown, and HTML: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;goodside&#x2F;status&#x2F;1559801520773898240?s=21&amp;t=-r-dR8pkhZ3lfCpeLOWqvw" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;goodside&#x2F;status&#x2F;1559801520773898240?s=21...</a><p>I also have a few examples of more creative, non-program output in HTML and Markdown in this thread: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;goodside&#x2F;status&#x2F;1560953991722418177?s=21&amp;t=-r-dR8pkhZ3lfCpeLOWqvw" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;goodside&#x2F;status&#x2F;1560953991722418177?s=21...</a><p>Interested in any feedback, especially from anyone who’s tried to apply my method to their own problems.
Upvote: