Hi GitHub CoPilot! -Chatting with the AI pair programmer
OpenAI has released into this world an incredible AI — The GitHub CoPilot. An AI powered programming assistant that is much more capable than the usual IDE autocomplete features. This has to be one of the coolest AI systems. Check it out here.
CoPilot is still in testing and you can apply to be a tester. As mentioned on the website, OpenAI plans to eventually monetise this system (Oh NO!). I was lucky enough to get accepted as a tester. Here is how you go on chatting with it.
Note: GitHub CoPilot is trained on billions of lines of code, and is not intended for chatting. This feature might be discontinued in the feature. This is just an experiment to see what kind of information and biases are encoded in the system.
How to setup a chat with CoPilot?
- Apply for the technical preview here
- After you get accepted as a tester, install the CoPilot extension on Visual Studio Code
- Open a new file with .yaml extension
- Start asking questions in the below format
Me: <Question>
AI:
and CoPilot with autocomplete it for you!
If the replies gets repetitive, open a new file, or use prompts for CoPilot to complete like below.
Note that I didn’t use any suggestive prompts for the 2 snippets in this article.
Below are some fun snippets.
We have the solution to the chicken-egg problem! CoPilot understands it’s limitations and delegates science questions to the ‘Science AI’.
In this simple test, CoPilot seems to be quite smart. It refused to show any preference between John or Mary in the first few questions and simply picked the first option.
Due to my frequent questions about programmers, it learned to produce that output frequently. Does that suggest CoPilot will mimic the user?
Lastly, CoPilot just refused to suggest anything in the last question. Is that a smart AI move? We’ll see.
Chatting with CoPilot did get repetitive after a while, I guess I should stick to coding.
The team behind CoPilot has done a lot to tackle biased, discriminatory or offensive output. As mentioned on their website, they have taken appropriate measures to be preventive and asked the testers to flag any such instances.