Put four layers between student and model: an input filter, a constrained system prompt, an output filter and a teacher escalation path, and log every flagged exchange. That typically takes 60 to 120 hours of engineering, about $5,100 to $10,200 at $85 an hour, and it answers most of what a district IT review and an IRB ask.
How do I add AI safety guardrails and content filtering to a student-facing LLM tool so a district and IRB will approve it?
The four moderation layers, and what each one catches
No single filter is enough, and reviewers know it. A district or IRB wants to see that harmful content is stopped on the way in, stopped on the way out, and handed to a person when the software cannot decide.
| Layer | Where it runs | What it catches | What it misses |
|---|---|---|---|
| Input filter | Before the prompt reaches the model | Personal information students type (names, phone numbers, addresses), self-harm and violence language, jailbreak attempts | Harm that only appears in the model’s reply |
| Constrained system prompt | Inside the model call | Off-task chat, answers outside the curriculum, role-play requests | Determined jailbreaks; a prompt is guidance, not enforcement |
| Output filter | After the model replies, before the student sees it | Unsafe or age-inappropriate replies, leaked personal data, full answers if the study design forbids them | Subtle factual errors |
| Teacher escalation | Teacher dashboard and notifications | Anything flagged above a severity threshold, especially disclosures of harm | Nothing on its own; it depends on an adult acting |
In practice the input and output filters combine the model provider’s moderation service with your own rules: a blocked-terms list, pattern checks for emails and phone numbers, and a classifier for off-task content. The system must fail closed: if a moderation call errors or times out, the student sees a neutral message, never the unfiltered reply.
One detail trips up many prototypes. If the app streams the reply token by token, the output filter cannot judge the whole response before the student reads it, so student-facing replies should be buffered and checked first.
Logging flagged outputs so the IRB and the study both trust it
Keep a safety log separate from the research log. The research log feeds the efficacy study; the safety log is the record of every exchange a filter touched, and it has tighter access.
- Pseudonymous student ID, never a name
- Session ID and timestamp
- Model name, model version and prompt version
- The input text and the model’s output text
- Filter category, score and which layer fired
- Action taken: blocked, rewritten, passed or escalated
- Which teacher reviewed it, and when
Only named staff should read the safety log, and its retention period belongs in the data use agreement. Every read should itself be logged, because a reviewer will ask who can see student transcripts.
The log also protects the research. Over-blocking changes the intervention: if the filter rejects ordinary math questions, students in the treatment group get a different tool than the one in the proposal. Report false-positive rates by category each week of the pilot so the PI can adjust thresholds with evidence.
Teacher escalation: who sees what, and how fast
Escalation works when severity tiers are written down before launch and each tier has a named recipient and a response time.
- Low (off-task, mild language): blocked, logged, shown in a daily teacher summary.
- Medium (bullying, sexual content, repeated jailbreak attempts): blocked, teacher notified in the dashboard during the session.
- High (self-harm, abuse disclosure, threats): blocked, the student sees a calm message pointing to a trusted adult, and the teacher and the school’s designated contact are notified immediately.
The software routes the alert; the school’s existing counseling protocol decides what happens next. Agree in writing, per school, who the designated contact is and what counts as high severity. The IRB will want that in the protocol, and the institution’s counsel or compliance office signs off on any mandatory-reporting obligations.
What districts and IRBs ask about
Most review delays come from questions the team has not answered in writing. Put the answers in one technical disclosure document before the first meeting.
| Question | Who asks | What to bring |
|---|---|---|
| Is student data used to train the model? | District | The provider’s data-use terms for API traffic and your account settings |
| Where is data stored, and for how long? | District | Hosting region, retention schedule, deletion process |
| What personal information leaves the district? | District | A data flow diagram, pseudonymous IDs, the input filter’s PII rules |
| Are any students under 13? | District | Your COPPA position, reviewed by counsel |
| How is harmful content prevented and handled? | Both | The four layers, the escalation tiers, filter test results |
| What are the risks to minors, and how are incidents reported? | IRB | Adverse-event procedure, the safety log, reporting timeline |
| Who can see transcripts? | Both | Role list and access log |
| How do students sign in? | District | SSO through the district’s existing provider, no new passwords |
FERPA governs how education records are shared with you as a vendor. We describe what the design does; whether it satisfies FERPA and COPPA is a call for the institution’s counsel and the district’s privacy office.
A worked timeline before 20 teachers log in
For a prototype that already calls a model and has basic accounts, a typical sequence looks like this.
- Week 1: data flow diagram, list of harms by severity, provider and hosting choices confirmed against the district’s requirements.
- Week 2: input and output filters, fail-closed handling, the safety log and its access controls.
- Week 3: test the filters against a set of adversarial and ordinary classroom prompts, tune thresholds, record false-positive rates.
- Week 4: teacher dashboard, an escalation drill with one school, and the disclosure package for district and IRB.
As a general range that is 60–120 engineering hours; at $85 an hour, about $5,100–$10,200. The top of the range is when the tool serves students under 13, supports several languages, or needs a full teacher dashboard rather than email alerts.
It can move faster when the scope is fixed. We took a research prototype to a district-approved classroom pilot in under 30 days: 20 teachers, two districts, 100+ framework-compliant problems generated.
A graduate student can build a first-pass input filter. Bring in a team when the tool will reach minors at scale, when escalation must reach real staff in real time, or when a missed semester would cost the grant timeline.
Frequently asked questions
Is the model provider’s built-in moderation enough for a district?
Usually not on its own. Provider moderation catches broad categories like violence and self-harm, but it does not know your curriculum, your age group or what counts as off-task in your study. Districts and IRBs expect your own input and output rules plus a teacher escalation path on top of it.
Should students see a message when something is blocked?
Yes, a short neutral one that redirects them to the task, without repeating the blocked content. For high-severity flags such as self-harm language, the message should point the student to a trusted adult. The wording is worth reviewing with the school’s counseling staff before launch.
Does content filtering affect our efficacy study?
It can. A filter that blocks legitimate questions changes what students experience, which threatens the validity of the comparison. Log every flagged exchange with its category and score, track false-positive rates during the pilot, and record threshold changes so the analysis can account for them.
What does an IRB want to see about AI risk to minors?
A description of how harmful output is prevented, what happens when it gets through, who is notified and how fast, and how incidents are reported to the IRB. They also look at what student data is stored and who can read it. Your institution’s IRB sets the final requirements.
Who actually does the work, and what if the first project doesn’t work out?
Charlie scopes every project and makes the architecture calls, and Smplfy’s own engineers build it. The first project has a fixed scope, and you read a written scope before committing. A retainer starts only if you choose one.
Planning a pilot with a student-facing AI tool?
We offer a free 30-minute review of your pilot plan or the technical section of your proposal. Bring the prototype’s repository or a demo, the pilot timeline, and the district’s or funder’s requirements. Start a conversation.