> For the complete documentation index, see [llms.txt](https://docs.qolaba.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qolaba.ai/chatbot/toolkit/file-search.md).

# File Search

The File Search tool lets the chatbot search within uploaded documents — retrieving specific information from PDFs, contracts, reports, and other files without you needing to manually locate the relevant section.

***

#### What It Does

When File Search is enabled and a file is attached to the chat, the model actively searches within the document to find and reference relevant sections when answering your prompt. For a full overview of how file uploads work and what formats are supported, see [Adding Context and Resources →](/chatbot/adding-context-and-resources.md)

Common use cases:

* Legal document and contract review
* Policy and compliance analysis
* Academic paper and research review
* Financial report analysis
* Locating specific clauses, figures, or sections in large documents

***

#### How to Enable It

Toggle **File Search** on in the Toolkit panel and attach your document to the chat. Reference the file in your prompt to direct the model's search.

**Example prompt:**

```
Search the uploaded contract and identify all clauses
related to payment terms and late fees.
```

{% hint style="info" %}
File Search is most effective on structured documents with clear sections, headings, or consistent formatting. Dense unstructured text may produce less precise retrieval.
{% endhint %}


---

# 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.qolaba.ai/chatbot/toolkit/file-search.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.
