This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
Every student, researcher, and lifelong learner knows the dreaded "pre-study grind": you have an upcoming test or certification exam, and you're staring at an 80-page PDF of lecture slides or research chapters. Before you can even begin absorbing the material, you spend hours on repetitive, mechanical chores:
- Copying and pasting text into flashcards.
- Manually highlighting and summarizing bullet points.
- Inventing hypothetical test questions to quiz yourself.
- Formatting cheat sheets and revision summaries.
LazyNotes AI is an open-source, local-first educational copilot that rewards productive laziness. By letting open-source AI do the heavy lifting, students simply drag and drop any educational PDF, and within seconds the application automatically generates:
- Multi-Style Structured Notes: Choose between Beginner-Friendly, Exam-Oriented Bullet Points, Short Revision Notes, and Detailed Chapter Notes.
- Verified Multiple-Choice Questions (MCQs): Generates 5, 10, 15, or 20 questions with 4 distinct options, unambiguous correct answers, full explanations, and source page citations.
- Interactive Quiz Engine: Practice Mode for instant answer feedback or Exam Mode with scoring, percentage calculations, and review.
- Subjective Exam Q&A: Short- and long-answer questions complete with structured model answers and comparison tables.
- Active Recall Flashcards: Interactive, flippable cards with progress tracking.
- Grounded "Ask Your PDF" Assistant: Ask questions about the document with page citations and built-in defenses against prompt injections.
-
One-Click Study Pack Exports: Download everything as clean Markdown (
.md), Plain Text (.txt), or printable PDF (.pdf).
Who gets to be lazy? Students, educators, and self-learners, who can now skip the tedious hours of note formatting and jump straight to active learning and retention.
Demo
Here is a quick walkthrough of the interface and study workflow:
-
Dashboard & Local Health Check: Automatic connection status check for the local Ollama daemon and active model (
qwen2.5:3b). - Instant Demo Button: A built-in "Load Sample Biology Guide (Offline Demo)" button lets anyone test the complete extraction and quiz workflow immediately without needing their own PDF.
- Interactive Tabs: Clean separation between Study Notes, MCQ Generator, Interactive Quiz, Exam Q&A, Flashcards, Ask Your PDF, and Downloadable Study Pack.
-
Live Local Demo: Run
streamlit run app.pylocally on port 8501. -
Step-by-step Demo Script: Check out the complete walkthrough script in the repository:
docs/demo_script.md.
Code
The complete source code is open-source under the permissive MIT License:
IamCodingWau
/
LazyNotes-AI
Study less manually. Learn more efficiently. Local AI study notes, quizzes & flashcard generator for Hacktoberfest 2026 Week 3
🎓 LazyNotes AI
Study less manually. Learn more efficiently.
Built for the Hacktoberfest Open-Source AI Challenge: Week 3 (“Slow and Steady”).
LazyNotes AI is an offline-capable, privacy-first educational copilot that transforms static lecture slides, textbooks, and research papers into structured revision notes, exam-oriented MCQs, interactive quizzes, model Q&As, and flashcards—using 100% local open-weight AI models via Ollama.
🌟 Key Features
- đź“‘ Smart PDF Extraction: Extracts clean page-wise text, validates PDF signatures, detects scanned/unreadable documents, and flags OCR requirements.
- 📝 Multi-Style AI Notes: Choose between Beginner-Friendly, Exam-Oriented Bullet Points, Short Revision Notes, and Detailed Chapter Notes.
- 🎯 MCQ Generator: Generates 5, 10, 15, or 20 multiple-choice questions with 4 distinct options, verified answers, explanations, and page citations.
- 🕹️ Interactive Quiz Platform: Practice mode with instant feedback or timed Exam mode with score calculations and answer reviews.
- 💡 Subjective Exam Q&A: Produces short and comprehensive long-answer…
- GitHub Repository: https://github.com/IamCodingWau/LazyNotes-AI
How I Built It
LazyNotes AI is built from the ground up around open-source AI and local inference:
Architecture Overview
flowchart TD
User([Student / User]) -->|Uploads PDF| UI[Streamlit UI Dashboard]
UI -->|Raw File Stream| PDFProc[PyMuPDF Processor & OCR Detector]
PDFProc -->|Extracted Pages & Stats| TextChunker[TextChunker 750-Word Window]
TextChunker --> Router{Core Feature Router}
Router --> NoteGen[NotesGenerator]
Router --> QuizGen[QuizGenerator]
Router --> QAService[QAService]
Router --> GroundedAsk[Ask Your PDF Assistant]
NoteGen -->|Structured Prompts| OllamaLocal[(Local Ollama Instance\nModel: Qwen 2.5 3B)]
QuizGen -->|JSON Schema Constraints| OllamaLocal
QAService -->|Flashcard & QA Schemas| OllamaLocal
GroundedAsk -->|Context-Constrained Prompt| OllamaLocal
OllamaLocal -->|Raw Stream| Validator[Pydantic Schema Validation & Defensive Fallbacks]
Validator --> UI
UI -->|Export Trigger| ExportSvc[ExportService: MD, TXT, PDF]
Tech Stack & Components:
-
Local AI Inference Engine: Powered by Ollama running open-weight Qwen 2.5 (
qwen2.5:3b). Qwen was chosen for its outstanding reasoning density, low RAM footprint, and multilingual comprehension. - Frontend & UI: Built with Streamlit styled with clean CSS cards for flashcards and interactive quiz state management.
-
PDF Extraction: Fast and robust text parsing via PyMuPDF (
fitz). It includes automatic scanned-page detection and OCR warnings for unreadable scans instead of failing silently. - Sliding-Window Chunking: A custom chunker divides long documents into 750-word segments with 100-word overlaps, preserving exact source page attributions without blowing out context windows.
-
Resilient Data Validation: Structured outputs are validated with Pydantic (
MCQListResponse,QAListResponse,FlashcardListResponse) with regex JSON extraction to protect against model formatting drift. - Export Engine: Uses fpdf2 and Markdown formatters to create printable, well-typeset study reports.
- Testing: 16 automated tests in pytest covering PDF extraction, chunking, schema validation, mocked Ollama connectivity failures, and temporary file cleanup.
Why Does Open Innovation Matter?
Open innovation is the backbone of LazyNotes AI for three essential reasons:
- Student Privacy & Data Sovereignty: Academic course materials, proprietary textbooks, and personal study notes often contain sensitive or unpublished research. Using closed commercial APIs would mean streaming students' private documents to third-party cloud servers. With open-weight models running on Ollama, documents never leave the user's laptop.
- Zero Financial Barrier: Proprietary AI APIs charge per token. A student studying for a multi-week exam period would quickly run into API paywalls or rate limits. Open weights make continuous study free forever.
-
Offline Resilience: Once the model (
qwen2.5:3b) and dependencies are installed, students can study and generate quizzes in transit, in airplane mode, or in libraries with spotty Wi-Fi. Closed APIs simply cannot deliver offline capability.
The Lazy Payoff
Preparing study materials for a single 30-page lecture unit typically takes 2 to 3 hours of manual summarizing, creating flashcards, and writing practice questions.
With LazyNotes AI:
- Time to complete PDF extraction & full notes generation: ~15–30 seconds.
- Time to generate 10 verified MCQs and 8 flashcards: ~25 seconds.
- Estimated time saved per study session: Over 2 hours of manual transcription.
By delegating the repetitive summarization and formatting to a local open model, students can immediately jump straight into active recall, interactive testing, and actual learning.
Prize Categories
- Hacktoberfest Open-Source AI Challenge: Week 3 (“Slow and Steady”)
Top comments (0)