HomeCase studiesAdaptive AI Online Learning Platform with Knowledge-Graph...

Case study · Helsinki, Finland

Adaptive AI Online Learning Platform with Knowledge-Graph Sequencing and Real-Time Mastery Tracking

Adaptive EdTech & Corporate Upskilling

Traditional corporate learning portals force experienced engineers and entry-level hires through identical linear video playlists, wasting instructional hours while failing to verify applied skill mastery. We engineered an adaptive AI online learning platform in Next.js, Python, and PostgreSQL that models learner competency continuously across prerequisite skill graphs. Diagnostic probes adjust lesson difficulty dynamically, Python workers grade open-ended labs via constrained rubric pipelines, and PostgreSQL with pgvector powers semantic remediation without abandoning deterministic curriculum governance.

Industry
Adaptive EdTech & Corporate Upskilling
Solution
A multi-tenant adaptive learning and corporate upskilling web platform combining a Next.js interactive studio with Python competency-estimation services and PostgreSQL vector-indexed curriculum storage.
Platforms
Web & API
Stack
Next.js · TypeScript · Python · FastAPI · PostgreSQL · pgvector
Location
Helsinki, Finland · delivered remotely
Role
Engineering, with the team behind for mobile and QA

Delivered remotely for a business based in Helsinki, Finland. Names withheld by agreement.

Project Overview

Fixed-sequence e-learning portals treat every learner as a blank slate. A senior cloud engineer onboarding onto an internal compliance track sits through the same introductory modules as a recent graduate, while a struggling trainee gets pushed forward simply because a video player reached the end of a playlist. For workforce upskilling teams operating out of Helsinki, that mismatch creates low completion discipline and weak retention on technical assessments.

We engineered an adaptive AI online learning platform built with Next.js, Python, and PostgreSQL. Rather than replacing instructional design with unguided chat boxes, the system encodes each curriculum as an explicit directed acyclic graph of competencies, pairs continuous diagnostic telemetry with Bayesian mastery updates in Python, and uses pgvector semantic matching to surface pinpoint remediation only where skill gaps actually appear.

Instructional Bottlenecks

Corporate training providers and technical academies brought four structural failures from legacy LMS deployments:

  • Static linear lockstep: Mandatory sequential click-through frustrated advanced staff who could have tested out of foundational modules in minutes.
  • Shallow completion metrics: Tracking page views and video watch time hid comprehension deficits until practical project reviews failed.
  • Manual remediation overhead: Instructors spent hours reviewing open-ended lab submissions and pointing learners back to specific handbook sections.
  • Catalog fragmentation: Separating quizzes, video transcripts, and enterprise HRIS rosters across multiple tools broke audit trails for regulated training tracks.

Architectural Strategy

Our engineering blueprint separated authoritative curriculum structure from probabilistic learner modeling. Instructional designers retain full control over learning outcomes, compliance gates, and passing thresholds inside a versioned skill graph in PostgreSQL. Meanwhile, Python microservices observe every quiz response, hint request, and interactive exercise submission to maintain live mastery probabilities per concept.

Next.js serves as the unified frontend and BFF edge layer, streaming server-rendered course overviews and managing low-latency practice sessions. Whenever a learner misses an applied concept, Python queries pgvector embeddings scoped strictly to approved course materials, surfacing a targeted micro-explanation or prerequisite refresher before advancing the learner along the path.

Core Capabilities

  • Adaptive Diagnostic Onboarding: Initial placement probes evaluate prerequisite readiness in minutes and grant verified mastery credits for already-known topics.
  • Interactive Multi-Modal Practice: Next.js lesson players combine timed scenarios, structured code or query sandboxes, branching case prompts, and synchronized video transcripts.
  • Rubric-Grounded AI Feedback: Python workers evaluate short-answer justifications against instructor rubrics, highlighting specific missing reasoning steps rather than issuing opaque scores.
  • Semantic Misconception Remediation: Vector similarity over curated lesson chunks retrieves exact refresher clips and worked examples when learners repeat an error pattern.
  • Enterprise Cohort & LTI Governance: Managers monitor team skill-gap heatmaps while LTI 1.3 and SAML connectors integrate cleanly with corporate identity providers and HR portals.

Technical Architecture

Next.js App Router handles authentication cookies, tenant theming, and interactive learner workspaces, communicating over typed REST and server-sent event endpoints with a Python FastAPI core. FastAPI delegates latency-insensitive mastery updates, embedding indexing, and AI rubric evaluations to Redis-backed worker pools, keeping interactive lesson transitions crisp.

Flow: Next.js Course Player → FastAPI Submission Gateway → Redis Streams Event Buffer → Python Mastery & Rubric Engine → PostgreSQL + pgvector Skill State → SSE Feedback Stream to Learner UI

All learner responses land in an append-only event log in PostgreSQL before any summary mastery score updates. If an instructional team recalibrates question difficulty weights mid-quarter, Python can replay historical response logs deterministically against the updated model parameters without losing auditability.

Technology Stack

