OpenAI template for asking coding questions?

I am getting better at integrating GPT-3 into a convenient workflow. Right now I actually just use the Playground as a web application, almost like it’s Google Docs or something, a place to write and generate ideas.

I have been using their built-in template “natural language to Python code”; it’s very good but I find myself wanting to ask key questions, such as “What does the Pandas method .concat() do if the Excel sheets have different headers?”

The Python code generator is trained on code but it just writes code, it doesn’t answer questions. The “QA” template answers questions, but it’s not trained on code like Codex is.

They also have a natural language code explainer, but not a code QA as far as I know. So, it’s not far away.

Can anybody provide a solid template for answering coding questions - trained on code like Codex, but geared towards natural language question-and-answer?

2 Likes

Aha:

Prompt
JavaScript chatbot

You: How do I combine arrays?
JavaScript chatbot: You can use the concat() method.
You: How do make an alert appear after 10 seconds?
JavaScript chatbot:

Settings

Enginedavinci-codex

Max tokens60

Temperature0

Top p1.0

Frequency penalty0.5

Presence penalty0.0

Stop sequence

You:

If you look in the examples OpenAI provides for codex they have a Javascript chatbot that answers coding questions. I’ve tried it myself, the key is in writing the prompt in a concise way. I found it has trouble with a long question and with some of the follow up questions you might ask.

1 Like