Powering Azure Docs with CoPilot
Background
With the recent announcement at GitHub Universe of the ability to interact with Copilot on public repositories this got me thinking how this capability could be used with how we interact with Azure documentation. Azure docs are hosted in a public repository. This means that in theory we should be able to scope our Copilot interactions with Azure Docs.
Prerequisites
In order to use Copilot in the browser you need to have an active Copilot license or be part of an organization where it is enabled. If you aren't sure you can confirm by clicking your profile picture in the top right and select Copilot.
If you have ana active Copilot subscription your screen will look like:
Another note is CoPilot Chat is not fully available until December so you may or may not have this enabled on your account. Universe 2023: Copilot transforms GitHub into the AI-powered developer platform - The GitHub Blog
Why not Chat GPT?
I want to take a brief pause here to realize, to an extent, this functionality exists within OpenAI and Chat GPT. However, this approach differs from just directly interacting with Chat GPT. This is because GPT4's data is from April 2023 which can be a lifetime at the pace at which Azure moves.
Additionally, for better or worse, GPT will pull in additional resources to provide context. This means not only will you get the information from the incredibly helpful blog post; however, you will also get the article from five years ago covering an outdated way to answer your question.
How To
Navigate to GitHub.com and select the chat with "Chat with GitHub" Icon:
This should bring up a screen like:
Notice that it will by default list your public repositories. This screen is asking you to set the scope for CoPilot to query. This is where we will feed in the MicrosoftDocs/azure-docs repository like:
Now the next screen is asking us for a prompt to ask a question. Let's try one:
Conclusion
Pretty cool right? Hopefully this solution helps demonstrate the power of GitHub Copilot with the knowledgebase behind Azure Docs. For further reading feel free to check out these links:
- Quickstart to working with GitHub Copilot
- GitHub Copilot for Your Codebase
- YouTube Video Customizing the GitHub Copilot experience for your code.