| title | Creating and managing GitHub Copilot knowledge bases | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| shortTitle | Create knowledge bases | ||||||||||||||
| intro | Learn how to create and manage knowledge bases, which allow you to bring together Markdown documentation across one or more repositories, and then use that knowledge base as context for {% data variables.copilot.copilot_chat_short %}. | ||||||||||||||
| versions |
|
||||||||||||||
| product | {% data reusables.copilot.ce-product-callout %} | ||||||||||||||
| topics |
|
||||||||||||||
| redirect_from |
|
||||||||||||||
| contentType | how-tos |
[!IMPORTANT] Beginning September 12, 2025, knowledge bases will be {% data variables.release-phases.retired %} and fully replaced by {% data variables.copilot.copilot_spaces %}. {% data variables.copilot.copilot_spaces_short %} let you combine code and free-text content—like transcripts or specs—and can be created by any {% data variables.product.prodname_copilot_short %} user, not just organization owners. They’re a good option for more focused or task-specific use cases. See AUTOTITLE.
Knowledge bases are a way to bring together Markdown documentation across one or more repositories. When you ask a question in {% data variables.copilot.copilot_chat_short %} with a knowledge base selected, {% data variables.product.prodname_copilot_short %} will search the knowledge base for relevant information and synthesize a response.
You can create a knowledge base from a single repository or a selection of repositories. You can create a knowledge base using public, private, and/or internal repositories.
Knowledge bases you create will be accessible by all organization members with a {% data variables.copilot.copilot_enterprise_short %} plan. When an organization member uses a knowledge base as context in {% data variables.copilot.copilot_chat %}, the response will only use data from repositories that the organization member has read access to.
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %}
-
In the left sidebar, click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %} then click Knowledge bases.
-
To the right of "Knowledge bases", click New knowledge base.
-
In the "Name" field, enter a unique name for the knowledge base. Optionally, in the "Description" field, you can add a description for the knowledge base.
-
Under "Content", to see a full list of available repositories, click Select repositories.
-
To select a repository or repositories, click the checkbox next to the repository name. When you're finished selecting repositories, click Apply.
-
Optionally, you can specify particular paths within the selected repositories for searches. When a search is conducted using the knowledge base, only the files located in those designated paths will be included in the results. For more information on specifying repository paths, see AUTOTITLE
- Click Edit file paths.
- List the paths you want to include in the knowledge base, one path per line. When you're finished, click Apply.
-
Click Create knowledge base.
Organization owners can update a knowledge base created in their organization.
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %}
- In the left sidebar, click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %} then click Knowledge bases.
- To the right of the knowledge base you want to edit, click {% octicon "pencil" aria-label="The pencil symbol" %}.
- Make your desired changes to your knowledge base.
- Click Update knowledge base.
Organization owners can delete a knowledge base created in their organization.
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %}
- In the left sidebar, click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %} then click Knowledge bases.
- To the right of the knowledge base you want to delete, click {% octicon "trash" aria-label="The trash symbol" %}.
- In the "Confirm deletion" dialog box, review the information and click Delete.



