Bright Path Tuition Centre

AI management assistant for premium small-class tuition centres

Gemini 2.5 Flash FastAPI SQLite Python GitHub Pages

Project Overview & Problem Statement

Challenge: Malaysia permanently abolished UPSR and PT3. Assessment is now PBD + UASA, with Year 4 as the MOE anchor year from 2026. Tuition centre managers need to evaluate children's mastery, specialist quality, and secondary readiness across richer signals — but no software is built for this post-UPSR world.

Solution: Bright Path Tuition Centre is an AI agent that answers natural-language management questions by querying a 7-table database of 185 children, 22 specialist tutors, and 63 classes. It translates plain English questions into SQL, applies business rules (Year 4 anchoring, P5/P6 escalation logic, preferred terminology), and returns actionable answers with gap-to-fix recommendations.

Key Benefits

Application Features

Year 4 Anchor Report

Identifies mastery gaps in the MOE focus year. Year 4 is the anchor point for Malaysia's new assessment framework — this report surfaces children who need intervention before they fall behind.

P5/P6 Secondary Readiness

Critical escalation detection for children below the P4 baseline. Flags P5 and P6 children who are not on track for secondary school, enabling timely intervention.

Specialist Quality Audit

Compare tutors by improvement rate, not just attendance or hours taught. Identifies which specialists consistently move children forward and which need support.

Gap-to-Fix Recommendations

Every gap comes with a proposed 2-line intervention. Instead of just reporting problems, the system suggests specific actions the manager can take immediately.

Class Space Availability

Shows which classes have 2–3 seats available for new enrolments. Helps managers optimise class fill rates while maintaining the small-class premium promise.

Top Improvers

Celebrates children who jumped 15+ marks between assessments. Recognises progress and provides evidence for parent communication and tutor recognition.

AI Integration & Intelligence

NL-to-SQL via Gemini 2.5 Flash

Natural language questions are translated into safe, read-only SQL queries by Gemini 2.5 Flash. The model receives the full 7-table schema and business rules in its system prompt for grounded, accurate responses.

Business Rules in System Prompt

Year 4 anchor flags, P5/P6 escalation logic, and preferred terminology ("children" not "students") are injected into the system prompt. The AI enforces domain conventions without manual oversight.

Temperature 0.0 Consistency

All queries use temperature 0.0 for deterministic, repeatable answers. A manager asking the same question twice will always get the same result — critical for trust in data-driven decisions.

Safe SQL Execution

Generated SQL is validated before execution. Only SELECT statements are allowed — no INSERT, UPDATE, DELETE, or DROP. The database remains read-only and tamper-proof at the application layer.

Technical Architecture & Implementation

Frontend Stack

HTML CSS JavaScript Poppins Font Brown/Gold Theme

Backend Stack

FastAPI Python SQLite Gemini 2.5 Flash

Deployment

GitHub Pages Docker Google Cloud Run

Database Schema (7 Tables)

System Architecture

Key Metrics

185
Children (Preschool to P6)
22
Specialist Tutors (1:9 ratio)
63
Classes (max 10 per class)
7
Database Tables

Business Value