GitHub Next Logo

GitHub Copilot Labs

A VS Code extension for experimental applications of GitHub Copilot.

What's it for?
ML-powered editor features for developers.
Stage
Completed
Who made it?
Share
This is a concluded exploration by GitHub Next.
GitHub may or or may not release products related to this research in the future.

The Copilot Labs technical preview ended on December 15th, 2023.

Learn more about why it was sunset.

GitHub Copilot is a groundbreaking AI pair programer for developers, but we’re just beginning to explore the future of coding. Over the course of the technical preview, the Copilot team has improved the quality of suggestions and added safety features — but it’s not difficult to see the potential help that Copilot could offer beyond code suggestions.

Today, we’re launching a companion VS Code extension called GitHub Copilot Labs. It is separate from (and dependent on) the GitHub Copilot extension. While Copilot continues to march toward general availability, Labs will be a proving ground for experimental applications of machine learning that improve the developer experience.

Copilot Labs is intended to be experimental in nature, so things might break occasionally. We want to share early features with you to learn what works, what doesn’t, and incorporate your feedback. Labs experiments may or may not graduate into permanent features of GitHub Copilot, but with your help, they can inform future efforts.

What can Copilot Labs do?

Currently, Copilot Labs consists of a VS Code sidebar that houses distinct features. Currently there are four: code explanation, code translation, IDE Brushes and test generation. Once the Copilot Labs extension is installed, you'll see a Copilot icon Copilot icon in the sidebar. Clicking on that will reveal the sidebar, with each experiment in a separate panel.

Explain this code

Every developer learns that writing new code is only a part of software development. Often, the hardest job that developers face is reading and understanding code. Whether it’s because it’s an unfamiliar codebase, or whether the code in question is using a library you might not know, the first step is getting a rough idea of what’s going on, so you can jump in and use the code, or make some changes.

This feature lets you highlight a block of code and ask GitHub Copilot to explain it in plain language:

Create custom prompts

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.

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. 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. The three different “explain” examples showcase strategies that tend to produce useful responses from the model, but this is uncharted territory. We’re excited to see what you use this for.

These articles on prompt design and stop sequences are a great place to start if you want to craft your own presets.

Translate this code

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.

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. Again, this is an experimental feature so we’re interested in hearing how you use it and how you might find it useful.

Test generation

See the TestPilot project page for more information.

We want to hear from you

As always, we’d love your thoughts so we can make Copilot Labs better over time, and find new ways to supercharge your developer experience! Please post your feedback on our discussion forum, and Tweet us @GitHubNext.

✌️ ❤️

GitHub Next
Developer Experience Team