Applied AI · Child safety · EdTech

QuizKids: a child-focused AI quiz with layered safety architecture

Safety covers topic input, generation, storage, display, logs and provider failure. One prompt filter is not enough.

Production adventure-selection screen in the QuizKids AI quiz
A real production adventure-selection screen from QuizKids.

Verified outcome

  • Child profiles, mastery tracking and repeat protection
  • Local and semantic review of custom topics
  • Generated-question validation before display
  • Quotas, plans, paywall and payment webhooks

Why one filter is not enough

A user can submit unsafe content directly, hide it inside instructions or receive an unsuitable generated question. Checking only the first request moves risk downstream.

Input and output are reviewed separately, and rejected text does not enter the question bank or ordinary logs.

The layered pipeline

Topics pass local rules and semantic AI review. Generated questions are validated again before display.

Per-profile mastery excludes correct answers while missed questions may return after a deduplication window.

  • prompt-injection and unsafe-category controls
  • per-quiz session identifiers
  • local fallback for approved domains
  • rejected-input minimisation

Monetisation without state confusion

Free allowance, advertising and ad-free plans are confirmed by backend state. The paywall opens for a real quota limit, not a provider outage.

The payment boundary maps statuses, protects the webhook baseline and disables mock endpoints in production.

Production discipline

The backend listens on loopback and is exposed through Nginx. PM2, security headers, firewall rules, key-only SSH, health checks and real question-flow verification support operation.

A recovered frontend was changed through backups and a controlled hotfix process because its editable source tree was unavailable.

Practical questions

Can AI safety be absolute?

No. Layered checks, data minimisation, topic boundaries and human review reduce risk.

Why is mastery profile-specific?

One account can contain different children and levels; progress must not be mixed.

What needs testing before launch?

Moderation, paywall, provider failure, webhooks, logs, repeats and the real production response through Nginx.

Discuss a project · info@robert-aglyamov.ru