Category Technology detail
Frontend Workspace Next.js App Router with React Server Components and TypeScript course player
Adaptive Backend Python FastAPI hosting competency estimation, sequencing, and rubric pipelines
Primary Database PostgreSQL managing tenant isolation, skill DAGs, and append-only attempt logs
Semantic Retrieval pgvector HNSW indexes matching learner misconceptions to targeted micro-lessons
Queue & Caching Redis Streams buffering telemetry bursts and orchestrating async lab grading
UI Design System Tailwind CSS component library with accessible keyboard-first code and quiz blocks
Enterprise Interop LTI 1.3, SCORM 2004, and SAML 2.0 connectors syncing rosters and completion states
Media Delivery HLS adaptive video streaming with time-coded transcript search and signed URLs
Observability OpenTelemetry traces correlating Next.js route latency with Python scoring workers

Engineering Trade-offs & Solutions

Engineering Challenge Solution & Trade-off
Pure AI path generation skipped mandatory compliance modules Restricted adaptive routing to edges inside an explicit PostgreSQL prerequisite DAG; requires upfront graph authoring by designers in exchange for guaranteed regulatory coverage.
Running a dedicated vector store duplicated tenant and catalog permissions Co-located embeddings in PostgreSQL via pgvector with composite tenant/catalog filters, trading standalone vector cluster sharding for atomic transactional consistency.
Synchronous LLM rubric scoring stalled page transitions for slow completions Streamed immediate objective checks first and dispatched generative rubric commentary over Redis Streams + SSE, adding minor client state complexity to keep UI interactions responsive.
Mid-cohort content edits broke in-progress learner progress calculations Versioned immutable course snapshots in PostgreSQL so active enrollments finish on their starting curriculum revision while new cohorts receive updated modules cleanly.

Security & Tenant Isolation

Corporate upskilling tenants store proprietary engineering playbooks, internal SOP videos, and employee skill evaluations. PostgreSQL enforces Row-Level Security policies keyed to organization ID on every enrollment, attempt, and embedding table, guaranteeing that semantic retrieval never leaks proprietary training snippets across customer boundaries.

Authentication integrates SAML 2.0 and OIDC single sign-on alongside scoped API tokens for HRIS roster syncs. Video assets and downloadable workbooks reside in private object storage accessed strictly through short-lived signed URLs minted per verified Next.js session, while AI evaluation prompts strip employee names and emails before external model inference.

Performance & Scale

Cohort launch days create sharp read/write spikes as hundreds of employees authenticate and launch diagnostic assessments simultaneously. Next.js caches published catalog metadata and static lesson shells at the edge, isolating PostgreSQL from repetitive syllabus reads.

On the write path, high-frequency heartbeat telemetry and step attempts enter Redis Streams for micro-batched persistence. Indexing curriculum embeddings by tenant partition keeps pgvector HNSW scans predictable, and Python scoring workers scale horizontally on queue depth without starving interactive API endpoints.

Operational Outcomes

Consolidating adaptive diagnostics, verified skill graphs, and enterprise reporting into one cohesive platform reshaped how organizations run technical onboarding and continuous learning:

  • Focused study time: Experienced learners bypass redundant basics through verified diagnostics, concentrating effort strictly on genuine competency gaps.
  • Actionable cohort visibility: L&D leads inspect real skill-node mastery distributions rather than misleading video-completion percentages.
  • Consistent instructor leverage: Rubric-assisted feedback handles routine formative explanations so human mentors spend time on nuanced project reviews.
  • Audit-ready compliance trails: Immutable attempt histories and versioned curriculum snapshots satisfy internal governance and external accreditation checks without manual spreadsheet reconciliation.

01 — Questions

asked about this kind of project

How does the platform decide which lesson or exercise to serve next without feeling erratic to learners?

Curriculum sequencing is constrained by a human-authored prerequisite DAG stored in PostgreSQL. Python runs Bayesian Knowledge Tracing over recent assessment signals to estimate mastery per skill node, then selects only from unlocked frontier concepts rather than jumping unpredictably across unrelated modules.

Why embed pgvector directly inside PostgreSQL instead of running a separate vector database?

Remediation search almost always filters by tenant ID, active catalog version, language, and prerequisite eligibility. Keeping embeddings inside PostgreSQL lets a single transactional query join vector similarity with relational permissions and curriculum state without cross-store synchronization lag.

How do you prevent AI-generated hints or rubric feedback from teaching incorrect technical facts?

Feedback pipelines never improvise from open model weights alone. Python grounds every hint prompt in verified instructional excerpts and canonical rubric criteria linked to that exact question ID, and deterministic unit tests or regex validators verify objective items before any generative explanation renders.

Why split the architecture between Next.js and Python FastAPI rather than keeping everything in Node.js?

Next.js excels at fast SSR course catalogs, role-gated portals, and interactive client assessments, while Python gives the engineering team native scientific libraries for mastery probability updates, embedding pipelines, and structured async grading workers.

How does the system handle burst traffic when an entire enterprise cohort starts a compliance or onboarding sprint simultaneously?

Telemetry events and exercise submissions flow into Redis Streams rather than writing directly into complex PostgreSQL mastery tables on the request path. Background Python workers batch mastery recalculations and flush append-only ledger rows smoothly under peak load.

03 — Similar project?

describe what is different about yours

Build yours.

Tell me what exists, what you need and the deadline. Fixed price for a defined scope, or $55/day (8–9 hours work) with a written plan first.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.