Generating perl one-liners using GPT-3 and Pen.el
Summary
I demonstrate generating perl one-liners in emacs using a prompt function and explain parts of the prompt.
<:pp>perl -
This enables you to specify the first part of
the output. <:pp>
is a placed where you want
to include the rest of the prompt in the
beginning of the output.
split-patterns
split-patterns
is a field for describing
patterns to separate multiple prompt results
from one output if the LM multiplexed the
results intentionally or unintentionally.
engine: OpenAI Davinci
This specifies the engine which specifies both the model and the shell command that calls the API.
Demo
Prompt
|
|
Example outputs
These outputs appear to not all be complete
Extract URLs.
Close, but not perfect.
|
|
increment the first number
I will need to also have a validation filter for prompt outputs.
|
|

Much better:
However, none of the one-liners did the desired thing.
There is at least one URL I can see at the top which should be found.
https://openaiapi-site.azureedge.net/public-assets/d/19ff159b15/favicon.svg
Codex, however, could accomplish this with mere descriptions. It’s still very important to design, encode, share and curate these ‘descriptions’. GPT-3 is still very useful practice.
If this article appears incomplete, it may be intentional. Try prompting for a continuation.