Lumina
Learn to think, not just answer
The problem Lumina solves
🧠 Lumina - Course-Specific AI Learning Assistant
Transforming AI in education from a homework-solving tool into a true learning companion.
🧩 Problem Statement
Traditional AI tutors and homework helpers solve problems for students instead of teaching them how to think. This leads to:
- 📋 Shallow learning — students memorize answers instead of understanding concepts
- 📚 Information overload — navigating dense PDFs, lecture notes, and handwritten material is overwhelming
- 📊 Zero faculty visibility — educators have no insight into student pain points or recurring misconceptions
- ⚠️ Trust & hallucination issues — generic AI tools produce unverifiable answers that institutions cannot audit
💡 Solution
RAG Tutor is a course-specific AI learning assistant that focuses on teaching, not solving.
It combines Retrieval-Augmented Generation (RAG) with Socratic questioning to guide students toward understanding concepts — without ever directly handing them the answer.
The system indexes all course materials (PDFs, text, handwritten notes via OCR) and provides citation-backed responses strictly from faculty-approved content — eliminating hallucinations entirely.
🚀 Key Features
🎓 Student-Centric Learning
- Socratic questioning — guides thinking, avoids direct answers
- Concept-based learning instead of solution dumping
- Personalized pacing and progress tracking
- AI-generated practice questions for exam revision
📚 Smart Knowledge Access
- Unified search across PDFs, lecture notes, and handwritten content
- OCR support for handwritten notes — instantly searchable
- Citation-backed answers with exact page/slide references
- Course-restricted knowledge — no external hallucinations, ever
👨🏫 Faculty Dashboard
- Real-time analytics on student queries and pain points
- Student engagement tracking and progress visibility
- Query pattern insights to detect misconceptions early
- One-time upload for all course materials
🔒 Trust & Safety
- ✅ 100% citation-backed responses
- ✅ No hallucinations — answers only from uploaded content
- ✅ Faculty-controlled and auditable knowledge base
- ✅ Transparent and verifiable learning system
- ✅ Privacy-focused data handling by design
⚙️ How It Works
Faculty Uploads → RAG Indexes → Student Queries → Socratic Reply
PDFs, notes, Chunked, Natural language Guided hints +
handwritten (OCR) embedded, questions citations, no
course-scoped direct answers
- Faculty uploads course materials (PDFs, slides, handwritten notes)
- RAG indexes all content into a course-scoped vector knowledge base
- Students query in natural language — any topic, anytime
- AI responds with Socratic guidance and verifiable citations
🌍 Real-World Use Cases
| Student Query | RAG Tutor Response |
|---|---|
| "Explain this concept from Lecture 5" | Guided Socratic explanation from actual uploaded notes |
| "Where is this topic mentioned?" | Direct citation with exact page/slide reference |
| Upload handwritten notes | OCR-processed and instantly searchable by all students |
| "Help me revise for the exam" | AI-generated practice questions from course content |
🎯 Impact
For Students
- Understand concepts deeply instead of memorizing answers
- Easily navigate large volumes of study material
- Get help anytime — 24/7 learning support
- Prepare better for exams with real understanding
For Faculty
- Identify weak areas in student understanding
- Reduce repetitive doubt-solving workload
- Improve course quality using data-driven analytics
For Institutions
- Ensure academic integrity with verifiable AI
- Provide reliable, citation-backed AI assistance
- Maintain full control over educational content
🛠️ Tech Stack
| Layer | Technology |
|---|---|
| Knowledge Retrieval | RAG (Retrieval-Augmented Generation) |
| Search | Vector Embeddings + Semantic Search |
| Document Processing | PDF Indexing, OCR for Handwritten Notes |
| AI Interaction | LLM with Socratic Prompting Mode |
| Analytics | Faculty Dashboard with Query Pattern Analysis |
🔐 Trust & Verifiability
RAG Tutor is built ground-up for institutional trust:
- No hallucinations — the model can only answer from uploaded course content
- Every response is cited — students see exactly which document and page was referenced
- Faculty-controlled — only approved materials enter the knowledge base
- Fully auditable — every query and response ca
Challenges I ran into
⚔️ Challenges We Ran Into
Every bug taught us something. Here's what broke, why it broke, and how we fixed it.
🔍 Challenge 1: The "Zero Chunks" Mystery
The symptom: Documents uploaded successfully but returned 0 chunks during indexing — completely unsearchable, no error thrown.
Root cause: A single line in the text cleaning function was silently destroying paragraph structure:
// ❌ Before — nukes all whitespace including newlines
text = text.replace(/\s+/g, " ");
With every newline stripped, the chunker had no paragraph boundaries to work with and produced nothing.
The fix:
// ✅ After — preserves newlines, only cleans horizontal whitespace
text = text.replace(/[^\S\n]+/g, " ");
Along with this, we added:
- Fallback chunk creation for edge-case documents
- Detailed pipeline logging at every stage
Key learning:
Silent failures are dangerous — always validate each stage of your pipeline explicitly.
🖼️ Challenge 2: Handwritten Notes Support (OCR Integration)
The problem: Students' handwritten notes existed as images (JPG, PNG, WEBP) — completely invisible to the system.
What made it hard:
- Supporting multiple image formats cleanly
- Integrating an external OCR API (OCR.space) reliably
- OCR output is messy — inconsistent spacing, stray characters, broken lines
- Image-extracted text needed to align with the existing PDF/text chunking pipeline
How we solved it:
- Built a dedicated image processing pipeline with OCR as a first-class input type
- Normalised OCR output before feeding it into the shared chunking system
- Added UI indicators so students know when a document was OCR-processed
- Unified all input types (PDF, text, image) into a single downstream flow
Key learning:
Adding a new input type impacts the entire system pipeline, not just one module. Design for extensibility early.
🔐 Challenge 3: API Key Security
The problem: During rapid prototyping, the OCR API key ended up hardcoded as a fallback:
// ❌ Dangerous — key exposed if repo is public
const ocrApiKey = process.env.OCR_SPACE_API_KEY || "fallback_key";
The fix:
- Removed every hardcoded secret from the codebase
- Enforced environment variable validation at startup — app refuses to run without required keys
- Added clear, descriptive error messages for missing configuration
// ✅ Fail fast and securely
if (!process.env.OCR_SPACE_API_KEY) {
throw new Error("OCR_SPACE_API_KEY is required. Check your .env file.");
}
Key learning:
Never hardcode secrets — fail fast, fail loudly, and fail securely.
📊 Challenge 4: Chunking Strategy Optimisation
The problem: Getting chunking wrong tanks the entire RAG pipeline:
| Strategy | Problem |
|---|---|
| Chunks too small | Context lost, answers feel incomplete |
| Chunks too large | Retrieval becomes imprecise |
| No overlap | Concepts split across boundaries get missed |
The solution — balanced chunking:
Chunk size : 600 tokens
Overlap : 150 tokens (25%)
Boundaries : Respect paragraph breaks
Guarantee : At least 1 chunk per document
This ensured retrieved chunks were both contextually rich and semantically precise.
Key learning:
Chunking is the silent backbone of any RAG system — it directly determines answer quality.
🐛 Challenge 5: Debugging Without Visibility
The problem: When something broke in the pipeline, we had no idea where. No logs, no breadcrumbs, just a wrong output (or no output at all).
The fix — logging at every stage:
File received → ✅ logged
Text extracted → ✅ logged
Cleaning applied → ✅ logged
Chunks created → ✅ logged (with count)
Indexed to store → ✅ logged
This turned "something is broken somewhere" into "step 3 produced 0 output for this document type."
Key learning:
Good logging isn't overhead — it's the difference between a 2-minute fix and a 2-hour debugging session.
💡 Overarching Takeaway
Each of these challenges pointed to the same underlying principle:
Build observable systems. Validate every stage. Log everything. Fail loudly. The bugs you can see are never the ones that hurt you — it's the silent ones.
Tracks Applied (1)
EDUCATION
Technologies used
