GitHub Next trails Copilot for Docs

Still combing Stack Overflow for answers? Not for long.
9 November 2023

“Copilot MD-80” by Fly For Fun is licensed under CC BY-NC 2.0.

  • GitHub Copilot for Business to get documentation search.
  • Developers will be able to get bespoke document excerpts.
  • Project maintainers given guidance as to what to document first.

Machine learning algorithms, specifically LLMs, have significant power in that they can ingest large bodies of data and hopefully produce meaningful responses to queries, drawing from their learned body of knowledge. For software developers using GitHub, Microsoft’s Copilot has been providing just such a service; but instead of bodies of free-form text, the ML “brain” has learned from ingesting the code posted to GitHub, the world’s largest repository of open and closed-source code.

That means GitHub Copilot users can use what’s effectively a coding ‘buddy,’ a silicon friend that will suggest code (at least, in some languages) that will aid the development process. Questions such as “Write a Python function that will search a tuple for a value” usually spark responses that significantly reduce the time coders need to get from A to B.

Removing the klutz-factor

Especially useful is the fact that many elements of human error misremembered or forgotten syntax or simple typos are removed. In most cases, the developer needs the knowledge and experience to decide what’s useful and how to use it. Putting aside any concerns around the provenance of Copilot’s learning corpus, it’s a facility that’s proving popular.

Documentation is the latest area of GitHub that’s fallen under the silicon auspices of Copilot. The company’s plans for Copilot for Docs will offer developers access to documentation hosted on the site according to a user’s expertise level, drawn from maintainers’ materials, contextualized and personalized.

Copilot for Docs shows relevant documentation. Soon.

Because everybody needs a copilot at some point.
“Street Life 10/10 – CoPilot” by Fouquier ॐ is licensed under CC BY-NC-ND 2.0.

Additionally, the Copilot for Docs facility will mean that, unless required, only the latest documentation is supplied, so older texts containing changed or removed details for previous versions are not shown. Compared to searching Stack Overflow or forums, this alone should be enough to persuade many to sign up.

The attuning of results is particularly powerful, as expert users won’t have to sift through several beginner-level how-to’s before finding the nugget of information they need. Similarly, beginner or intermediate developers won’t necessarily be offered documentation on advanced use of a library or project.

Links to relevant documents will be earmarked for later reference, so as a project develops, there’s a waiting reference library both for the individual and the team. Questions about a team’s private code could be asked too, as the platform uses GitHub permissions to determine who can access private documentation – already a feature of GitHub Copilot for Business, where private code repositories can be mined for relevant code examples.

“Why doesn’t this work?”

The company has future plans to mine the resources it has at its disposal in the contents of GitHub Issues and GitHub Discussions to add further detail to the documentation it provides. It’s also floated the idea of creating documentation based on the ingestion of code, flagging to a project or library’s maintainers which un- or under-documented areas of their work are being asked about.

That promises to remove the mental barrier many project maintainers have when they know their documentation needs large-scale updating or even creation. If users are constantly querying a particular area of their work, those might be the areas on which they should concentrate first.

Like the use of Copilot for creating code, it will require skilled users to discern exactly what is useful and relevant – neither Copilot nor Copilot for Docs will let complete beginners create complex applications from scratch in no time at all. However, the nature of software development is such that, in many cases, an individual developer’s problems may likely have been solved in the past, and solutions will likely be found somewhere. Copilot for Docs aims to unearth existing knowledge and bring it to the surface in a way that maximizes the time a developer spends creating and minimizes effort spent on merely finding answers.