Inspiration
As students and lifelong learners, we have all experienced the exhaustion of fragmented study materials: lecture videos on YouTube, 100-slide PowerPoint presentations, dense 500-page PDF textbooks, and scattered lecture notes. When exams approach, synthesising this material is overwhelming. Current generic AI tools often hallucinate unsupported facts, cannot point back to the exact textbook page or video timestamp, and test students with static, uncalibrated questions that either bore them or demoralise them.
We asked ourselves: What if an AI study companion could ingest all of a student's disparate resources into a unified knowledge base, strictly ground every answer with traceable citations, calibrate quiz difficulty in real time based on demonstrated mastery, and generate a dynamic study roadmap?
That vision led us to build LearnMate AI.
What It Does
LearnMate AI is an end-to-end personalized tutoring and adaptive learning platform that unites multi-format study materials into an interactive, source-cited learning environment:
- Multi-Format Knowledge Ingestion: Ingests PDFs, PowerPoint slide decks (PPT/PPTX), Word documents (DOCX), plain text notes (TXT), and video subtitle transcripts (SRT/VTT), alongside YouTube lecture video URLs. Documents are semantically chunked with page numbers, slide titles, and subtitle timecodes preserved.
- Source-Cited AI Study Assistant: Operates under strict RAG (Retrieval-Augmented Generation). Every explanation cites the exact source file, page/slide number, and verbatim excerpt. If the requested information isn't in the uploaded notes, it explicitly states that sources are insufficient, preventing hallucinations.
- Adaptive Quiz Generator: Automatically generates 4-option multiple-choice quizzes with dynamic difficulty scaling:
- Consistently answering correctly increases difficulty ($\text{Easy} \to \text{Medium} \to \text{Hard}$).
- Struggling on questions dials down difficulty to rebuild fundamentals and flags weak topics for targeted remediation.
- Personalized Learning Path: A transparent, rule-based mastery state machine evaluates topic accuracy ($A \ge 80\%$ with $\ge 3$ attempts unlocks Mastered). It prioritises prerequisite concepts and generates next-step recommendations.
- Progress & Retention Analytics: Interactive Recharts visualizations track score trajectories, topic-by-topic mastery distributions, and study activity streaks.
- Zero-Paid-API Evaluator Demo: Features a 1-click demo student account pre-seeded with real Computer Science, AI, and Biology course materials, powered by an autonomous offline RAG fallback.
How We Built It
We designed LearnMate AI with a modern, decoupled full-stack architecture:
- Frontend: Built with React.js and Vite, styled using a bespoke vanilla CSS design system (no Tailwind CSS) supporting full Light and Dark modes. Interactive analytics are driven by Recharts, and visual elements utilize Lucide React.
- Backend: High-performance asynchronous API built using Python 3.14 and FastAPI, with SQLAlchemy ORM and SQLite for relational persistence.
- Document Processing Pipeline: Multi-format parser utilizing PyMuPDF (
fitz), pypdf, python-pptx, and python-docx, coupled with custom regex parsers for SRT/VTT video cues. - Retrieval & RAG Engine: Hybrid BM25 Okapi and TF-IDF keyword retriever with English stop-word filtering and cosine-normalized ranking scores: $$\text{Score}(D, Q) = \sum_{q_i \in Q} \text{IDF}(q_i) \cdot \frac{f(q_i, D) \cdot (k_1 + 1)}{f(q_i, D) + k_1 \cdot \left(1 - b + b \cdot \frac{|D|}{\text{avgdl}}\right)}$$
- Security & Auth: Secure password hashing with BCrypt and HMAC-SHA256 JWT session tokens.
- Configurable AI Layer: Unified service supporting Google Gemini 1.5, OpenAI GPT-4, local Ollama models, and an offline deterministic grounded synthesis engine.
Challenges We Faced
- True Citation Traceability Across Binary Formats: Extracting clean text from heterogeneous formats while retaining exact page indices from PDFs, slide titles from PPTXs, and start/end timecodes from subtitle files required building custom metadata-preserving parsers.
- Preventing AI Hallucinations in Educational Settings: In education, a plausible-sounding hallucination is harmful. We enforced a strict relevance threshold in our BM25 retrieval pipeline; if a query fails to match extracted course materials, the assistant rejects the query rather than guessing.
- Dynamic Difficulty Calibration Without Flukes: Designing an adaptive algorithm that responds to real learning trends rather than single lucky guesses required a streak-sensitive state machine balancing consecutive correct answers against mistake penalties.
- Reliable Zero-Cost Demo Experience: We wanted hackathon evaluators to test every feature without needing their own paid API keys. Engineering a deterministic, high-quality RAG fallback and pre-seeding realistic course modules took extensive testing.
Accomplishments That We're Proud Of
- 16 Passing Unit & Integration Tests: Fully automated test suite validating authentication, document extraction, BM25 retrieval, quiz scoring, and difficulty calibration.
- Clickable, Traceable Citations: Students can click any citation badge on an AI response or quiz question to inspect the verbatim source passage extracted from their actual materials.
- Pure CSS Theme System: Created a responsive, fluid design system with instant Light/Dark switching without external UI utility frameworks.
- End-to-End Functionality: Every button, modal, quiz submit, and roadmap update is fully functional and backed by persistent SQLite storage.
What We Learned
- How to architect robust RAG pipelines that prioritise citation accuracy and negative rejection over unbounded text generation.
- How to design transparent, rule-based mastery algorithms that provide actionable student guidance without black-box opacity.
- The power of decoupled modern full-stack development using FastAPI and React Vite for responsive educational applications.
What's Next for LearnMate AI
- OCR & Handwritten Notes Ingestion: Adding OCR support via Tesseract and vision models to process scanned student notebooks and handwritten formulas.
- Audio Lecture Transcription: Integrating local Whisper AI models for direct audio and video lecture transcription.
- Spaced Repetition & Flashcard Sync: Implementing the SuperMemo (SM-2) algorithm and automated Anki deck export.
- Collaborative Study Rooms: Enabling peer study sessions with synchronized adaptive quizzes and team mastery challenges.
Log in or sign up for Devpost to join the conversation.