Putting AI Inside Business Software: Six Rules We Learned Building It into Our Own
To put AI safely inside business software, treat every AI draft as carrying exactly the authority of the thing it is a draft of, build prompts from the record rather than from the model's memory, keep personal data out of the prompt by construction and let the database refuse if it leaks, and make a human accept before anything is sent or filed. We have built assistants into our own CRM, HR and school-management software, and nearly every mistake we made was not in the AI at all but in the permissions, privacy and wording wrapped around it. These are the six rules we now build to, with the mistakes that produced them.
Key takeaways
- A draft carries exactly the authority of what it is a draft of; never create a standalone permission to use AI.
- Check that authority at the ask as well as at the accept, with one shared permission map and no author bypass.
- Keep personal data out of the prompt by construction, and have the database refuse to record a generation if a name leaked, matching on word boundaries.
- Make every refusal explain itself: the reason and who can fix it, not a single switched-off message.
- Decide what the assistant must refuse, say it on the page, and keep a human in the loop for anything sent or filed.
Rule 1: Compose from the record, never from nothing
Most AI features in business software are a text generator bolted onto a form. The difference that matters is grounding: whether the assistant composes from what the record actually contains, or free-composes something plausible. A follow-up drafted from what was really quoted, what was really promised and what the customer last said is a useful head start. A follow-up invented from nothing is a liability, because you now have to proofread it against your own memory, which is more work than writing it.
So the prompt is assembled by the system from the record's own fields, and the screen shows what the draft was built from. If the data is not in the record, the assistant says so instead of filling the gap. This is also the cheapest way to keep model costs and error rates down, and it is the same principle behind retrieval-augmented systems: the model supplies language, the record supplies the facts.
Rule 2: A draft carries the authority of what it is a draft of
Never create a permission called something like use AI that stands on its own. If keeping a drafted circular needs the permission to write circulars, and keeping a drafted report-card remark needs the permission to enter marks, then those are the permissions the assistant borrows. A separate ai.apply permission would let a role act outside its own boundary simply by routing the action through the assistant.
The part that gets missed is that the borrowing happens at the ask, not only at the file. In the school software we are building, we shipped the accept path checking the target permission while the generate path checked only that the user could use AI. The result: a class teacher who may never send a circular could have a fluent, school-wide circular written for her, sitting in her hands, ready to copy into a messaging group. It was the same error as the one we had just closed, one step earlier, and invisible because the real gate looked correct.
The fix has three parts. One function maps the kind of draft to the permission it needs. Both the generate gate and the accept step call that one function, because two hand-written copies had already started to drift inside a single release. And acceptance has no author bypass: the person who created a draft has no authority from having created it. A teacher who lost the right to enter marks on Friday must not be able to file Friday's remark on Monday.
| Step | The check | What goes wrong if it is missing |
|---|---|---|
| Generate (the ask) | May this person do the thing the draft is for? | Someone gets a fluent, ready-to-use draft of something they may never do |
| Show | Is the context still current? | A draft built on stale permissions or data is presented as live |
| Accept (the file) | The same permission, checked again, with no author bypass | A role that has since lost the right can still file the old draft |
Where the authority check has to sit
Rule 3: Keep personal data out of the prompt by construction, and make the database say no
When an assistant drafts something about a person, send the facts that matter and not the identity: scores, dates, a pronoun, never a name or an identifier. That is de-identifying by construction. But a privacy promise enforced only by the code that builds the prompt has a half-life, because that is exactly the code someone edits in a hurry to add a little more context, and nothing will fail when they do.
So the second lock belongs in the database. The function that records a generation already knows which person it concerns, so it can look the name up and refuse to record the draft if the name appears anywhere in what was sent. Because the draft is only handed back after it is recorded, a leaked name means nobody gets to use what came back.
The trap is how you match. A naive substring test looks stricter and is much worse: a pupil called Ram blocks the ordinary word programme, a pupil called Ann blocks cannot, a pupil called Ali blocks quality. A guard that cries wolf on a screen where the user can plainly see there is no name gets worked around within a week, and then protects nothing. What works is the full name matched case-insensitively, plus any name part of four letters or more matched on word boundaries, using only alphabetic parts so the pattern is safe to build.
Test the refusal, not the happy path
A guard that has never been seen to refuse is untested. Feed it the full name, the name in capitals, the first name alone and the surname alone, and confirm each is refused; then feed it the ordinary words that contain a name and confirm they pass.
Rule 4: Make the gate explain itself
An AI feature can be switched off by several different things: the vendor connection, a setting the school or company controls, the person's own role. Three different people fix those: the vendor, a settings manager, the role's owner. A single yes-or-no gate collapses them into one message, and the one message is usually wrong. Our first version did exactly that, and for a class teacher whose own role was the problem it said her school had switched the feature off. That was false, and it would have sent her to the principal about a setting that was already correct.
Return an answer with a reason and a next step: allowed or not, the reason code, a human sentence, and who can change it. It costs a few lines and it is the difference between a feature people trust and one they report as broken.
Rule 5: Decide what the assistant must refuse, and say it on the page
Assistants and analytics get asked for things that sound reasonable and do harm: a score per teacher, a ranking of staff, a performance number for each person. A class average is a property of the class, not of the teacher; whoever is handed the weakest set will always show a lower one. A product that turns that into a per-person score is doing harm with arithmetic, and it will be used in appraisals, because a number on a screen always is.
So we build what is useful and refuse the derived artefact. Name the person, so someone can find who to talk to about a class. Build no aggregate over the person: nothing sortable or rankable by them and no best-or-worst styling. Show the spread and not just the middle, because two classes averaging the same can be one tightly clustered and one split into strong and struggling groups, and they need opposite responses. And write the refusal into the product copy itself, not only a code comment, because that is what stops someone asking for it again next quarter.
Rule 6: Draft, never send
The last rule ties the others together. The assistant produces a draft; a human reads it and accepts it; acceptance is the moment the authority check runs and the audit record is written. Nothing is sent, filed or posted by the assistant on its own authority. It is slower by one click and it removes the largest category of AI incidents, which are confident, fluent, wrong actions taken without a person in the loop.
A draft carries the authority of what it is a draft of, no more, and the person who asked for it is not the authority.
What this means if you are adding AI to your own product
None of this needs a bigger model. It needs the unglamorous parts built first: grounding, one permission map used at both gates, a database check behind the prompt builder, explanatory refusals and a human accept step. If you are scoping an AI feature, how to add AI to your SaaS without burning cash covers choosing the first workflow, and what AI features cost covers the budget. Choosing between a ready-made assistant and a custom one is in chatbot versus custom AI. If you want these rules applied to your system, our AI integration service starts with a written scope, and you can send us the brief.
Frequently asked questions
Should an AI assistant in business software have its own permission?
No. A standalone permission to use AI lets a role act outside its own boundary by routing the action through the assistant. A draft should need the permission of whatever it is a draft of, checked when the draft is requested and again when it is accepted, with no bypass for the person who created it.
How do I stop an AI feature leaking personal data into prompts?
De-identify by construction: send scores, dates and a pronoun, never a name or an identifier. Then add a second lock in the database that refuses to record a generation if the person's name appears in what was sent, so a prompt-builder edit cannot silently break the promise.
How do I check whether a name leaked into a prompt without false alarms?
Match the full name case-insensitively, and match any name part of four or more letters on word boundaries. A plain substring test blocks ordinary words, such as programme for a pupil called Ram, and a guard that cries wolf gets worked around.
Should AI-generated drafts be sent automatically?
No. The assistant should produce a draft and a person should accept it. Acceptance is where the authority check runs and the audit record is written, so nothing is sent, filed or posted on the assistant's own authority.
Why does my AI feature show as switched off for people who should have it?
Because several different things can close the gate, such as the vendor connection, a setting, or the person's role, and a single yes-or-no message cannot say which. Return a reason and who can change it, so each person is sent to the right place.
Can an AI feature rank or score staff?
It can be built, but it should not be. A group's result is a property of the group, and a per-person score derived from it will be used in appraisals. Show the spread, name the person for findability, and say in the product that the score is deliberately not provided.
Have a project in mind?
We design, build, and ship software end-to-end — with a fixed, written quote after a free scoping call.
