3D cloud and datacenter explorer
Pick a scene, then step through it. Drag to turn the view, and press the “…what if” buttons to break things on purpose. Every step is also written out below the scene.
GitHub Copilot: from your keystroke to a suggestion
Learn it in “The Copilot Code Suggestion Lifecycle and LLM Limits” →You type, then pause
Copilot doesn’t read your mind. When you pause while typing, the Copilot extension in your IDE starts a request for a completion.
The IDE builds a prompt
The extension gathers context: code before and after the cursor, the file name and language, and related snippets from other open tabs. That bundle is the prompt. A model has a limited context window, so the extension picks what matters most.
Content exclusions are checked
An admin can exclude paths or whole repositories. Excluded files are not used as context, and Copilot gives no inline suggestions inside them.
The Copilot proxy
The prompt goes over HTTPS to a GitHub-hosted proxy. It authenticates the request and runs pre-filters, for example for harmful or offensive content and prompt-injection attempts, before anything reaches the model.
The model predicts code
A large language model predicts the most likely next tokens. It matches patterns from training data and your context; it doesn’t run, test or truly understand your code. That’s why output can be wrong, outdated or insecure.
Post-processing filters
Before you see it, the response is post-processed: checks for code quality and common insecure patterns, offensive content, and (if your policy says Block) a check for matches with public code of about 150 characters or more.
Ghost text: accept or reject
The suggestion appears as grey ghost text. Tab accepts, Esc dismisses, Alt+] / Alt+[ cycle alternatives, Ctrl+→ accepts word by word. You decide what goes into your code.
What data is kept
Prompts and suggestions are encrypted in transit. For Copilot Business and Enterprise, your code is not used to train GitHub’s models, and prompts and suggestions from IDE code completion are not retained after the response. Engagement data (accepts, rejects, errors) is kept to run and improve the service and to power usage metrics.
Prompt crafting: what you give Copilot decides what you get
Learn it in “Prompt Structure and Context for GitHub Copilot” →A vague prompt
Copilot only knows what is in the prompt. “Write a function” leaves it to guess the language, inputs, outputs and rules, so you get something generic.
Structure: goal, context, constraints
A good prompt has a goal (what and why), context (which code, which framework) and constraints (style, edge cases, what not to do). Short is fine; vague is not.
How context is chosen
In chat, Copilot uses the active file and any selection, plus what you add:
#file,#codebase(search your workspace),#terminalSelection, images, or a participant such as@workspace. Inline suggestions also use open tabs, so close unrelated ones.Zero-shot and few-shot
Zero-shot: just the instruction. Few-shot: include one or more examples of the input and the output you want, then ask. Few-shot wins when your format is unusual.
Break it down, then iterate
Split a big task into small steps and check each answer. Then iterate: keep what’s right and ask for the next change. Prompting is a conversation.
Custom instructions
Repository instructions (
.github/copilot-instructions.md) and path-specific.instructions.mdfiles are added to requests automatically, so the house rules travel with every prompt.Chat history is context too
Earlier messages in the same conversation go into the prompt. That helps follow-ups (“now add tests”) but old, unrelated turns can confuse the answer and fill the context window.
The prompt process, end to end
Your words + selected context + instructions + history → the prompt. The model answers, you review, then refine. Better input, less clean-up.
Copilot modes and agents: Ask, Edit, Agent, MCP and the coding agent
Learn it in “Agent Mode, MCP Servers and Sub-Agents” →Ask mode
Ask answers questions about code and concepts and can suggest code blocks. It doesn’t change your files by itself.
Edit mode (Copilot Edits)
Edit applies changes to the files you choose, across several files at once. You see each diff and Keep or Undo it.
Agent mode
Agent works out which files to touch, edits them, runs commands and tests, reads errors and keeps going until the task is done. It asks before running terminal commands unless you’ve approved them.
MCP servers add tools
The Model Context Protocol (MCP) lets Copilot use external tools: the GitHub MCP server, a browser, a docs search or your own API. Configure servers in
.vscode/mcp.json(VS Code) or with/mcp(CLI). Organizations can restrict which servers are allowed.Sessions and sub-agents
Long tasks fill the context window. Agent sessions keep work separate, and a sub-agent can do a side task in its own context and hand back only a summary.
Copilot coding agent
Assign an issue to Copilot on github.com (or
/delegatefrom the CLI). The coding agent works in a GitHub Actions environment on its own branch and opens a draft pull request with its changes.Review stays human
You review the agent’s PR like any other. Copilot code review can comment and suggest changes, but its review doesn’t count as an approval. A person merges.
Copilot CLI
The same agent in the terminal:
copilotfor a session with slash commands,copilot -p "…"for one prompt, and--allow-tool/--deny-toolto control what it may run.
Copilot for organizations: plans, policies, privacy and safeguards
Learn it in “Copilot Policies for Organizations and Enterprises” →Plans and seats
Individuals use Copilot Free, Pro or Pro+. Organizations buy Copilot Business per seat; Copilot Enterprise adds features on GitHub Enterprise Cloud. Admins assign seats to users or teams.
Policies flow down
An enterprise can enforce a Copilot policy for all its organizations or leave the choice to each organization. Policies cover features (chat in the IDE, on github.com, the CLI, code review, agents), models and MCP.
Seats light up Copilot
A developer gets Copilot once they have a seat. Remove the seat and Copilot stops at the end of the billing cycle.
Suggestions matching public code
A policy decides what happens when a suggestion matches public code: Block hides it; Allow shows it with a code reference (repository and licence) so you can decide.
Content exclusions
Repository, organization and enterprise admins can exclude files and paths. Copilot won’t use them as context or suggest inside them in supported IDEs. Changes can take up to 30 minutes to reach editors.
Audit log and metrics
Copilot settings changes, seat assignments and content exclusion changes appear in the audit log. Usage metrics and the REST API show adoption and activity.
Responsible use
Policies reduce risk, but the developer still owns the output: review it, test it, scan it for vulnerabilities and check licences before it ships.
Troubleshooting
No suggestions? Check the seat and sign-in, whether the file is excluded, whether the language is disabled in settings, the public code filter, network or proxy settings, and the Copilot logs in the IDE.
Simulations for education only. They show how Azure behaves; they are not connected to Microsoft Azure.