Home / Companies / GitHub / Blog / Post Details
Content Deep Dive

5 tips for writing better custom instructions for Copilot

Blog post from GitHub

Post Details
Company
Date Published
Author
Christopher Harrison
Word Count
2,038
Language
English
Hacker News Points
-
Summary

Christopher Harrison, a Senior Developer Advocate at GitHub, provides insights on optimizing GitHub Copilot's performance by creating effective instruction files, specifically focusing on the copilot-instructions.md file. He emphasizes the importance of providing context to Copilot, akin to onboarding a new team member, by outlining the project's overview, tech stack, coding guidelines, project structure, and available resources. Harrison notes that these instruction files, while not needing to be perfect, greatly enhance Copilot's ability to generate accurate code suggestions. He encourages users to view these sections as starting points and advises experimentation to suit individual projects. Additionally, he suggests using GitHub Copilot itself to draft these instructions, highlighting the probabilistic nature of generative AI and advocating for continual refinement of the instruction files to improve their effectiveness over time.