About Ms. Sonoma
AI-powered lessons personalized to each learner, with comprehensive safety protections
AI Safety & Protection
Learner-Facing AI: Tightly Safeguarded
The only AI feature learners interact with is the "Ask" button during lessons. This feature has six layers of protection:
Input Validation & Keyword Filtering
All learner inputs are scanned for banned keywords including violence, weapons, sexual content, drugs, profanity, hate speech, and personal information requests. Inputs containing these are blocked immediately.
Prompt Injection Detection
Advanced pattern matching detects attempts to manipulate the AI (e.g., "ignore previous instructions", "pretend you are", "forget everything"). These are blocked before reaching the AI.
AI Moderation API
Before any question reaches Ms. Sonoma, it passes through OpenAI's Moderation API, which uses machine learning to detect harmful content across multiple categories.
System Instruction Hardening
Every request to Ms. Sonoma includes strict safety rules that cannot be overridden. She is instructed to only discuss the current lesson vocabulary and to refuse all "forbidden" topics with a preset response.
Output Validation
After Ms. Sonoma generates a response, it is validated again through keyword filtering and the Moderation API before being shown to the learner.
Lesson Scope Enforcement
Ms. Sonoma only has access to the current lesson's vocabulary and teaching notes. She cannot access other lessons, user data, or external information.
src/lib/contentSafety.js and enforced in src/app/api/sonoma/route.js. The system "fails closed" - if any safety check encounters an error, the content is blocked.Facilitator-Only AI: PIN Protected
Generative AI features that create new content are exclusively for facilitatorsand are protected by PIN authentication:
- Lesson Rewriting: Uses AI to adapt lesson difficulty or reading level. Requires PIN to access ("Rewrite Lesson" button).
- Visual Aid Generation: Creates images for lessons using DALL-E. Requires PIN to access.
- Comprehension Item Creation: Generates practice questions. Requires PIN to access.
How PIN Protection Works: The first time a facilitator attempts to access any AI feature, they must create a 4-digit PIN. This PIN is stored securely (hashed) and required for all subsequent AI interactions. Learners cannot access these features even if they navigate to facilitator pages.
src/app/lib/pinGate.js with server-side verification.You Can Avoid AI Entirely
The app is fully functional without using any AI features:
- All pre-written lessons work without AI
- Comprehension questions can be written manually
- Visual aids can be uploaded from your own files
- All four learner-facing AI features can be disabled individually per learner:
- Ask - Questions about lesson vocabulary
- Poem - Generate creative silly poems
- Story - Generate creative short stories
- Fill-in-Fun - Mad libs style creative game
- Don't set a PIN and all facilitator AI features remain locked
Complete control over AI access: You can disable all four learner-facing AI features (Ask, Poem, Story, Fill-in-Fun) for each individual learner. This ensures they cannot interact with AI even if they click the buttons. Control is entirely in the facilitator's hands, not the learner's.
Data Privacy
- No training data: Learner questions are never used to train AI models
- No data sharing: Conversations are not shared with third parties beyond the AI provider (OpenAI) necessary to generate responses
- Session isolation: Each lesson is a separate session; no conversation history is retained across lessons
- Local control: All lesson content and learner progress is stored in your account, under your control
About mssonoma.app: This is the Ms. Sonoma learning platform where facilitators and learners access lessons, track progress, and use interactive features. Visit mssonoma.com to learn more about our educational approach and philosophy.