Domain 2 of 6 · Chapter 1 of 2

Describe Copilot Data Handling and Flow

Unlock the complete study guide.

Bundled into the existing GitHub Copilot premium course — no separate purchase.

14-day money-back guarantee — no questions asked.

Included in this chapter:

  • What leaves your editor, and where it goes
  • Inline suggestions: the prompt around your cursor
  • Copilot Chat: your message plus gathered context
  • VS Code chat context and how to inspect it
  • Prompt builders on other Copilot surfaces
  • Inbound checks before the model runs
  • Outbound checks and formatting
  • Who processes the request: model hosting
  • Bring Your Own Key: your provider receives the data
  • Training use depends on the plan
  • Feedback helps improve future suggestions
  • Copilot data flow: misreadings and documented behavior

What each Copilot surface adds to your input

SurfaceContext Copilot adds to the promptOutput it produces
Inline suggestions (IDE)Code before and after the cursor, snippets from open tabs, file name and type, project structure, edit history and cursor positionA code edit proposed in the editor
Copilot Chat (IDE)Open files, repository name, chat history, and in VS Code and Visual Studio an optional .github/copilot-instructions.md fileA formatted answer with code or explanations
Copilot Chat (GitHub.com)Repository data stored on GitHub, chat history, and web search results when enabledAn answer that can link to files, issues or documentation
Pull request summaryCode diffs from the changed filesA prose overview plus a list of key changes linked to lines of code
Pull request text completionPull request title, existing description, commit titles, partial diffs, recently viewed pull request and issue titlesA prose continuation of the description
Commit message generationThe code changes selected for the commitA suggested summary (title) and description
Windows Terminal chatName of the active shell and the chat historyA suggested command or an explanation of a command
Copilot SpacesA relevant portion of the space's repositories, files, issues, notes, images and uploadsAn answer grounded in the space's curated content

Decision tree

Problem found beforethe model generates?Attempt to manipulatethe system?Harmful, offensive orinsecure output?YesNoProxyblocks itInput contentfilteringYesNoOutput safetyfiltersMatches public codewith Block set?YesNoWithheld bypublic code filterFormattedand shownYesNo

Cheat sheet

  • Copilot interaction data includes both request and response material
  • Individual subscribers can disable use of interactions for model training
  • Business and Enterprise customer data is not used to train AI models
  • Product feedback actions provide signals for future improvement
  • The selected model determines which hosting infrastructure processes a request
  • Provider data commitments must be evaluated per model
  • BYOK transmits prompts and responses to the selected provider
  • BYOK does not necessarily route every agent action through the chosen provider
  • Open-weight model developers need not receive Copilot prompts
  • Inline prompt construction uses code on both sides of the cursor
  • Relevant open tabs can contribute context to an inline prompt
  • Edit history and cursor position are structured before model inference
  • File and project metadata help shape inline prompts
  • Chat combines explicit input with available work context
  • Chat history supplies context for follow-up requests
  • Chat responses can combine model knowledge with grounded sources
  • Web grounding creates an external search query from request context
  • Repository instructions can be added automatically to IDE chat prompts
  • VS Code supplies implicit editor context before an agent expands it
  • Hash mentions deliberately add named sources to agent context
  • Agent diagnostics reveal the context assembled for a model interaction
  • Pull request summary prompts are built from code diffs
  • Pull request text completion uses description-writing context
  • Commit message generation uses the changes selected for commit
  • Terminal chat adds shell identity and conversation history to prompts
  • Copilot Spaces augments requests with a relevant subset of curated content
  • Prompts are transmitted to Copilot services over HTTPS
  • The Copilot proxy checks the assembled prompt before model inference
  • Input content filtering can stop harmful prompts before generation
  • System instructions constrain inline generation to a narrow task
  • Generated output passes through safety filters before presentation
  • Provider-hosted model output still traverses GitHub filtering
  • Blocked public-code matches are withheld from the user
  • Each Copilot surface formats model output for its interaction model

Unlock with Premium — includes all practice exams and the complete study guide.

References

  1. https://docs.github.com/en/copilot/responsible-use/chat
  2. https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/gh-300
  3. https://docs.github.com/en/copilot/concepts/context/content-exclusion
  4. https://docs.github.com/en/copilot/how-tos/manage-your-account/manage-policies
  5. https://docs.github.com/en/copilot/reference/ai-models/model-hosting
  6. https://learn.microsoft.com/en-us/training/modules/introduction-prompt-engineering-with-github-copilot/3-github-copilot-user-prompt-process-flow
  7. https://docs.github.com/en/copilot/responsible-use/inline-suggestions
  8. https://docs.github.com/en/copilot/get-started/best-practices
  9. https://github.com/microsoft/vscode-docs/blob/main/docs/agents/concepts/context.md
  10. https://docs.github.com/en/copilot/how-tos/chat-with-copilot/chat-in-ide
  11. https://github.com/microsoft/vscode-docs/blob/main/docs/chat/copilot-chat-context.md
  12. https://github.com/microsoft/vscode-docs/blob/main/docs/agents/agent-troubleshooting/chat-debug-view.md
  13. https://docs.github.com/en/copilot/concepts/completions/code-suggestions
  14. https://docs.github.com/en/copilot/get-started/plans