How to Use the Knowledge Agent in SharePoint Online to Add and Configure Metadata Columns in a Document Library.
1. Introduction
The Knowledge Agent in SharePoint Online is an AI-powered capability (available with a Microsoft 365 Copilot license) that helps you organize document libraries by suggesting, creating, and automatically populating metadata columns. These autofill columns extract structured information from file content, making libraries more discoverable and enabling Copilot and agents to deliver more precise, context-aware answers.
This guide explains how to use the Knowledge Agent to add and configure metadata (autofill) columns in a SharePoint Online document library.
2. Prerequisites
Before you begin, ensure the following:
- Microsoft 365 Copilot license — Knowledge Agent requires a Copilot license and is available in public preview (with tenant or site-level opt-in by administrators).
- Permissions — You need Edit or Owner permissions on the document library (or site ownership for broader actions).
- Supported library — Standard document libraries on SharePoint sites (including hub sites).
- Supported file types — Common formats including .docx, .pdf, .xlsx, .csv, and other Microsoft 365-compatible formats. Text extraction works best with English content; OCR supports images and scanned PDFs.
- Admin enablement — Tenant or site administrators must opt in to the Knowledge Agent preview if it is not yet generally available in your tenant.
3. Accessing the Knowledge Agent
Knowledge Agent is available through a floating button in the lower-right corner of SharePoint surfaces.
- Open the SharePoint Online document library you want to organize.
- Click the Knowledge Agent / Copilot floating button in the lower-right corner of the page.
- From the context-aware menu that appears, select Organize this library (or the equivalent option such as Create autofill columns).
A chat panel opens. On first use in a library, the agent may automatically suggest up to three columns based on the files present.
4. Adding Metadata Columns
4.1 Let the Agent Suggest Columns
The simplest approach is to let the Knowledge Agent analyze your content and propose columns:
- In the chat panel, select a suggested prompt such as “Create autofill columns” or “Add autofill columns,” or type a natural-language request (for example, “Suggest columns for this library”).
- Optionally modify the prompt text, then select Send.
- The agent analyzes up to the first 20 files (or only the files you pre-selected) across supported file types and proposes columns with extraction prompts.
- Suggested columns appear highlighted and marked as AI-generated. Review the column names and sample extracted values.
4.2 Request Custom Columns
You can ask the agent to create specific columns using natural language:
- In the chat box, enter a clear instruction. Examples:
- “Add a column for the client name.”
- “Create a column that extracts the invoice number.”
- “Add a column for the total amount as currency.”
- “Extract a short summary of the goods or services being invoiced. Keep it concise — one sentence. Exclude prices and quantities.”
- Select Send. The agent creates the column and shows a preview of extracted values.
Tip: When requesting a column, specify a clear name, the type of information to capture, and any preferred format or length. This produces more accurate extraction prompts.
5. Configuring and Refining Columns
5.1 Edit Column Name or Extraction Prompt
You can refine any suggested or custom column before applying changes:
- On the column card in the chat panel, select Edit, or from the library view select the column name and choose Edit column.
- In the Edit column panel, change the column name and/or modify the natural-language instruction that generates the metadata.
- After editing the instruction, test it on up to 10 files to verify the results.
- When satisfied, select Save.
5.2 Remove Unwanted Columns
To discard a suggested column before applying:
- From the chat panel, on the column card select Remove.
- Or from the library page, select the column name and choose Remove column.
5.3 Supported Column Types
Knowledge Agent / autofill columns support the following SharePoint column types:
- Text
- Multiple lines of text
- Number
- Yes/No
- Date and time
- Choice
- Hyperlink
- Currency
- Managed metadata (limited to the first 100 terms of a mapped term set; preferred terms/synonyms are preferred)
Not currently supported: Person or Group, Location, Image, and Lookup columns.
6. Saving and Applying Changes
- When you are ready, select Save changes in the chat panel.
- On the confirmation screen, choose whether to update the current library view or save as a new view (recommended if you do not want to alter the default view for all users).
- Select Apply changes.
- You return to the updated library. Processing begins for up to the first 20 files. Progress can be monitored in the activity panel.
After columns are saved:
- Newly uploaded files are automatically processed and metadata is populated (this applies even if the uploader does not have a Copilot license).
- To apply metadata to additional existing files, select the files, then choose the Autofill button (or Autofill columns > Autofill) from the command bar.
7. Best Practices
- Prefer flat lists for similar content — Knowledge Agent works best with flat document libraries (for example, all invoices or all resumes) rather than deeply nested folder hierarchies. Use folders for natural boundaries such as teams or projects when needed.
- Start with a few high-value columns — Aim for no more than about 10 autofill columns per library for optimal performance. Focus on columns that support filtering, grouping, and business questions.
- Write clear extraction prompts — Precise instructions (what to extract, format, length, and what to exclude) produce more consistent metadata.
- Test before applying — Always review and test edited prompts on sample files before saving.
- Save as a new view — When applying organizational changes, save them as a new view so the default view remains unchanged for other users.
- Combine with classification — Use the agent’s classification option to categorize files by document type for simple sorting and filtering.
- Manual columns still matter — Add manual columns for information only a person knows and that AI cannot reliably extract from the document content.
8. Important Limitations and Notes
- Initial configuration processes up to 20 files. Additional files must be selected and autofilled manually (bulk library processing is planned for general availability).
- Recommended file size for processing: no larger than approximately 65 pages.
- Encrypted files cannot be analyzed.
- File processing (not folders) drives configuration; settings apply to the entire library.
- Supported languages for prompts follow Microsoft 365 Copilot; file content processing is currently optimized for English.
- Knowledge Agent creates library columns (not site columns). Search managed properties may need manual configuration if required for broader search scenarios.
9. Quick Reference Workflow
Use this condensed checklist when working in a library:
| STEPS | ACTION |
|---|---|
| 1 | Open the document library and click the Knowledge Agent / Copilot button (lower right). |
| 2 | Choose “Organize this library” or “Create autofill columns.” |
| 3 | Accept suggested columns or request custom ones with clear natural-language prompts. |
| 4 | Edit column names/prompts as needed and test on sample files. |
| 5 | Save changes and choose to update the current view or create a new view. |
| 6 | Monitor processing; autofill additional existing files as needed. New uploads are handled automatically. |
10. Additional Resources
For the latest official documentation and updates:
- Microsoft Learn: Create autofill columns — microsoft.com/sharepoint/copilot-in-sharepoint-create-autofill-columns
- Introducing Knowledge Agent in SharePoint (Microsoft Tech Community) — microsoft.com
- SharePoint Showcase: Metadata and the Knowledge Agent — microsoft.com