Inspiration
Learning should be more than asking questions and receiving answers. It should be an experience that helps learners understand concepts at their own pace, identify gaps in their knowledge, and build confidence as they progress.
Lucify was inspired by my goal of making learning easier, more interactive, and more personalized. I took inspiration from tools like NotebookLM and other LLM-powered learning experiences, particularly how their harnesses use source material to answer questions and help learners explore complex topics.
I wanted to take that idea a step further: What if an AI tutor not only understood the study material, but also understood how well the learner knew it?
That question became the foundation of Lucify. Instead of creating another general-purpose chatbot, I set out to build a personalized learning companion that connects answers directly to course materials, adapts to individual learning needs, and helps students understand what to study next.
My goal is to give learners the freedom to explore, ask questions without hesitation, revisit difficult concepts, and learn at their own pace while keeping the learning process grounded in reliable sources.
What it does
Lucify is a source-grounded, personalized AI tutor that transforms lecture videos, textbooks, and slide decks into an interactive learning experience.
Learners can upload their study materials and use them as a unified knowledge base for tutoring, revision, and assessment.
Key features include:
Source-grounded AI tutoring: Learners can ask questions about their course material and receive answers supported by citations linking directly to the relevant page, slide, timestamp, or diagram. When the uploaded material does not cover a question, Lucify can refuse to answer rather than guess.
Multimodal learning: Lucify processes documents, presentations, and lecture videos. It extracts text, tables, figures, diagrams, and timestamped transcripts to make different forms of learning material searchable.
Personalized explanations: The tutor uses the learner's estimated mastery of relevant topics to adjust explanation depth. It can revisit fundamentals for weaker topics and provide more concise, advanced explanations for concepts the learner understands well.
Adaptive assessments: Lucify generates multiple-choice and short-answer questions from uploaded material. A separate model verifies generated questions, while duplicate detection helps prevent repetitive assessments.
Dynamic learner modeling: Lucify tracks topic-level mastery using Bayesian Knowledge Tracing, estimates question difficulty using Item Response Theory, and schedules reviews using spaced repetition and a forgetting curve.
Personalized revision: Learners can generate summaries, Cornell notes, cheat sheets, and flashcards. Lucify also recommends weak topics, identifies likely misconceptions, and helps learners decide what to study next.
Study planning: Lucify uses mastery estimates, review urgency, prerequisite relationships, and exam dates to help organize revision and anticipate retention.
Voice-based learning: Learners can optionally interact with the tutor using speech, making the experience more conversational and hands-free.
Learning analytics and evaluation: I developed an evaluation approach for examining retrieval quality, answer faithfulness, citation accuracy, refusal behavior, and personalization against course-specific test cases.
Ultimately, Lucify turns static study resources into a learning environment that evolves with the learner. It does not just help students find answers; it helps them understand their progress and make better decisions about what to learn next.
How I built it
I built Lucify around one core principle: use language models where they add value, and use deterministic, efficient systems wherever possible.
Rather than sending every task to an LLM, I designed a structured harness that combines retrieval, grounding, model verification, learner-state tracking, and adaptive learning logic.
1. Building a unified knowledge base
I created an ingestion pipeline that processes PDFs, slide decks, documents, and lecture videos. Docling extracts structured document content while preserving page numbers, slide locations, tables, and figures. For image-only slides and diagrams, I use a vision model to recover text and describe visual information. Lecture videos are processed using FFmpeg and Whisper to extract timestamped transcripts and relevant keyframes.
Each extracted content unit retains its source location, allowing Lucify to connect learning interactions back to the original material.
2. Creating a source-grounded tutoring harness
I implemented hybrid retrieval using PostgreSQL, pgvector, and full-text search. Semantic and lexical results are combined using Reciprocal Rank Fusion to retrieve relevant passages.
Before generating an answer, a coverage gate checks whether the retrieved material sufficiently supports the question. If the evidence falls below the configured threshold, Lucify refuses the request without calling the generation model.
For supported questions, the model generates a structured answer with citations. I validate citation markers against the retrieved sources and remove unsupported citation references. General knowledge, when available, is separated from content grounded in the learner's material.
This makes source grounding a property of the system architecture rather than relying on a prompt instruction alone.
3. Building the personalized learner model
I designed a learner model that combines three complementary techniques:
- Bayesian Knowledge Tracing estimates the probability that a learner has mastered a topic.
- Item Response Theory estimates learner ability and helps select an appropriate question difficulty.
- SM-2 spaced repetition and a forgetting curve help determine when a topic should be reviewed.
Assessment results update mastery estimates, while topic hierarchies and prerequisite relationships help identify foundational gaps. Conversation signals also contribute weaker evidence of understanding or confusion.
The tutor receives the learner's mastery estimates for the topics relevant to a question, allowing it to adapt the depth of its explanations.
4. Generating and validating assessments
I implemented a pipeline that generates questions from retrieved course excerpts and associates them with their source locations and topics. A separate model from a different model family independently checks whether questions are answerable, whether proposed answers are defensible, and whether multiple options could be correct.
I also implemented question novelty checks using normalized fingerprints and embedding similarity to help reduce repetition across quizzes.
After an assessment, Lucify updates the learner model and produces feedback, topic-level mastery changes, likely misconceptions, and recommendations for subsequent study.
5. Building the application and infrastructure
I built the application using Next.js, React, and Tailwind CSS for the frontend, with FastAPI powering the backend. PostgreSQL with pgvector stores course content, retrieval data, assessment records, and learner state. Upstash Redis supports live progress updates and background-task coordination.
I use local embeddings to reduce API usage and reserve external model calls for tasks such as generation, vision, and transcription. Response caching, background processing, token budgeting, and request prioritization help the system operate within constrained model API limits.
The result is a learning harness that combines LLM flexibility with retrieval, explicit evidence, mathematical learner modeling, and structured evaluation.
Challenges I ran into
One of my biggest challenges was moving beyond a simple LLM wrapper and building a system that could support trustworthy, personalized learning end to end.
Preventing hallucinations: A language model can produce a convincing answer even when the source material does not support it. I addressed this through hybrid retrieval, a pre-generation coverage gate, citation validation, and explicit separation of outside knowledge. I also had to account for the fact that these mechanisms reduce risk but do not eliminate every possible factual or grounding error.
Understanding visual learning material: Many lecture slides are image-only PDFs. Ordinary text extraction cannot recover the meaning of a diagram, so I incorporated vision-based processing to interpret both visible text and visual relationships. This improved searchability but introduced additional processing time and token costs.
Personalizing learning meaningfully: A quiz score alone is not a reliable representation of what a student knows. I implemented topic-level mastery estimates, difficulty-aware evidence updates, forgetting, prerequisite propagation, and adaptive question selection. Designing these components to work together while remaining interpretable was a substantial challenge.
Working within strict API limits: The available Groq tier imposed limits of 8,000 tokens per minute and 200,000 tokens per day. Vision-based ingestion, especially for large slide decks, could consume a significant portion of the daily budget. I responded with local embeddings, caching, request-size limits, token budgeting, and prioritization of interactive tutoring requests over background work.
Keeping the experience responsive: Document processing and quiz generation can take time, so I moved long-running tasks into background workers and streamed progress to the interface. I also warmed the embedding model at startup and optimized repeated requests through persistent caching.
Evaluating personalization honestly: Showing that learners improve over several sessions is not enough to prove that adaptation caused the improvement. I designed simulated-learner evaluations with adaptive and non-adaptive control arms to compare outcomes while tracking calibration error and question repetition. These evaluations provide a useful test harness, although simulated learners cannot fully represent real students.
These challenges taught me that building an effective AI tutor is not just about making a model answer questions. It requires careful orchestration, reliable evidence, efficient infrastructure, and an honest understanding of what the system can and cannot guarantee.
Accomplishments that I'm proud of
I'm proud of building Lucify as a complete learning system rather than a standalone chatbot.
A unified learning workspace: I brought textbooks, presentations, and lecture videos into one searchable knowledge base while preserving links to their original locations.
Grounding built into the architecture: I built a system that can decline unsupported questions before generation and validate citations against retrieved evidence, helping learners distinguish source-backed answers from unsupported claims.
A learner model that evolves: I combined mastery estimation, adaptive difficulty, forgetting, and spaced repetition into a persistent model that influences both tutoring and revision.
An end-to-end adaptive assessment pipeline: I built source-grounded question generation, independent model verification, duplicate detection, grading, and personalized feedback.
A course map that guides learning: I developed topic and prerequisite relationships from course material and connected them to mastery information to identify useful next steps.
Multimodal content understanding: I enabled Lucify to make image-only slides and visual diagrams searchable alongside document text and timestamped lecture transcripts.
A more efficient LLM harness: By running embeddings, retrieval, and learner-model calculations locally, I reserve expensive API calls for tasks that genuinely benefit from language models.
An evaluation framework: I developed course-specific tests for retrieval quality, citation locations, unsupported-question refusals, and simulated personalization performance.
Most importantly, I'm proud of the central idea behind Lucify: learning tools should adapt to the student, not force every student through the same explanation, quiz, and revision plan. Building this independently also gave me the opportunity to work across the entire stack, from document ingestion and retrieval to adaptive algorithms and the user interface.
What I learned
Building Lucify taught me that the quality of an AI learning experience depends as much on the harness around the model as on the model itself.
I learned that retrieval must happen before generation, citations must be grounded in actual source records, and unsupported questions need an explicit handling strategy. Prompting a model to be accurate is not a substitute for system-level checks.
I also learned that personalization requires more than remembering previous conversations. It needs a structured representation of what the learner understands, how uncertain that estimate is, how difficult a question was, and when previously learned material may need revision.
Another important lesson was the value of using conventional algorithms alongside LLMs. Bayesian Knowledge Tracing, Item Response Theory, and spaced repetition provide a transparent foundation for decisions that do not need to be delegated to a language model.
On the engineering side, I learned how quickly API limits can shape architectural decisions. Local processing, caching, request budgeting, background jobs, and prioritization are not merely optimizations when resources are constrained; they are essential to making the product usable.
Finally, I learned the importance of honest evaluation. A system that produces fluent answers is not necessarily grounded, and a learner model that reports rising mastery is not necessarily calibrated. Testing source retrieval, refusals, and adaptive performance separately gives me a clearer understanding of where Lucify works and where it still needs improvement.
The biggest takeaway is that a good AI tutor should not simply know the answer. It should know what evidence supports that answer, what the learner may already understand, and what would help them learn next.
What's next for Lucify
I see Lucify as a foundation that I want to develop into a more reliable, accessible, and deeply personalized learning companion.
1. Better personalization through real learning outcomes
I want to evaluate Lucify with real learners across multiple sessions, compare adaptive and non-adaptive experiences, and calibrate the learner model using observed outcomes. This would help me move beyond simulated learners and improve the reliability of mastery estimates.
2. Stronger grounding and verification
I plan to improve retrieval thresholds, test more difficult questions that are related to but not covered by the course, and strengthen verification of individual claims. I also want to investigate ways to detect errors in automatically generated descriptions of diagrams and other visual material.
3. More efficient and scalable infrastructure
Reducing ingestion costs and waiting times remains an important priority. I want to improve shared rate-limit coordination, optimize vision processing, expand caching, and explore additional model providers or higher-capacity inference options without compromising the grounding workflow.
4. More interactive learning experiences
I envision richer tutoring sessions with guided problem-solving, follow-up questions, step-by-step explanations, and more opportunities for learners to demonstrate understanding rather than simply recognize the correct answer.
5. Improved revision and study planning
I want to make study plans more responsive to changing mastery, exam deadlines, retention forecasts, and prerequisite gaps. Future iterations could help learners balance new topics with spaced review and provide clearer explanations of why a particular topic should be studied next.
6. Broader accessibility
I want to improve voice-based learning, multilingual tutoring, and support for different explanation styles so learners can engage with difficult material in ways that suit them.
7. A more complete learning feedback loop
My long-term vision is for Lucify to connect every stage of learning: ingesting material, explaining concepts, assessing understanding, tracking mastery, identifying gaps, and recommending the next learning activity.
I want Lucify to become more than a place to ask questions. I want it to be a companion that helps learners understand where they stand, discover what they need to work on, and make steady progress toward their goals.
My vision is simple: make personalized, evidence-grounded learning more accessible to everyone, one concept at a time.
Built With
- alembic
- bge-embeddings
- docling
- ffmpeg
- github
- groq
- llm
- neon
- next.js
- pgvector
- postgresql
- python
- qwen
- ragas
- railway
- redis
- sarvam-api
- sqlalchemy
- tailwind-css
- typescript
- vercel


Log in or sign up for Devpost to join the conversation.