How to Optimize Co-Pilot Usage

How to Optimize Co-Pilot Usage

In the dynamic landscape of software development, continuous innovation reshapes the methodologies and tools embraced by programmers worldwide. Among these transformative advancements stands GitHub Copilot, an unprecedented tool poised to redefine coding practices through the integration of artificial intelligence. Developed collaboratively by GitHub and OpenAI, GitHub Copilot represents a pivotal stride towards streamlining the coding experience. GitHub Copilot comes with CoPilot chat as well.

Having used Copilot for quite some time now, I've realized there are right and wrong ways of utilizing it. I use Visual Studio Code with chat, and I've fallen in love with this tool. Additionally, I've noticed that the more you use Copilot, the better it becomes at understanding your coding style and preferences. Train Copilot by providing feedback on its suggestions to improve its accuracy over time. Suggestions can be given by using the like button that appears after each response. Here are some tips :

  • Do not anticipate CoPilot to generate complete code solutions.

So don’t say “Give me a code to build me a full stack website in angular and NodeJS”. Bad Idea. It’s not going to work.

  • Don’t misuse CoPilot tools

For example: I can use the comment to prompt the ghost code like below, but this is not the most efficient way to do it.

Article content

Instead, use inline chat

Article content

  • Utilize the CoPilot Chat tool for obtaining general suggestions.

Article content

  • Avoid duplicating existing prompts unnecessarily

For example: You can always use inline suggestions and ask as below but not a great idea.

Article content

Instead, use /fix. If you carefully watch the suggestion prompted will be different. /fix works better. Similarly, you need to use /doc, /explain, /tests rather than “give me the documentation of this function” or “explain me this code” or “give me the test code”.

  • Always ask related questions in the single chat window

In the chat room on the left-hand side, always ask questions related to a particular subject of your interest w.r.t your file opened on the right-hand side. If you want to chat on a separate subject, create a new chat session. Use the workspace tag to get suggestions related to your codebase rather than general technical suggestions.

Article content

  • Give feedback, don’t ignoreThis will generate better suggestions the next time you ask a question.

Article content


Dilip Samanta exciting this starts Creating more space for creativity for people.. thanks for sharing

#copilot is just so brilliant, be it VS or office365 or teams.... I hope it doesn't make people less smarter and AI dependent

To view or add a comment, sign in

More articles by Dilip Samanta

Others also viewed

Explore content categories