Overview
Sunschool uses advanced AI to generate personalized educational content tailored to each learner’s grade level and learning needs. The system combines multiple AI providers and intelligent prompt engineering to create engaging, age-appropriate lessons.AI-Powered Lesson Generation
Multi-Provider Architecture
Sunschool uses a flexible AI provider system to ensure reliability and quality:- Primary Provider: OpenRouter with Google Gemini 2.0 Flash
- Fallback Providers: Bittensor, Perplexity
- Specialized Services: Image generation, diagram creation, SVG generation
Grade-Specific Prompts
Each grade level has carefully crafted prompts that ensure age-appropriate content:K-2 (Ages 5-7)
Grade 3-4 (Ages 8-10)
Grade 5-6 (Ages 10-12)
Grade 7-8 (Ages 12-14)
Grade 9+ (High School)
Lesson Structure Generation
Word Limits by Section
The system enforces strict word limits to ensure appropriate content length:Mandatory Section Ordering
All lessons follow a proven pedagogical structure:- Introduction: Hook + connect to prior knowledge
- Key Concepts: Core ideas with definitions
- Examples: Worked examples showing concepts in action
- Practice: Student activities or problems
- Summary: Brief recap of covered content
Content Validation
The system validates all generated content to ensure quality:Validation Rules
Lessons must have at least 2 quiz questions
All sections must follow proper type structure
Word counts must not exceed grade-level limits
Image descriptions must be concrete and specific
No references to images in lesson text
Quiz Question Generation
AI generates comprehension questions tailored to each lesson:Visual Content Generation
The AI system also generates visual aids:Image Generation
- Uses Stability AI for photorealistic images
- SVG generation for diagrams and illustrations
- All images have specific, concrete descriptions
- No text or numbers overlaid on images
Diagram Types
- Flowcharts
- Concept maps
- Comparison diagrams
- Cycle diagrams
- Hierarchies
The system caps images at a maximum per lesson to ensure fast loading and appropriate visual density for the grade level.
Mathematical Notation Rules
Each grade level has appropriate mathematical notation:- K-2
- 3-4
- 5-6
- 7-8
- 9+
Best Practices
Consistent Metaphors
AI uses ONE concrete metaphor throughout the lesson (e.g., pizza slices for fractions)
No False Promises
Summaries only mention topics actually covered in the lesson
Short Paragraphs
Maximum 2-3 sentences per paragraph for readability
Vocabulary Emphasis
Bold formatting for new vocabulary terms when first introduced
Related Features
Grade Levels
Detailed grade-level content approaches
Adaptive Learning
How lessons adapt to learner performance
Concept Tracking
Tracking understanding of individual concepts