AI Data Processing

How Mentor handles data in AI features

AI features in Mentor (AI Module Builder, AI quiz suggestions, cover image generation, video transcription) are an optional tool to speed up content creation. This document explains which data goes to which AI service when, how we minimize it, and how the user / admin controls it.

Last updated: 2026-05-11

Top 5 takeaways

  • AI features are optional — the tenant admin can disable them in Settings → Features.
  • Before sending text to an AI provider, we strip emails, phones, Slovenian personal IDs, tax numbers, IBANs, URL tokens, and internal IDs.
  • We never send passwords, billing data, or internal secrets to AI providers.
  • AI results are not authoritative — the admin must verify before publishing the module.
  • AI processing (text, images, transcription) may take place outside the EU. Specific AI vendor names are disclosed to paying customers on request.

1. AI is optional

All AI features can be disabled by the tenant admin in /admin/settings → Features → AI Builder (feature flag features.aiBuilder). Without AI, the platform works normally: manual module authoring, quiz editor, video upload, certificates, etc.

New tenants have AI Builder on by default in full product mode and off in standard mode. The admin can change this at any time.

2. Which AI providers

For AI features we use external providers grouped into the following categories. Processing may take place outside the EU.

Mentor featureAI provider categoryData type
AI Builder (text → module)Text generationmodule text
AI title / description / tags suggestText generationtitle + description + section titles
AI quiz generationText generationmodule content
AI cover image generationImage generationimage prompt
AI video transcriptionAudio transcriptionaudio

Specific AI vendor names, processing locations, and contractual transfer mechanisms are disclosed to paying customers and business contacts on request via legal@getmentor.eu.

3. What data goes to AI

Only the data required for the task is sent to the AI provider:

  • AI Builder: the source text the user enters (pasted document, summary), and the module title.
  • AI metadata: existing title, description, and section titles of the module.
  • AI quizzes: section content of the module.
  • AI images: the prompt the user composes (typically the module topic).
  • Transcription: audio track of the video.

4. Minimization and redaction

Before sending to an external AI provider we run the helper redactPII (src/lib/ai/redact.ts), which best-effort removes common identifiers:

  • Emails (jane@firma.si[email])
  • Phone numbers (SI and international)
  • Slovenian personal IDs (EMŠO, 13 digits)
  • Tax numbers (SI + 8 digits)
  • IBANs (SI and EU formats)
  • Credit card numbers (13–19 digits)
  • URL tokens (?token=…, ?session=…) and Bearer … headers
  • Our internal IDs (CUID, UUID, long hex tokens)

The helper is idempotent and is used in AI Builder, AI metadata (title, description, tags), and AI quizzes. It preserves everything else (substance, language, pedagogical structure).

Important: minimization is defense-in-depth, not a substitute for a careful choice of what you paste into AI Builder. Don't upload sensitive personal data that isn't needed for training.

5. What we NEVER send to AI

  • Passwords (hashed or plain) — never part of an AI prompt.
  • Billing data, card numbers, Stripe internal IDs.
  • Audit logs, security tokens, webhook secrets.
  • Internal system secrets (CRON_SECRET, AUTH_SECRET, API keys).
  • Anything outside the module, quiz, or video file scope.

6. Admin controls

  • Global off switch: /admin/settings → Features → AI Builder OFF.
  • Built-in rate limits (50 AI generations per hour per user, 100 per tenant) protect against abuse.
  • Usage tracking: /admin/ai-usage or /owner/ai-usage shows token usage and estimated cost over time.
  • Telegram alert: if an AI call crashes, the owner receives a message (Phase L.1, rate-limited).

7. Verifying results

AI is an assistant, not an authority. Models can hallucinate, miss important details, or introduce subtle inaccuracies. Before publishing a module:

  • Review the entire generated content — section by section.
  • Verify all claims against a human source (manual, subject-matter expert).
  • Recheck quiz answers; AI may mark a wrong option as correct.
  • For legal, medical, financial, or safety training, require expert human review.