|
AI & Machine Learning Prototype 2024

AI Learning Engine

Turning Learning Data into Actionable Insights

PHPMySQLAI llm engineRubix MLJavaScriptHTMLCSS

Project Overview

The AI Learning Engine is a prototype learning analytics system built to explore how AI-assisted recommendations can improve the feedback loop between student performance data and teaching adjustments. The system processes student activity records, identifies recurring error patterns, and generates structured recommendations using the AI llm engine.

This project was developed as a technical exploration to validate whether a lightweight PHP + MySQL pipeline could integrate meaningfully with a large language model API to surface actionable insights — without requiring a dedicated data science infrastructure.

The Problem

Aggregate scores — totals and averages — are the most common output of existing assessment systems. They tell you that a student scored 62%, but not which concepts are causing difficulty, how often the same errors recur, or what corrective action might help.

Educators who want more granular insight are left to manually review individual answer records — a time-intensive process that doesn't scale. The goal was to automate the pattern-detection step and generate usable recommendations from it.

Technical Approach

The system is built in three stages:

  1. Data ingestion: Student answer records are stored in a MySQL database with question metadata (topic, difficulty, expected answer).
  2. Pattern analysis: A PHP pipeline using Rubix ML analyzes incorrect answers to identify topic-level error clusters — which subjects, question types, and difficulty levels are producing the most failures.
  3. AI recommendation: The error pattern summary is passed to the AI llm engine as a structured prompt. The API returns a targeted learning recommendation in plain language, which is stored and surfaced to the teacher dashboard.

System Architecture

Student Activity Quiz answers & timestamps
MySQL Database answers · questions · students
PHP Analysis Pipeline Rubix ML · error clustering · topic mapping
AI llm engine Prompt: error pattern → recommendation
Teacher Dashboard Displays recommendations per student

Key Technical Decisions

Why PHP + Rubix ML?

The existing system was already PHP/MySQL-based. Introducing a Python data science stack would have added significant deployment complexity for a prototype. Rubix ML provides enough ML capability (k-means clustering, simple classifiers) to handle the pattern detection task within the existing runtime — keeping the stack coherent.

Prompt Design for AI llm engine

Rather than passing raw data to the LLM, the pipeline constructs a structured natural-language summary of the error patterns before the API call. This produces more consistent, actionable outputs and reduces token usage. The prompt format was tested and refined over multiple iterations.

Storing Recommendations

Recommendations are persisted in the database rather than generated on-demand. This avoids repeated API calls for the same data and allows teachers to review historical recommendations — an important consideration for any production deployment of this design.

Known Limitations

  • This is a prototype. It has not been validated with real student data at scale.
  • LLM output quality depends on the quality and structure of the prompt. Edge cases with sparse data may produce less useful recommendations.
  • Rubix ML's PHP-native ML capabilities are limited compared to Python libraries. For production use at scale, a dedicated data pipeline would be more appropriate.
  • The system currently generates recommendations per-student. Class-level aggregation is a planned extension but not implemented.

Stack Details

LayerTechnologyPurpose
FrontendHTML, CSS, JavaScriptTeacher and student UI
BackendPHPApplication logic, API calls
DatabaseMySQLStudent records, answers, recommendations
MLRubix ML (PHP)Error pattern clustering
AIAI llm engineRecommendation generation

What This Project Demonstrated

Integrating a generative AI API into an existing PHP application is technically straightforward. The harder problem is designing the data pipeline that feeds the API — specifically, constructing input summaries that are structured enough to produce consistent, useful outputs. Prompt engineering is a real skill.

This project also clarified the limits of PHP-native ML. For production learning analytics at scale, a dedicated Python pipeline (or a hosted ML service) would be a better architectural choice. The prototype demonstrates the concept; a production version would need a redesigned data layer.

Current Status

Prototype. The system demonstrates the core pipeline — data ingestion, pattern analysis, API recommendation, and dashboard display — but has not been validated in a real educational environment. Further development would require structured testing with real student data and a more rigorous evaluation of recommendation quality.