Skip to main content

Attached files

A handler can attach files to a question: a photo of the damage, a repair estimate, a solicitor's email, a hire-charge spreadsheet, a voicemail, dashcam footage. The assistant reads them with the claim and answers about both, citing each file by name.

What the handler sees​

  • Adding a file. The paperclip beside the text box, dragging files onto the chat panel ("Drop to attach to your question"), or pasting: a screenshot or a copied file goes into the tray, and pasted text is typed as usual. On a phone, the picker offers the camera.
  • The tray. Each file is a chip above the text box: a thumbnail for an image, otherwise an icon with its name and size (and pages, for a PDF). A file that cannot be attached says why on its chip ("Too large: 31 MB, the limit is 14 MB", "This PDF is password-protected…"). One line under the chips says what happens to the files (below).
  • Questions to start from. With files in the tray and nothing typed, the panel offers questions by kind: Is this damage consistent with what was reported? for a photo, Check this against the loss items and the policy limits for a PDF, Summarise this email, Does this change liability? and Draft a reply for an email, and so on. Sending files with nothing typed asks What is this file, and how does it bear on this claim?
  • Checking evidence. The questions that compare files with the record (Is this damage consistent with what was reported?, Do these match the claim record?, and their audio and video equivalents) run the Check evidence against the file capability (evidence_check): it gathers what the record asserts (incident, scheduled vehicle or property, loss items, the survey and other reports in full) and lists each discrepancy in a table with its source and how much it matters, then what matches and what to do next. The capability can also be picked from the capability menu with the files in the tray.
  • While it answers. An activity chip, Reading estimate.pdf (4 pages)…, for each file the model reads as itself, then the usual lookups.
  • Afterwards. The question keeps its chips. Clicking one opens it (the image, the PDF, a player, or the text); the ↻ button puts it back in the tray to ask about it again. Clearing the conversation clears the files.

Voice mode takes no attachments, and the paperclip is not shown while a call is live.

Which files​

KindTypesHow it reaches the model
ImageJPEG, PNG, WebP, GIF, HEIC (where the browser can open it)Shrunk to fit 2,048 pixels and re-encoded in the browser, which also drops its metadata, GPS location included. A screenshot stays PNG; a photo becomes JPEG.
PDF.pdf, up to 50 pagesAs it is. Password-protected PDFs are refused.
Text.txt, .csv, .md, .json, .log, .tsvAs text, up to 50,000 characters; a longer file is cut, and says so.
Email.eml, Outlook .msgTurned into text in the browser: from, to, date, subject and body. The email's own image and PDF attachments become files of their own.
Word, Excel.docx, .xlsxTurned into text in the browser: paragraphs and tables; each sheet as CSV (first 1,000 rows), formulas as their last value.
AudioMP3, WAV, M4A, AAC, OGG, FLACAs it is (Gemini only).
VideoMP4, MOV, WebMAs it is (Gemini only).

At most 5 files on one question, and 14 MB of files in all, because they travel inline in a single model request. Anything else (archives, programs, legacy .doc) is refused on its chip.

What is offered depends on the deployment: ATTACHMENTS (below) and what the model adapter can read. Gemini reads all five kinds; Azure reads images, PDFs and text. /api/health reports the result as ai.attachments, and the widget offers only that: the picker filters by it, and a deployment that takes nothing shows no paperclip.

What happens to a file​

Two kinds of file reach the model differently, and the tray says which:

  • Text (plain text, CSV, email, Word, Excel) arrives as text and passes the egress check like the question: contact details, dates of birth and bank, card and ID numbers are withheld. "Contact details are removed from text before the assistant reads it."
  • Images, PDFs, audio and video arrive as the file itself, because the model has to see or hear it, and nothing can clean them first. "The assistant sees images, PDFs, recordings and video as they are." A photographed letter shows its address. A deployment that must guarantee nothing like that reaches the model sets ATTACHMENTS=text.

Either way, "Files are used for this conversation only, and are not added to the claim." The assistant is read-only, and nothing is stored on our side.

ATTACHMENTSAccepts
unset, allEvery kind the adapter reads
textText files only (and email, Word and Excel, which become text)
off (or false, no, 0)Nothing: no paperclip

An embedding host can also switch the paperclip off for itself with the no-attachments attribute (see the integration guide).

How it works​

  1. In the browser (frontend/src/chat/prepareAttachment.ts), each file is got ready the moment it is added, and the tray (useAttachmentTray.ts) applies the deployment's limits across all of them, so a question is never refused for something the tray could have said first. Outlook .msg files are read by a small compound-file reader of our own (outlookMsg.ts): the libraries that do this lean on Node's Buffer, which a browser does not have.
  2. The request carries the files on the question they belong to (ChatMessage.attachments; see the chat protocol). Only the latest question carries file data.
  3. The Worker checks them before anything streams (api/src/chat/attachments.ts): the deployment accepts the kind, the file is what its type says (its first bytes, not its name: a renamed program is not a PDF), and it is within the limits. A refusal is 400 (attachment_not_accepted, attachment_invalid) or 413 (attachment_too_large).
  4. Each binary file is read once. One short call per file, with no lookups and the system.attachment_read prompt, turns it into a written note: what the file is, what it shows or says (writing transcribed, figures and dates exactly, pages and times given), and nothing it cannot see. The note is cleaned like any text and sent to the browser as an attachment_read event.
  5. The answer is written with the files themselves and their notes. system.base tells the model a file is not part of the claim record: cite it by name and page, keep what it says apart from what the claim records, and say where they differ.
  6. Later questions carry each earlier file's note, not the file, so nothing large is sent twice and the Worker keeps nothing. A text file is text throughout. If a question needs the file itself again, the model says so, and ↻ attaches it again.

The notes also count as evidence for the figure check, so a figure read off an invoice photo is not flagged as unchecked. Votes record each file's name, kind and size, never its contents (answer feedback).

Testing it​

  • api/src/chat/attachments.test.ts: the checks, the first-bytes sniffing, page counts, how the conversation carries files, the read step.
  • api/test/egress.test.ts: a text attachment, a file name and the model's note, all carrying planted personal data, and none of it reaching the model.
  • frontend/src/chat/prepareAttachment.test.ts and outlookMsg.test.ts: every conversion, against real file structures (a MIME message, a Word and an Excel zip, a compound file built byte by byte).
  • frontend/src/chat/ChatWidget.attachments.test.tsx and e2e/attachments.spec.ts: the paperclip, the tray, drop, suggestions, what the request carries, and attaching again.

The scripted model reads a file as "Scripted reading of bumper.png: a image file." and names the files in its answer, so tests can follow a file all the way through.

Not yet verified against the real models

The tests run offline. The size limit is set to stay inside Gemini's inline request size; check a 14 MB video and an .m4a voice memo against the deployed model before relying on them, and check that the Azure deployment in use is a vision model before offering images and PDFs there.