What Is a Prompt? Decomposing the Invisible Interface
A prompt is more than a question — system context, attached files, implicit signals.
What You Will Learn
- Decompose a real prompt into its parts.
- Identify implicit vs explicit context.
- Recognize the 'invisible interface' of Copilot.
- Reason about what Copilot 'sees'.
- Apply decomposition to improve future prompts.
Why This Matters
Most beginners think a prompt is just the text they type. It isn't. A prompt includes your cursor position, the file you're editing, attached files, recent edits, and Copilot's system instructions. Understanding this invisible interface is the foundation of all later prompt engineering.
Concept Explained
A prompt is the complete input bundle sent to the model. It has explicit parts (what you type, what you attach) and implicit parts (your cursor, recent edits, the active file, terminal output if @terminal is used). Copilot assembles all of these into one context bundle before invoking the model.
How It Works
When you press Enter in Chat, Copilot runs a context-assembly function: gather explicit attachments, gather implicit context (recent edits, current selection), prepend system instructions, append your message, and send to the model. The model never sees your editor — it sees the assembled bundle. That's why attaching the right file matters.
Step-by-Step Tutorial
1. Decompose a real prompt
Take a recent Chat prompt you used. List: what you typed, what file was open, what was selected, what was attached, what slash command or participant you used.2. Identify implicit context
Note what Copilot saw that you didn't explicitly tell it: your cursor line, the file's other content, recent edits in the same session.3. Recognize the invisible interface
The 'interface' to Copilot isn't just the chat box — it's your entire editor state. Treat it as such.4. Reason about what Copilot sees
Before sending, ask: 'what context is Copilot about to see?' If the answer is wrong, fix it before sending.5. Improve future prompts
Based on decomposition, identify what you should add explicitly next time.Real-World Example
A developer was frustrated that Copilot kept suggesting deprecated APIs. They decomposed their prompt and realized: the file open was a 3-year-old module using the old API. Copilot was faithfully matching the file's style. Fix: open a file using the new API, or attach the new API docs as a file. The 'bug' was a context issue, not a model issue.
Example Prompts / Commands / Code
Explicit:
- Text typed: 'add error handling'
- Attached files: none
- Slash command: none
- Participant: none
Implicit:
- Current file: auth.js
- Selection: lines 12–28 (the login function)
- Recent edits: added try/catch to register() 5 min ago
- Terminal output: not used
Assembled context sent to model:
[system instructions]
[contents of auth.js]
[your selection, lines 12-28]
[your message: 'add error handling']
Common Mistakes
- Thinking the typed text is the whole prompt.
- Forgetting that Copilot sees your recent edits.
- Not attaching relevant files and assuming Copilot knows.
- Switching files mid-conversation without realizing context changed.
Best Practices
- Decompose prompts when results surprise you.
- Attach files explicitly when they matter.
- Close irrelevant tabs — open files leak into context.
- Before sending, ask: 'what is Copilot about to see?'
Troubleshooting
| Problem | How to Fix |
|---|---|
| Surprising suggestions | Decompose the prompt. Often the implicit context is misleading Copilot. |
| Stale context | Start a new Chat thread to reset implicit context. |
Practical Exercise
Your Turn
Take a recent Chat thread. Decompose at least one prompt using the template above. Identify one piece of implicit context you didn't consciously provide.
Key Takeaways
- A prompt = explicit + implicit context.
- Implicit context includes open files, selection, recent edits.
- Decompose surprises to debug bad suggestions.
- Attach files explicitly to control context.
- The 'invisible interface' is your editor state.
Frequently Asked Questions
Can I see the assembled context Copilot sends?
Does Copilot remember across sessions?
How much context can Copilot see?
Further Reading
Official References
SEO Metadata
SEO title: What Is a Prompt? Decomposing the Invisible Interface
Meta description: A prompt is more than a question — system context, attached files, implicit signals.
Primary keyword: what is a prompt? decomposing the invisible interface
Secondary keywords: what is a prompt? decomposing the invisible interface
Search intent: Informational
URL slug: /what-is-a-prompt-copilot-anatomy
Categories: AI Tools, GitHub Copilot
Tags: GitHub Copilot, Beginner, Prompting, IMCSEIAN, Tutorial, IMCSEIAN
Featured image concept: IMCSEIAN lesson card for What Is a Prompt? Decomposing the Invisible Interface
Comments
Comments
Post a Comment