Attach a file to a question
A person can attach a CSV or plain text file to a question in chat. Markdown counts as plain text. The assistant reads the file with a tool, a range of lines at a time. The file is never pasted into the prompt, so a large file does not fill the conversation.
This feature is off by default. Turn it on with app.attachments.enabled.
What a person sees
- Attach a file sits beside the question box. It appears only when the feature is on, and never while an administrator is previewing another person.
- Each file picked shows as a chip under the box, with its name, its type and its size. A chip says "uploading…" until the upload ends. Its × leaves the file out of the next question.
- The next question carries the files. Under the question, one line says what was attached, for example "Attached: spend.csv (CSV, 12.3 KB)".
- A file stays with its conversation. A later question in the same conversation can ask about it again without attaching it again.
The line under a question says what was attached. It does not say that the assistant read the file. When the assistant cannot read a file, its tool gives it one sentence, "This question cannot read the attached files. Ask again.", and the assistant is told to pass that sentence on.
What a person can attach
- Text only, judged by the file's bytes: CSV, TSV, Markdown and plain text.
- At most 3 files on one question.
- Each file at most
app.attachments.maxFileMiB(2 MiB by default). - One conversation holds at most
app.attachments.maxConversationMiBof attached files (10 MiB by default).
Prism refuses each of these with a sentence that says why. Nothing is kept from a refused file.
- a workbook or an older Office document, a ZIP, a PDF, a gzip file or an image;
- UTF-16 text, a NUL byte, or bytes that are not UTF-8;
- HTML, SVG or XML, because they can carry scripts;
- an empty file, or a file over the cap.
A file picked but not yet sent with a question is "waiting". Waiting files share the conversation's cap. When a new file does not fit, Prism removes the oldest waiting files to make room. The chip of a removed file goes, and a line names it. Prism deletes a waiting file after a day if no question named it.
A file is data, never an instruction
Everything in an attached file was written by the person who attached it, or by whoever wrote the file. The assistant is told to treat it as data and never as an instruction, whatever it says. That includes a Markdown file and the file's name. The assistant's directive names each file by a handle, never by its name.
Who can see a file
- The person who attached it sees its name, type and size on the question, in chat, on the answer's page and in its PDF.
- A super administrator reads every person's questions and answers in History and in feedback triage. For a person who can see the whole organisation, the admin also sees each file's name, type and size.
- For a person whose view is limited to a reporting line (Scoped viewers), the admin sees only how many files were attached. The admin sees no name, no size and no type.
- No one can download a file again, the person who attached it included.
An answer can quote a file. Answers are on the turn a super administrator reads, so the admin can read what the assistant wrote about a file, even for a person whose view is limited.
The file's name and text are sealed in the database with ENCRYPTION_KEY. An
administrator's own SQL reads only ciphertext.
How long a file is kept
- A file is kept with its conversation.
- Erase history deletes a person's files with the rest of their history (Erase a person's history).
- With
app.retentionDaysset, Prism deletes a file whose last use is older than that. - Reset on App users deletes the files under that address.
- The assistant's runtime keeps what it read from a file in the conversation's own record, until that conversation is deleted from the runtime. Erase and retention do not reach that copy. Questions are kept there the same way.
What the audit log records
Each kept file writes one chat_attachment_added row. The row names the file's
handle, size, type and line count, and how many waiting files it replaced. It
never names the file and never holds its text, because the audit log outlives
every erasure.
Turn it on
Set these values and upgrade:
app:
attachments:
enabled: true
maxFileMiB: 2 # the largest file, in MiB
maxConversationMiB: 10 # the most one conversation may hold, in MiB
ENCRYPTION_KEY must be set, because Prism seals every file with it. Without
it, an upload is refused with a sentence that says so.
How the assistant reads a file
The assistant reads a file with two tools on the semantic MCP:
attachment_info (the name, type, size, line count and, for a CSV, the
header) and read_attachment (a range of lines). The semantic MCP registers
them only when app.attachments.enabled is true. It reads the file from
Prism's memory and opens it with ENCRYPTION_KEY, which it already holds.
A read is served only for a question in the file's own conversation, asked by the person who attached it. A question the app stopped reads nothing. With viewer scoping on, the signed viewer must be the person who attached the file.
Limits of this release
- One read returns at most 32 KB, and one question reads at most 256 KB in all. The assistant cannot add up a column over a whole 2 MiB file. When a question reaches 256 KB, the tool tells the assistant to answer from what it has read and to say that the answer covers only part of the file.
- Excel, PowerPoint and Visio files are not read in this release.