Chapter 7. Keeping Copilot Timely and Relevant
The range of functionality and interactivity provided by GitHub Copilot is truly impressive. However, the responses it generates can sometimes be less impressive (and less useful) if they are not timely and relevant. As good as the AI can be, at times you may need to take extra steps to steer it.
For example, in certain instances, you may need to direct Copilot to focus on certain portions of your content to get targeted answers. Or you may need to augment its training to get responses more relevant to your codebase. And you may need to pay extra attention to be aware when Copilot is suggesting code that may be out of date or referencing features that are no longer supported.
In this chapter, we’re going to look at how to manage interaction with Copilot in these situations. You can leverage certain strategies and functionality to help ensure relevancy and timeliness in your interactions with Copilot. Certain approaches can compensate when Copilot may not be aware of recent changes or referencing the right sources.
All of this is aimed at helping Copilot have the most usable set of context in order to provide the most useful responses for what we’re asking of it. In the next few pages, we’ll look at the following areas related to Copilot’s use of context:
- Where context originates
- How timeliness and relevancy may be affected
- User-based coping strategies
- Adding context to make code more relevant
By its very definition, generative
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access