Understand GitHub Copilot data and architecture¶
Copilot assembles allowed context into a prompt, sends it through GitHub's service, receives model output, applies processing, and presents a suggestion. Retention and model behavior depend on the plan, feature, settings, and current product terms.
Conceptual study flow. Use the GitHub Copilot Trust Center for current data-handling details.
Prompt inputs¶
| Potential input | Purpose |
|---|---|
| User prompt and nearby code | Express the immediate task and intent |
| Active selection and file | Supply implementation and language context |
| Open files or workspace index | Add related project context when supported |
| Chat history | Carry earlier constraints forward |
| Instructions and references | Add conventions or explicit sources |
| Tool results | Ground an agent in tests, searches, or external systems |
Content exclusions can stop configured paths from informing supported features, but support varies. Exclusion is not a substitute for repository access control or secret management.
Context is assembled, not copied blindly¶
The client and service have finite context limits. They select, rank, and package useful information rather than sending every available file. The active editor, selection, explicit attachments, repository index, instructions, chat history, and tool output can each influence the constructed prompt. The exact set varies by client, mode, model, permissions, and feature.
Inspect the references associated with a response when the client exposes them. A missing reference can explain an uninformed answer; an irrelevant reference can explain why the response drifted. Improve grounding by attaching the authoritative file or symbol, closing unrelated files, and starting a focused conversation.
Suggestion lifecycle¶
- The client identifies context for the interaction.
- It constructs a prompt within product and model limits.
- The service applies policy and safety processing.
- The selected model generates candidate output.
- Post-processing filters or ranks the result.
- The client presents output for acceptance, rejection, or revision.
- The developer validates the final change.
| Lifecycle stage | Common failure | Diagnostic question |
|---|---|---|
| Context gathering | Relevant implementation is omitted | Did the response cite the expected file or symbol? |
| Prompt construction | Constraints conflict or become diluted | Is the goal explicit and is chat history still relevant? |
| Generation | Output invents an API or behavior | Can the claim be confirmed in current documentation? |
| Post-processing | A suggestion is blocked or references public code | Which safeguard or policy applies? |
| Presentation | User assumes output is already verified | What executable check can falsify the suggestion? |
Large language models predict likely output; they do not guarantee truth or automatically know private facts that were not supplied. Output can vary with wording, context order, model, and product updates. Long chats can dilute context, so restate critical constraints or start a focused session.
Review the GitHub Copilot Trust Center and Copilot documentation for current behavior.
Readiness check¶
- Why can the same prompt produce different output?
- Why is content exclusion not an access-control system?
- Why is this flow not a promise about retention?
Suggested answers
- Generation is probabilistic and varies with model, context, settings, and updates.
- It controls supported Copilot context, not who can read the repository or file.
- Retention depends on current terms, plan, feature, and settings.