Skip to content
Back to Projects
AI & DevOps Lead2026Backend Lead, Database & DevOps Engineer

M3ATRON (Multi-Agentic AI Tutoring System)

Led backend, database, and deployment work for a team final-year project. The AI tutor streams answers grounded in course materials and revisits prerequisites when a learner gets stuck.

Trade-offCourse retrieval lets instructors update material without retraining the model. Grounding depends on what they upload and what search retrieves.

Our team built a tutoring system with separate agents for teaching, challenging misconceptions, and revisiting prerequisites. I led the backend, database, and deployment work, connecting the agents to course retrieval and a streaming interface.

Problem Statement

Generic AI tutors lack domain awareness, hallucinate course materials, cannot adapt pedagogically, and fail to challenge student misconceptions in academic settings.

Engineering Solution & Architecture

Multi-Agent Backend Orchestration: Architected a 3-tier asynchronous system using FastAPI, LangGraph, and Supabase (pgvector) to coordinate specialized agents (Teacher, Devil's Advocate, Backtrace).

Course-Grounded RAG Pipeline: The document service indexes course PDFs and returns relevant passages with their source and page. The tutoring service supplies that context to the model.

Intelligent Intent Routing & Backtracing: Designed an intent classification router that tracks student confusion count (threshold ≥ 2) and automatically rewrites queries to teach foundational prerequisites.

Real-Time Token Streaming: Streamed responses using Server-Sent Events, with separate events for the responding persona, answer text, and citations.

How It Fails Gracefully

Course scope: the chat API verifies session access and uses the session course to retrieve material. Retrieved passages carry source and page information.
Model fallback: the generation request configures an alternate model through LiteLLM. The chat API saves the question before generation and attempts to persist any answer text received if the stream ends early.
Graceful degradation: once a student's confusion count crosses threshold, the system doesn't just keep repeating itself — it backtraces to the relevant prerequisite topic and re-teaches from there.

Tech Stack

FastAPIPythonNext.js 15LangGraphSupabase (pgvector)LiteLLMGroqGemini APITailwind CSS

Need Something Similar Built?

Let's build secure, scalable solutions tailored for your business.

Let's Talk