

While the translations are imperfect, we think they can serve as good starting points for developers who are finding logic in the wild and adapting it to their needs in another language. Language translation works similarly to the explain feature: highlight a chunk of code, select the language you’d like to translate that code into, and hit the “Ask Copilot” button.

These articles on prompt design and stop sequences are a great place to start if you want to craft your own presets. We’re excited to see what you use this for. The three different “explain” examples showcase strategies that tend to produce useful responses from the model, but this is uncharted territory. Creating these can feel more like an art than a science! Small changes in the formulation of the prompt and stop sequence can produce very different results.

You can customize the prompt and stop sequence of a query in order to come up with new applications that use Codex to interpret code. We provide a few preset prompts to get you started: three that explain what a particular block of code does, and another that generates example code for calling a function. Your browser does not support the video tag.
