1.2 Context & Grounding: Work Files, Web Data and App Context
Key Takeaways
- Grounding is the end-to-end Retrieval-Augmented Generation (RAG) process that enriches prompts with relevant enterprise context.
- The five-stage grounding pipeline covers prompt capture, pre-processing/Graph search, LLM enrichment, post-processing/Purview compliance, and response generation.
- The Semantic Index for Copilot uses vector embeddings to map conceptual meaning and entity relationships across Microsoft 365 assets.
- Copilot can draw context from active open documents, stored OneDrive/SharePoint files, Exchange emails, Teams transcripts, and optional Bing web grounding.
- When web grounding is enabled, search queries dispatched to Bing are stripped of user identity and tenant identifiers to protect corporate privacy.
1.2 Context & Grounding: Work Files, Web Data and App Context
Quick Answer: Grounding is the process of supplying relevant, real-time context to a Large Language Model so that its output is factual, accurate, and tailored to your organization. Microsoft 365 Copilot uses Retrieval-Augmented Generation (RAG) across a 5-stage lifecycle: (1) Prompt Capture, (2) Pre-Processing via Microsoft Graph, (3) Prompt Enrichment to the LLM, (4) Post-Processing for Purview compliance and citations, and (5) Response Delivery. Context is gathered from active app documents, internal Graph files, and optional de-identified Bing web searches.
Without grounding, a Large Language Model is limited to its pre-trained general knowledge. While it can write code or explain historical events, it knows nothing about your company's sales pipeline, client deliverables, or team project timelines. Grounding is the foundational mechanism that transforms a generic foundational model into a customized business assistant.
1. The 5-Stage Copilot Grounding Lifecycle (RAG Pipeline)
Microsoft 365 Copilot implements an enterprise pattern known as Retrieval-Augmented Generation (RAG). Instead of modifying the foundation model's weights, the system retrieves relevant documents and metadata at runtime and injects them directly into the prompt payload sent to the LLM.
┌─────────────────────────────────────────────────────────────────────────────┐
│ THE 5-STAGE GROUNDING LIFECYCLE │
│ │
│ [1. PROMPT CAPTURE] │
│ User inputs prompt + Active app context (e.g., open Word document) │
│ │ │
│ ▼ │
│ [2. PRE-PROCESSING & RETRIEVAL] │
│ Query parsed ──► Graph & Semantic Index search ──► User ACLs evaluated │
│ (Optional: De-identified Bing web search executed) │
│ │ │
│ ▼ │
│ [3. PROMPT ENRICHMENT & LLM INVOCATION] │
│ Enriched Payload = System Rules + Retrieved Chunks + User Prompt │
│ Sent securely via TLS to Azure OpenAI Service │
│ │ │
│ ▼ │
│ [4. POST-PROCESSING & COMPLIANCE] │
│ Responsible AI filters ──► Purview DLP validation ──► Citations verified │
│ │ │
│ ▼ │
│ [5. RESPONSE DELIVERY] │
│ Structured response rendered in UI with interactive footnotes & citations │
└─────────────────────────────────────────────────────────────────────────────┘
Detailed Breakdown of the 5 Stages
Stage 1: Prompt Submission & Context Capture
The user enters a natural language prompt in a Microsoft 365 app (e.g., "Summarize the open feedback items from yesterday's steering committee meeting"). The client app captures the immediate environment: active open files, cursor location, highlighted text, and conversation history.
Stage 2: Pre-Processing and Enterprise Retrieval
Before calling the LLM, Copilot preprocesses the prompt:
- Analyzes user intent and extracts key entities (e.g., "steering committee meeting", "yesterday").
- Queries Microsoft Graph and the Semantic Index to find relevant emails, meeting transcripts, and SharePoint files.
- Applies the user's Microsoft Entra ID access controls so that only authorized content is retrieved.
- If web search is enabled, issues an anonymized query to Bing for public context.
Stage 3: Prompt Enrichment & LLM Invocation
Copilot constructs an enriched prompt (also known as a metaprompt). This structured payload includes:
- System instructions establishing role, behavior, tone, and safety constraints.
- The retrieved enterprise document snippets (the "grounding data").
- The user's original query. This combined payload is transmitted securely to the LLM in Azure OpenAI Service.
Stage 4: Post-Processing, Purview, and Responsible AI Checks
When the LLM generates a draft completion, it returns to the Copilot orchestration layer for rigorous post-processing:
- Responsible AI Filters: Scans for harmful content, hate speech, self-harm, sexual content, or jailbreak attempts.
- Microsoft Purview Integration: Validates Data Loss Prevention (DLP) rules and ensures Sensitivity Labels (e.g., Confidential / Internal Only) are respected and propagated.
- Citation Generation: Cross-references the generated text against the retrieved source snippets to attach verifiable citations and URLs.
Stage 5: Final Response Delivery
The grounded, verified response is rendered in the user's interface, complete with numbered citations, source file cards, and actionable follow-up buttons.
2. Context Sources for Grounding
Copilot pulls context dynamically from three primary tiers of information:
┌─────────────────────────────────────────────────────────────────────────────┐
│ COPILOT CONTEXT TIERS │
│ │
│ ┌──────────────────────┐ ┌──────────────────────┐ ┌────────────────────┐ │
│ │ Active App Context │ │ Internal Graph Data │ │ Public Web Grounding│ │
│ │ │ │ │ │ │ │
│ │ • Open Word document │ │ • OneDrive files │ │ • Real-time Bing │ │
│ │ • Selected table │ │ • SharePoint sites │ │ search results │ │
│ │ • Active email thread│ │ • Exchange mailboxes │ │ • De-identified │ │
│ │ • Live Teams meeting │ │ • Teams chat history │ │ enterprise query │ │
│ └──────────────────────┘ └──────────────────────┘ └────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘
1. Active App Context (Local Workspace)
When invoking Copilot inside an app, the immediate canvas provides implicit grounding:
- Word / PowerPoint: The text, structure, slide layouts, and comments of the currently open file.
- Excel: The active worksheet, data tables, headers, and cell ranges.
- Outlook: The selected email message or the full preceding thread history.
- Teams: The live meeting transcript or the active channel thread.
2. Internal Enterprise Work Data (Microsoft Graph)
When using Copilot Chat (Business Chat) or referencing external files using the / or @ symbol, Copilot searches across all organizational repositories the user has permission to view. This includes .docx, .pptx, .xlsx, .pdf, OneNote notebooks, emails, and calendar events.
3. Public Web Grounding (Bing Integration)
When a prompt requires public market data, industry standards, or recent global events, Copilot can ground its response in the live web via Bing.
Exam Warning: How does Microsoft protect enterprise privacy during web grounding? When web grounding is triggered, Copilot extracts search terms from the user's prompt and removes all organizational identifiers, tenant metadata, user names, and file contents before dispatching the query to the Bing search service. The query is routed through a dedicated enterprise pipeline; it is never linked to the user's personal identity, nor is it stored to build user advertising profiles.
Tenant administrators can globally manage or disable web grounding within the Microsoft 365 admin center under Copilot settings.
3. Semantic Index for Copilot: Vector Search vs. Keyword Search
Traditional search engines rely on lexical keyword matching (e.g., BM25 algorithms). If you search for "Q3 medical device revenue roadmap", a keyword index searches exclusively for files containing those exact words.
The Semantic Index for Copilot uses advanced machine learning models to generate high-dimensional vector embeddings that capture conceptual meaning, intent, and relationships.
| Feature | Traditional Keyword Search | Semantic Index for Copilot (Vector Search) |
|---|---|---|
| Matching Principle | Exact string and lexical keyword matching | Mathematical similarity between high-dimensional vector embeddings |
| Synonym Recognition | Requires explicit synonym dictionaries or boolean operators | Natively understands that "revenue", "sales", "top-line growth", and "turnover" are related concepts |
| Contextual Awareness | Treats words in isolation | Understands how words interact in sentences and paragraphs |
| Cross-Modal Mapping | Limited to plain text matching | Maps concepts across emails, chats, presentations, and transcripts |
| User Relevance | Static document rank | Personalizes results based on user's working relationships and recent Graph activity |
User-Level vs. Tenant-Level Semantic Indexing
- User-Level Index: Indexes the user's personal work items (personal OneDrive documents, personal mailbox, 1:1 chat history, personal calendar).
- Tenant-Level Index: Indexes shared SharePoint Online sites and public channels that are accessible to broad groups or the entire tenant, strictly honoring file-level permissions.
During the 5-stage Copilot grounding lifecycle, at which stage are Microsoft Purview Data Loss Prevention (DLP) rules and Responsible AI content filters applied to the generated output?
How does the Semantic Index for Copilot identify relevant documents when a user submits a prompt with natural phrasing that does not match exact file titles?
When public web grounding using Bing is enabled in Microsoft 365 Copilot, how is user and corporate privacy preserved during search execution?