Building a developer knowledge base
for GitHub Copilot

Pamela Fox

Pamela Fox

Principal Cloud Advocate

Microsoft / GitHub

Said Nikjou

Said Nikjou

AI Forward Deployed Engineer

Microsoft

Pamela Fox

Pamela Fox

Principal Cloud Advocate

Principal Cloud Advocate at Microsoft, focused on Python, AI, and developer tools. Previously, she lectured at UC Berkeley, and worked for Coursera, Khan Academy, and Google.

Said Nikjou

Said Nikjou

AI Forward Deployed Engineer

AI Forward Deployed Engineer at Microsoft, focused on AI agents, GH Copilot, Azure AI, and enterprise automation. He has spent over 15 years helping organizations turn technology innovation into business outcomes.

About you

Turn to your neighbor and introduce yourself:

  • Name
  • Location
  • What coding agents do you usually use?
  • What's your favorite LLM to use with the agent? What's your LEAST favorite?

Imagine joining a new team.

How do you get your questions answered?

How do you make sure you're building the right thing the right way?

The answers to your engineering questions
may require many sources

Code

What behavior exists today?

Evidence: implementation, tests, configuration

GitHub activity

What changed, why, and what remains open?

Evidence: PRs, issues, discussions

Documents

What does the business require or prohibit?

Evidence: requirements, ADRs, policies

Today: Give GitHub Copilot access to each of these sources progressively and see answer quality improve as you equip it with more sources.

Today's agenda

TimeFormatActivity
1:00–1:05WelcomeSettle in and introductions
1:05–1:12PresentationMeet the project and your coding agent
1:12–1:27ExerciseExplore the local code
1:27–1:32PresentationConnect Copilot to GitHub with MCP
1:32–1:45ExerciseAdd GitHub context
1:45–1:55PresentationExplore and connect a document knowledge base
1:55–2:10ExerciseAdd document context
2:10–2:15PresentationUse the combined knowledge base
2:15–2:25ExerciseUse a multi-source knowledge base
2:25–2:30PresentationTake the pattern back to your team

The company: Cocoarynth

A fictional bean-to-bar chocolate company built around transparent sourcing.

  • Makes small-batch, single-origin chocolate
  • Works directly with cacao producers
  • Tracks every origin lot and production batch
  • Connects finished products to wholesale deliveries

The project: Cocoarynth Trace

A web app that follows every batch from origin to shipment

  • Lists production batches and their status
  • Shows cacao origin and production history
  • Associates batches with wholesale shipments
  • Generates an Origin Passport
Cocoarynth Trace chocolate batch list showing products, origins, production dates, statuses, and shipment state

The feature: Origin Passport

A machine-readable document that lets a wholesale retailer connect a chocolate bar batch to its origin and production history.

Cacao origin
→
Production batch
→
Origin Passport
→
Wholesale delivery

Includes approved facts

Product, batch, origin, producer, harvest, certification, production, and shipment details.

Leaves out confidential data

Supplier pricing, personal contacts, internal quality notes, and employee comments.

GitHub Copilot: Choose your client

GitHub Copilot App

Work from a project session connected to the repository.

GitHub Copilot CLI

Work from a terminal in the local repository.

VS Code

Work with the GitHub Copilot chat agent while you have repository open.

Use the same client for every exercise so you can compare across stages.
If you have time after using chosen client, you can experiment with the other two.

Exercise 1: Explore the local code

Using the implementation files and tests, explain what this project does, identify its main components, and describe how it exports an Origin Passport. Cite the files that support your answer.

Local codeImplementation files
what exists
+
Local codeTests
expected behavior

Connect GitHub Copilot to
the GitHub MCP server

Bring PRs, issues, and discussions into the context window.

MCP: Model Context Protocol

MCP is the open standard that tells agent runtimes how to discover and connect to the tools they can call.

AI agent Database Slack GitHub MCP MCP MCP

MCP architecture

MCP host Example: GitHub Copilot MCP client A MCP client B GitHub MCP server Another MCP server ToolsPromptsResourcesSkills ToolsPromptsResourcesSkills MCP MCP

Configure GitHub MCP in Copilot App

