> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/agent-builder/build/attaching-knowledge-to-an-agent.md).

# Attaching Knowledge to an Agent

Attaching knowledge allows an agent to reference your organization’s documents, files, and external content during runtime. Instead of responding only from general model training, the agent can retrieve information directly from approved knowledge sources to generate more accurate, contextual, and business-specific responses.

Knowledge can be sourced from uploaded files or connected platforms such as Google Drive, Microsoft OneDrive, and Microsoft SharePoint. Once attached, the content becomes available to the agent through the platform’s knowledge retrieval capabilities.

<figure><img src="/files/ql5OGBSkopWtXEGAVgaQ" alt=""><figcaption></figcaption></figure>

***

### What This Enables

With attached knowledge, agents can:

* Answer questions using internal business documents
* Reference policies, guidelines, or product documentation
* Retrieve context from uploaded files and connected repositories
* Deliver more consistent and traceable responses
* Reduce reliance on generic model knowledge

This transforms the agent from a general AI assistant into a domain-aware business agent grounded in your organization’s data.

***

### Before You Begin

Before attaching knowledge, ensure that:

* You have the source content ready for upload or import
* Supported files are within the allowed upload size limit (10 MB)
* Required integrations such as Google Drive, OneDrive, or SharePoint are already connected
* You understand whether preprocessing is required for your content type

Typical supported content includes:

* PDFs
* Documents
* Spreadsheets
* Policy files
* Structured business reference material

***

### How to Attach Knowledge

#### 1. Open the Builder Canvas

From the Agent Builder canvas, select **+ Add Knowledge** within the Knowledge section above the agent node. This opens the **Attach Knowledge** workflow.

<figure><img src="/files/3foGIrdgl9uhDmJ0PtFD" alt="The Builder Canvas, with the + Add Knowledge button in the Knowledge section above the agent node"><figcaption><p>Opening the Attach Knowledge workflow from the canvas.</p></figcaption></figure>

***

#### 2. Select a Knowledge Category

Choose the category that best matches the content being attached. Categories help organize knowledge sources and improve downstream retrieval behavior.

Examples include:

* General Documentation
* Financial Services
* Policies & Compliance
* Underwriting Guidelines
* Healthcare
* Legal
* Insurance
* Manufacturing

If no category is an exact match, select the closest applicable category or use a general-purpose option.

***

#### 3. Import or Upload Content

Knowledge can be added through connected integrations or direct upload.

Available import options include:

* Google Drive
* Microsoft OneDrive
* Microsoft SharePoint

You can also drag and drop files directly into the upload area for local uploads.

***

#### 4. Configure the Preprocessing Pipeline

The **Preprocessing Pipeline** determines how the platform prepares content before indexing.

When enabled, the platform can perform:

* Intelligent document chunking
* OCR for scanned PDFs
* Layout-aware extraction
* Table and structured data parsing

**Recommended Usage**

| Content Type                        | Recommendation                       |
| ----------------------------------- | ------------------------------------ |
| Clean text-based documents          | Leave preprocessing disabled         |
| Scanned PDFs                        | Enable preprocessing                 |
| Table-heavy or structured documents | Enable preprocessing                 |
| Retrieval quality issues            | Re-import with preprocessing enabled |

***

#### 5. Complete the Attachment

Once at least one file has been imported or uploaded, select **Done** to attach the knowledge source to the agent.

The knowledge source then appears as a node within the Knowledge section of the Builder Canvas.

***

### Runtime Behavior

After attachment:

* The content is indexed and made available to the agent
* The agent can retrieve relevant passages during conversations
* Responses become grounded in attached business content
* The platform uses retrieval workflows to fetch the most relevant information dynamically

If attached knowledge does not sufficiently answer a query, the agent can still fall back to general model reasoning or request clarification.

***

### Common Issues and Troubleshooting

#### Done Button Remains Disabled

Cause:\
No file or external content has been selected yet.

Resolution:\
Upload a file or import content from a connected source.

***

#### Agent Is Not Using Attached Knowledge

Possible reasons:

* The knowledge retrieval capability is not attached to the agent
* Agent instructions do not explicitly guide the agent to consult knowledge sources
* The uploaded content does not contain relevant information

Recommended checks:

* Verify the knowledge retrieval skill is enabled
* Review agent instructions and retrieval behavior
* Validate the uploaded source content

***

#### Retrieval Quality Is Poor

For scanned or complex documents:

* Re-import the content with preprocessing enabled
* Ensure the source document is readable and structured properly
* Avoid low-quality scans where possible

Preprocessing generally improves retrieval accuracy for OCR-heavy and layout-complex documents.

***

### Why Knowledge Attachment Matters

Knowledge attachment is foundational to building reliable enterprise agents.

It enables:

* Business-grounded responses
* Consistent answers across users
* Reduced hallucination risk
* Better compliance and traceability
* Domain-specific intelligence

Instead of relying solely on generalized training data, the agent retrieves information from approved organizational sources, making outputs more trustworthy, explainable, and operationally useful.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.uptiq.ai/agent-builder/build/attaching-knowledge-to-an-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
