Inspiration
Teachers and students often work with limited or no internet, but still need high-quality explanations, lessons, and quick quizzes that respect privacy. I wanted a “local-first” tutor that answers only from the materials I provide, so it stays on-topic, works offline, and never leaks data.
What it does
StudyPack Tutor is an offline classroom copilot.
- Loads your study packs (.pdf, .txt, .md) by folder.
- Answers questions using only those materials (RAG).
- Generates lesson plans with objectives, steps, and exit tickets.
- Creates quizzes and auto-grades student answers with concise feedback.
- Optional bilingual output + adjustable reading level for age-appropriate responses.
How we built it
- Backend (Flask): endpoints for ask/stream, lesson, quiz, and grading.
- Local LLM via Ollama: chat completions against gpt-oss:20b.
- RAG indexer: TF-IDF + cosine similarity over chunked text from .pdf/.txt/.md (PyPDF2 + scikit-learn).
- Frontend (Streamlit): tabs for Tutor Chat, Lesson Generator, Quiz + Auto-Grader, with inline instructions, preset prompts, and a pack picker.
- Safety: simple keyword guardrails for inappropriate content.
Challenges we ran into
- Formatting: streamed text arrived as a blob; needed a Markdown normalizer to force bullets/headings.
- Windows streaming: Flask reloader/threads could drop connections, fixed by debug=False and use_reloader=False.
- PDF text quality: some PDFs extract poorly; added support for .txt and .md to make RAG robust.
- Clear UX: users were unsure why “full moon date” can’t be answered offline, added inline help + presets and visible pack selection.
Accomplishments that we're proud of
- Fully offline assistant with clean, simple deployment.
- Consistent, source-grounded answers that don’t hallucinate beyond user files.
- Turn-key lesson and quiz generation that teachers can actually use.
- Bilingual + grade-level controls that make outputs teacher-ready.
What we learned
- Small, obvious UX nudges (help cards, presets, and token sliders) dramatically improve success rates.
- A lightweight TF-IDF retriever is often enough for K-12 content if chunking and prompts are done carefully.
- “Local-first” constraints force better engineering: predictable latencies, smaller outputs, and resilient streaming.
What's next for StudyPack Tutor - Offline Classroom Copilot
- Drag-and-drop uploader inside the UI (auto-reindex on change).
- Per-answer citations UI (click to reveal exact snippet).
- Pack manager (rename/delete packs, show file counts).
- On-device embeddings to replace TF-IDF for better recall.
- Export lessons/quizzes to DOCX/PDF and Google Classroom-ready CSV.
Team
Solo: Sweety Seelam
Built With
- flask(api)
- gpt-oss:20b-model
- http-requests
- ollama
- pypdf2
- python
- scikit-learn
- streamlit(ui)
Log in or sign up for Devpost to join the conversation.