Skip to content

About

A learning analytics platform that generates assessments with AI and tracks behavioral telemetry, using RAG, a Supabase PostgreSQL backend and Streamlit.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Learning Analytics Engine

A student assessment platform that generates exams with AI, tracks behavior telemetry, and runs statistical analysis and predictive modeling.

Overview

The Learning Analytics Engine is an educational platform that combines real-time assessment delivery with data science and generative AI. Students take AI-generated, customized quizzes, and administrators follow cohort performance through interactive, predictive analytics.

The platform uses Retrieval-Augmented Generation (RAG) through multiple LLM providers (Google Gemini, OpenAI, Groq, Anthropic) to generate quiz questions from uploaded PDF study materials, and stores behavioral telemetry in a Supabase PostgreSQL backend.


System Architecture

graph TD
    subgraph "Generative AI / LLM Layer"
    I[Gemini / OpenAI / Groq / Anthropic]
    end

    subgraph "Application Layer"
    A[Admin Portal] -->|Manage Data| B[(Supabase PostgreSQL)]
    C[Student Portal] -->|Telemetry & Results| B
    C <-->|RAG PDF Chunking & Prompting| I
    end

    subgraph "Data Science & Analytics Layer"
    B --> D{Data Ingestion & Cleaning}
    D --> E[Pandas DataFrames]
    E --> F[Exploratory Data Analysis]
    E --> G[Scikit-Learn ML Models]
    end

    subgraph "Presentation Layer"
    F --> H[Streamlit UI Visualizations]
    G --> H
    end

    classDef io fill:#f9f0ff,stroke:#8a2be2,stroke-width:2px,color:#000;
    classDef core fill:#e1f5fe,stroke:#0288d1,stroke-width:2px,color:#000;
    classDef logic fill:#e8f5e9,stroke:#388e3c,stroke-width:2px,color:#000;
    classDef ext fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#000;

    class A,C,H io;
    class B,E core;
    class D,F,G logic;
    class I ext;
Loading

Features

Capability Description
Multi-Provider AI Engine Dynamically generates custom, on-the-fly questions (Single Choice, Multiple Choice, and Numerical) tailored to the user's selected difficulty and target exam format (e.g., GATE, CAT, UPSC). Supports Google Gemini, OpenAI, Groq, and Anthropic APIs.
RAG PDF Ingestion Upload your own course material (PDFs) and let the engine extract context, synthesize data, and generate high-quality examination questions based strictly on the syllabus provided.
Cloud PostgreSQL Backend Integrated with Supabase Serverless PostgreSQL for persistent storage of user logins, telemetry, and analytics records.
Placement Rounds Aptitude, technical MCQ, coding, system design, HR, group discussion and company-style mock rounds, each with its own format and enforced timer. Written answers are reviewed by AI against a rubric, with partial marks. Submitted code is never executed.
Dynamic Leaderboards Real-time, grouped hall of fame with explicit ranking. Filter top performers dynamically across specific Domains, Subjects, or Difficulty levels (Easy, Medium, Hard).
Personalized Analytics Students get a dedicated analytics tab with their own seaborn charts (Score Distribution, Duration vs. Score, and Competency Breakdown).
Machine Learning Implements Binary Classification (Pass/Fail), Regression (Score Prediction), and K-Means Clustering (Learner Segmentation).

Tech Stack

  • Machine Learning & Analytics: Scikit-Learn · Pandas · NumPy
  • Software Engineering: Python · Psycopg2 · PostgreSQL (Supabase)
  • Generative AI (LLMs): Google Gemini · OpenAI · Groq · Anthropic
  • Visualizations: Matplotlib · Seaborn · Streamlit
  • Document Processing: PyPDF (RAG Ingestion)

Directory Structure

Learning-Analytics-Engine/
│
├── app.py                              # Main Streamlit Web Application (Authentication & Routing)
├── pages/                              # Streamlit Multi-Page Components
│   ├── Student_Portal.py               # Interactive Assessment Engine & Student Dashboard
│   └── Admin_Portal.py                 # Secure Admin Auth, User Management & Analytics
├── auth_utils.py                       # Secure Authentication & Password Hashing
├── db_utils.py                         # Supabase PostgreSQL Connection & Schema Setup
├── llm_utils.py                        # Multi-LLM Provider API Integrations & RAG Logic
├── analytics.py                        # EDA & Descriptive Statistics Logic
├── ml_models.py                        # Scikit-learn Modeling Pipelines (Clustering, Regression)
│
├── Learning_Analytics_EDA.ipynb        # Jupyter Notebook for offline EDA
├── domains_catalog.json                # Pre-defined assessment domains & subjects catalog
├── placement.py                        # Placement round formats, rubrics and answer rules
└── README.md                           # Project Documentation

Setup and Installation

Prerequisites

  • Python 3.11+
  • A Supabase Account with a running PostgreSQL project
  • API Keys for one or more supported providers (Gemini, OpenAI, Groq, Anthropic)

1. Clone the Repository

git clone https://github.com/Shashank17singh/Learning-Analytics-Engine.git
cd Learning-Analytics-Engine

2. Install Dependencies

pip install -r requirements.txt

3. Configure API Keys & Database URL

The app requires a PostgreSQL database URL for telemetry, and API keys for generating AI-powered assessment questions. Set ADMIN_PASSWORD as well: without it, no admin account is created. Create a .streamlit/secrets.toml file in the project root:

# Database Connection (Required)
DATABASE_URL="postgresql://postgres:YOUR_PASSWORD@db.your-supabase-url.supabase.co:5432/postgres"

# AI Provider Configurations
# Note: You only need the key for the provider(s) you intend to use.
GEMINI_API_KEY="your-gemini-api-key"
OPENAI_API_KEY="your-openai-api-key"
GROQ_API_KEY="your-groq-api-key"
ANTHROPIC_API_KEY="your-anthropic-api-key"

4. Launch the Dashboard

Once the dependencies are installed and the secrets are configured, launch the Streamlit app:

streamlit run app.py

The app will open automatically in your browser at http://localhost:8501.


Key Workflows

  1. Dynamic RAG Generation: Generates real-time, context-aware assessments via external LLM APIs based on student uploaded PDFs or categorized domains.
  2. Immediate Feedback Loop: Submitting an assessment provides students with instant grading and transparent AI-generated explanations for incorrect answers.
  3. End-to-End Tracking: Student actions (time taken, accuracy, domain chosen) are stored in PostgreSQL with standardized dates and times, then analyzed with Pandas.
  4. Statistical Rigor & Visualization: Computes standard deviation, IQR, and Pearson correlation coefficients to identify conceptual bottlenecks. Visualized cleanly via Matplotlib and Seaborn for both students and admins.
  5. Predictive Modeling: Trains Random Forest and Logistic Regression models on-the-fly to predict student success based on behavioral telemetry.

Deployment

About

A learning analytics platform that generates assessments with AI and tracks behavioral telemetry, using RAG, a Supabase PostgreSQL backend and Streamlit.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages