# PDFs and long documents

Attach a PDF, a Word document or a large file and ask about it. It is read on your device, and each question sends only the parts that answer it.

## What you can attach

The attach button in the composer takes PDFs, Word documents (`.docx`), plain text, code, CSV and TSV, JSON, Markdown and HTML, as well as pictures. A PDF's text is pulled out on your device; nothing is uploaded to be converted.

A short file goes into the message whole, fenced as a block, the same way a long paste does. A long one is handled differently, and that is what the rest of this page is about.

## Long documents are searched, not sent whole

A document too long to fit in a message is split on your device into passages of about 1,500 characters, following its pages and paragraphs. The passages are kept on the device with the chat.

Each time you ask something, the app ranks those passages against your question and sends the ones that match best, along with an outline of the document and a note telling the model that it searched the document rather than read all of it. So the model knows when an answer might be somewhere it was not shown.

Later questions in the same chat are ranked again against the same passages, so you can keep asking about different parts of the document without attaching it again. It stays until you remove it.

> **Why not send it all**
>
> A model can only hold so much at once, and a long document sent whole would crowd out the conversation and cost more on every reply. Sending the passages that bear on the question keeps the answer focused and the price close to an ordinary reply.

## Seeing which pages were used

Every message that drew on a long document says so underneath: which document was searched and which of its pages (or, for a file without pages, which parts) were sent. If the answer seems to be missing something, that line tells you what the model actually saw. Ask about a specific page or section and the next question sends that part.

The chat also lists every document it is searching, each with a **Remove from this chat** button.

## Limits

- A file can be up to 50 MB, and up to 8 MB once its text is pulled out.
- A chat can hold up to 20 documents.
- A scanned PDF with no text in it cannot be read, and neither can a password-protected one. The app says which it is.
- Pictures are separate: see [sending pictures](https://nymbot.ai/docs/chats/#attachments).

For files that a whole run of chats should share, put them in a [workspace](https://nymbot.ai/docs/workspaces/#knowledge-files) instead. They are searched the same way, on your device, for every chat in it.