1
Open Customize → Add → MCP Server.
2
Name it github, select HTTP, and enter this URL:
https://api.githubcopilot.com/mcp/readonly
3
To enable more tools, add this header:
X-MCP-Toolsets
repos,issues,pull_requests,discussions
Copilot App Add MCP Server dialog with server name github, HTTP server type, URL https://api.githubcopilot.com/mcp/readonly, and header X-MCP-Toolsets set to repos,issues,pull_requests,discussions

Configure GitHub MCP in Copilot CLI

GitHub MCP is built in with read-only tools enabled by default.

1. Start a new session

Add the Discussions toolset:

copilot --add-github-mcp-toolset discussions

2. Verify the server

From the active Copilot CLI session:

/mcp show github-mcp-server

Confirm tools are available for repositories, issues, pull requests, and discussions.

Configure GitHub MCP in VS Code

1. Add .vscode/mcp.json

{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/readonly",
      "headers": {
        "X-MCP-Toolsets": "repos,issues,pull_requests,discussions"
      }
    }
  }
}

2. Start and verify

1
Select Start above the server definition.
2
Authorize with the event-provided GitHub account.
3
Confirm the github server is running.
4
Open Copilot Chat tools and find the GitHub tools.

Exercise 2: Add GitHub context

Use GitHub MCP to investigate this repository. Why was the Origin Passport export built this way, and what related work remains open? Cite the relevant pull request, issue, and discussion.

GitHub MCPMerged PR
original choice
+
GitHub MCPOpen issue
remaining work
+
GitHub MCPDiscussion
field policy

Connect GitHub Copilot to
a document knowledge base

The pilot: Mapayça Markets

Mapayça Markets logo

Mapayça Markets is a grocery store that wants to sell Cocoarynth chocolate bars.

The pilot request

Cocoarynth will supply its Ecuador Esmeraldas 72% chocolate bar.

Each shipment needs an Origin Passport that Mapayça's inventory system can import without manual conversion.

The question: Can Cocoarynth Trace support the pilot today?

The missing context lives in documents

First page of the Mapayça Markets Traceability Pilot Requirements document

Mapayça pilot requirements

Defines the required CSV format, schema, dates, and acceptance criteria.

First page of the ADR-007 Immutable Origin Passport Snapshots document

Architecture decision

Explains why an Origin Passport is an immutable snapshot.

First page of the Wholesale Traceability Data Sharing Policy document

Data-sharing policy

Separates shareable traceability facts from confidential data.

First page of the Origin Passport Support Runbook document

Support runbook

Guides validation, regeneration, and import troubleshooting.

Foundry IQ ingests documents into a search index

A cloud pipeline turns source files into searchable, citable chunks.

Blob Storage

Stores a retrievable copy of each source document.

Search indexer

Detects additions and updates, then runs the ingestion pipeline.

Content Understanding

Extracts text, tables, images, structure, and metadata.

Chunk + vectorize

Creates semantic chunks and computes embeddings.

Search index

Stores text, vectors, metadata, and source references together.

For this workshop, the ingestion pipeline has already run.

Content Understanding preserves more than plain text

Rich extraction

Reads text and OCR, preserves tables as structured HTML, and describes images and diagrams.

Semantic chunking

Splits on meaningful document boundaries instead of arbitrary character counts.

Grounding metadata

Keeps document identity, page location, and source references with every chunk.

Source document
→
Structured extraction
→
Semantic chunks

Hybrid search improves relevance

Foundry IQ combines exact-term matching with semantic similarity, then reranks the fused results.

QueryWhat are the CSV export requirements?
→
Keyword searchFinds exact terms such as CSV, field names, and identifiers.
Vector searchFinds passages with similar meaning even when wording differs.
→
Reciprocal Rank FusionCombines both ranked result lists.
→
Semantic rerankingPromotes the chunks most relevant to the full question.

Search the document KB over MCP

Each Foundry IQ knowledge base exposes one MCP endpoint with one retrieval tool.


<search>.search.windows.net
  /knowledgebases
  /cocoarynth-kb-docs
  /mcp

One URL per knowledge base.

→

{
  "name": "knowledge_base_retrieve",
  "arguments": {
    "query_variants": [
      "CSV export requirements",
      "Mapayça import format"
    ]
  }
}

Copilot writes the queries.

→

