You can build a perfect-looking chat UI on top of great source material and still ship a bad product if the AI's behavior is wrong. Too chatty, too curt, too willing to make things up, too unwilling to stay on topic, too clinical, too casual.
DocuTrain gives you several knobs for steering AI behavior — and just as importantly, it puts guardrails on those knobs so a well-meaning customization doesn't open a safety hole. This post is about those knobs and the guardrails behind them.
The Chat Behavior tab
In the Document Editor, each document has a single big text field: Custom Prompt. Up to 2,000 characters of free-form instruction that shapes how the assistant answers for this document.
A few real examples:
Always respond in the formal "vous" form. Never recommend specific drug dosages — refer the reader to the prescribing information instead. If asked about pediatric cases, remind the reader that this guideline is for adults.
You are speaking to family-medicine residents preparing for board exams. Be concise, prioritize high-yield facts, and end every answer with a one-sentence study tip.
Respond like a friendly product expert at a hardware store. Use plain English. If the question is about a product we don't sell, say so politely.
This is where you give the AI its personality, its scope, its tone, and its hard rules — without writing any code.
The safety reviewer
Custom prompts are powerful, which means they're also dangerous. A custom prompt could, in theory, instruct the AI to ignore the document and fabricate answers, or to give specific medical advice without warnings, or to be rude to users.
DocuTrain runs every custom prompt through an AI-powered safety reviewer before saving. The reviewer looks for problems such as:
| Check | What it catches |
|---|---|
| Abuse | Instructions to be rude, hostile, or condescending |
| Ignoring the document | Attempts to answer from general knowledge instead of your content |
| Fabrication | Encouragement to invent facts or make up sources |
| Medical safety | Specific dosing, diagnostic, or treatment instructions |
| Tone | Inappropriate communication style |
| Language | Profanity or hate speech instructions |
| Addressing users | Disrespectful ways of talking to people |
| Format | Instructions that would break the chat experience |
| Style | Conflicting or problematic stylistic rules |
The reviewer runs when you save. If your prompt is rejected, you see an inline error explaining what kind of issue was found, and the prompt isn't saved. You can edit and try again until it passes.
Two rules always apply, no matter what your prompt says:
- Grounding is mandatory. The AI must answer from your uploaded material, not from general knowledge alone. Custom prompts can change tone but not what counts as a source.
- Citations are mandatory. Factual answers cite where the information came from, with page or slide references when available.
You can ask for a casual tone. You cannot ask for a tone that abandons grounding.
How much context each answer uses
Behind the scenes, DocuTrain splits documents into overlapping segments for search. By default, each segment is sized so related ideas stay together. Super-admins (and some plans) can tune how many segments the assistant is allowed to consider per question — a short FAQ doesn't need as much context as a long manual.
Higher limits mean richer answers but slightly slower responses and higher cost. It's worth tuning per document when you care about speed vs. depth.
AI-generated content: abstracts and quizzes
Beyond chat, DocuTrain has two other AI features that owners can enable per document.
Abstracts
The Abstract tab in the document editor lets you generate an AI-written executive summary of the document. The flow:
- Reads the indexed content for the document
- Processes it in batches when needed
- Produces markdown that includes a multi-paragraph summary plus a "Sample questions you might try" section
You see timestamps and a clear status (idle, in progress, or failed). When you regenerate, the previous abstract is replaced.
The abstract feeds:
- Search and social previews for the document
- The default intro message (if the owner hasn't written a custom one)
- A button in the chat UI that opens the abstract for the user to read
Long documents have built-in limits and timeouts so the dashboard stays responsive.
Quizzes
The Quiz tab generates multiple-choice questions from the document. Generation runs in parallel batches so even a large question set can finish in a reasonable time. You can review, edit, delete, or reorder questions before publishing.
Quizzes are available on certain plan tiers and can be turned on per document. When enabled, users see a "Quiz" button in the chat UI alongside the chat input.
Fun facts
A small detail that adds up: every owner can configure an industry keyword in settings — nephrology, pizza restaurant, aerospace, whatever fits. DocuTrain uses that phrase to generate a batch of short industry facts that rotate while chat is loading.
It's a tiny touch that makes wait screens feel intentional rather than empty, and it's branded to your organization instead of a generic "Did you know..." line. You'll find it in the owner Configuration tab.
Why this matters
Most AI document-chat tools give you exactly one steering tool: a single system-style prompt. DocuTrain gives you a per-document prompt, a safety reviewer that keeps the prompt in bounds, optional tuning for how much of the document feeds each answer, plus auto-generated abstracts and quizzes — all in the same dashboard, all without code.
That layered approach is what makes the platform work for a clinical guideline and a marketing FAQ and a board-exam study guide. The next post moves up a level to the owner — the organization that ties documents, branding, and team members together.
→ Next: Owner Groups: Branding, Landing Pages, and the Chat Assistant