# Process documents

Upload documents to a project and ask questions about them in the chat. The files remain available in the project and can also be used in other chats.

## Attach files

These steps describe uploading with the **agent switched off**. For files the agent should work on directly, use {ref}`agent attachments <files-for-the-agent>`.

1. Open **Attach files** in the sidebar or the **paperclip** in the message field.
2. Select **Upload** if the file list is open.
3. Choose a project. Use **New project** to create one if needed.
4. Click **Choose files** and select your documents.
5. Confirm with **Upload**.

```{include} ../_includes/ui-upload.md
```

An upload requires a project you are allowed to manage. The selected project is then activated in the current chat. Uploading alone does not mean processing has finished.

## Check processing

```{include} ../_includes/ui-files.md
```

| Status | Meaning |
| --- | --- |
| **Queued** | The file is waiting to be processed. |
| **Processing** | chatBHT extracts text and prepares it for search. The progress bar shows the current stage. |
| **Ready** | The document contents can be used as a knowledge source. |
| **Failed / Cancelled** | Check the error message and use **Retry** if needed. |

Stop running or queued jobs with **Cancel processing**. Search, project filters and sorting help with larger file collections.

Supported formats are PDF, DOCX, DOC, TXT, Markdown, HTML, RTF and ODT, as well as [image files](use-images.md). You can select up to 20 files per upload. Size limits and storage quotas depend on the instance; the file list displays the total storage allowance.

## Ask about your documents

1. Wait until the required documents are **Ready**.
2. Activate the project under **Projects** in Chat history. Alternatively, select **Use project in chat** in the file list.
3. Check the project entry above the message field.
4. Ask a specific question.

> Which submission deadlines are listed in the seminar schedule? Give the date, the corresponding assignment and the source.

**Use project in chat** activates the entire associated project. It does not limit the search to the file you clicked. Create separate projects if you want to query unrelated topics independently.

chatBHT finds relevant text passages in the active projects and uses them in its response. Available source references help you compare the answer with the original files. Not every document is automatically attached in full to every request.

## Deselect or delete

Use the **X** on a project entry or its sidebar checkbox to deselect a knowledge source. The files remain stored. **Delete file** removes the file and its knowledge excerpts from the project. Deleting a chat does not delete a project file.

[Next: Manage chats](manage-your-chats.md)