[
  { "ref_id": "0",
    "content": "…CSV…" },
  { "ref_id": "1",
    "content": "…pricing…" }
]

Includes matching chunks, plus one reference block per ref_id.

The workshop portal

A window into the Foundry IQ indexes and knowledge bases behind this workshop.

Browse documents

See the source files in each corpus.

View document chunks

See the extracted passages and page metadata.

Search the index

Run hybrid search and compare ranked passages.

Cocoarynth Trace workshop portal showing project requirements, engineering practices, and combined knowledge base navigation

Exercise 3: Add document context

Can Cocoarynth support Mapayça Markets' traceability import today? Identify the blocker and related open work, then cite the pilot requirements and current implementation evidence.

Foundry IQPilot requirements
retailer needs
+
Local codeImplementation
current behavior
+
GitHub MCPOpen issue
related work

Connect GitHub Copilot to
a multi-source knowledge base

Engineering practices live in a second corpus

First page of the API Design and Export Contracts Guide

API and export contracts

CSV serialization, validation, and errors.

Title slide of the Engineering Culture presentation

Engineering culture

Review, testing, rollout, and monitoring.

First page of the Product UI and Accessibility Guide

UI and accessibility

Keyboard, status, and error states.

First page of the React and TypeScript Engineering Guide

React and TypeScript

Frontend implementation and tests.

Foundry IQ knowledge base

An agentic retrieval engine that can query across multiple sources.

Input Conversation Steering instructions Retrieval planning Search query 1 Search query 2 Search Knowledge sources Project requirements Search Index Engineering practices Search Index Output Merged results Activity log

Retrieval planning in action

What product requirements and company engineering standards should guide CSV Origin Passport support?
→
Project requirements
  • CSV Origin Passport product requirements support
  • Origin Passport CSV requirements
  • CSV support passport requirements
Engineering practices
  • CSV support standards accessibility API frontend
  • React frontend engineering standards forms file upload CSV
  • engineering standards data import CSV accessibility
→
8 references, merged and reranked
  1. 3.94Pilot requirements · “Traceability Pilot Requirements…”
  2. 3.38Pilot requirements · “Example CSV: origin_passport_id…”
  3. 2.48Architecture decision · “An Origin Passport is an externally shareable statement…”
  4. 2.46Data-sharing policy · “Origin Passport baseline…”
  5. 2.42API design guide · “Generate CSV with a standards-based library…”

One combined KB, or two MCP servers?

Two MCP serversOne combined KB
Serverscocoarynth-kb-docs
cocoarynth-kb-engineering-practices
cocoarynth-kb-all over both indexes
Source choiceCopilot decides which server to callFoundry IQ plans which index to search
ParallelismDepends on the agent and modelQueries always run in parallel
MergingCopilot merges the evidence itselfFoundry IQ uses specialized model for result merging and reranking

One combined KB gives every agent parallel retrieval and Foundry IQ reranking.

Exercise 4: Use multi-source knowledge base

Create a grounded PRD using evidence from direct GitHub MCP and cocoarynth-kb-all. Distinguish required behavior, current implementation, and recommendations, then cite the sources.

Foundry IQPilot requirements
required behavior
+
Foundry IQEngineering practices
team standards
+
Local codeImplementation
current behavior
+
GitHub MCPIssues + PRs
planned work

Next steps

Continue after the workshop

This week

Use the workshop environment

  • Workshop GitHub account: take your login credentials home
  • Workshop portal URL
  • Secrets doc with endpoints and key
After this week

Deploy your own

  • Provision the Azure infrastructure in your own subscription
  • Ingest documents and create the knowledge bases
  • Connect Copilot with your own GitHub account

Coding agents need context beyond code

Local code

What exists

Available in the local file system

GitHub MCP

What changed, and why

Available over an authenticated MCP server

Foundry IQ

What the organization needs

Searchable only after indexing into a knowledge base

Connect existing MCP servers for live systems.
Build indexed knowledge bases for unstructured documents.

More MCP servers to connect

Azure DevOps Microsoft

Work items, repos, pipelines, and wikis.

Work IQ Microsoft

Microsoft 365 email, meetings, and files.

Linear Third party

Issues, projects, cycles, and comments.

Slack Third party

Messages, channels, threads, canvases.

Learning resources

Questions?