> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dust.tt/llms.txt
> Use this file to discover all available pages before exploring further.

# Search data sources

> Let an agent search your connections, folders, and websites by meaning, and narrow what it can find with labels.

With **Content search**, the agent searches the data you selected for the passages that best match the question, then answers from them with links to the sources. It's the right method for most questions about documents, like policies, wikis, support tickets, or meeting notes. For questions about numbers in tables, use [table queries](https://docs.dust.tt/docs/user-documentation/agents/knowledge/table-queries.md) instead.

## How search works

Dust splits your documents into short passages and indexes them by meaning, not only by keywords. When someone asks a question, the agent writes search queries, finds the passages closest in meaning, and gives them to the model along with the question. This approach is called retrieval-augmented generation (RAG). Learn more in [Understanding RAG](https://docs.dust.tt/docs/user-documentation/agents/llm-best-practices/understanding-rag.md).

For example, an HR agent connected to your Notion and Confluence can answer "What should I prepare before my parental leave?" by finding the right section of the parental leave policy, even if the policy never uses the word "prepare".

## Set up search

**1. Add knowledge**

In the Agent Builder, in **Capabilities and knowledge**, click **Add knowledge**.

**2. Select data sources**

Pick a Space, then select whole connections, folders, or websites, or only the pages, folders, or channels the agent needs. Click **Next**.

**3. Choose Content search**

Pick **Content search**, describe what the data contains, and save the agent. A clear description helps the agent decide when to search this data.

## Filter with labels

Labels let you narrow what the agent can find inside the data you selected. In the knowledge configuration, click **Filters** and turn on **In-conversation filtering**: the agent then picks the labels to filter on from the conversation. For example, someone can ask "Which projects have the label `status:review`?" and the agent only searches content with that label.

Fixed **Must-have labels** and **Must-not-have labels** are available with [Include all data](https://docs.dust.tt/docs/user-documentation/agents/knowledge/include-data.md) and [Advanced processing](https://docs.dust.tt/docs/user-documentation/agents/knowledge/extract-data.md).

Labels work on folders and on most connections. Each connection page lists the labels it supports.

## Browse folders like a file system

On top of search, agents can browse the selected data like a file system: list what's in a folder, open a document by its path, find a document by its title, and see where a document sits in the folder tree. This helps with questions like "What's in the Q3 board meeting folder?". Folder browsing comes with **Content search** and works on data sources organized in folders or pages, like Folders, Google Drive, SharePoint, Notion, or Confluence.

## Tips

* Select only the data the agent needs. A narrow scope gives better answers than a whole workspace.
* Use one agent per topic, like HR policies or product docs, rather than one agent for everything.
* Try your agent with real questions, and adjust the sources if answers miss the right documents.

## Related

> [card] [Knowledge](https://docs.dust.tt/docs/user-documentation/agents/knowledge)
>
> Compare the ways an agent can use your data.

> [card] [Understanding RAG](https://docs.dust.tt/docs/user-documentation/agents/llm-best-practices/understanding-rag.md)
>
> See how retrieval works behind search.

> [card] [Include data](https://docs.dust.tt/docs/user-documentation/agents/knowledge/include-data.md)
>
> Load whole documents when the agent needs everything.

> [card] [Data sources overview](https://docs.dust.tt/docs/user-documentation/data-sources/overview.md)
>
> Set up the connections, folders, and websites agents search.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.