How odahabb/student-assistant works
This is a local multimodal study assistant: students add course material to a subject, ask questions grounded in its indexed passages, and practise topic quizzes that update mastery and revision recommendations. The main path runs from the browser through the API and service into document loading, chunking, embedding and indexing; questions then retrieve passages and generate streamed answers. Quiz and progress are distinct learning stages over the shared index. The README documents major capabilities, but service and frontend excerpts are partial, so uncertain internal call wiring is omitted.
Main entry points: service.py Application service · retriever.py Hybrid retrieval · quiz.py Quiz generation and grading · embedder.py Text embedder
Components 16
Web application
- Browser interface
frontend/app.js - FastAPI routes
backend/api.py - Application service
backend/service.py
Material indexing
- Multimodal loader
backend/pipeline/loader.py - Clean and chunk
backend/pipeline/preprocessor.py - Chunk metadata
backend/pipeline/chunk.py - Text embedder
backend/pipeline/embedder.py - FAISS index
backend/pipeline/vector_store.py - BM25 index
backend/pipeline/sparse.py
Question answering
- Hybrid retrieval
backend/pipeline/retriever.py - Answer generator
backend/pipeline/generator.py
Quiz and progress
- Quiz generation and grading
backend/pipeline/quiz.py - Mastery and revision
backend/pipeline/recommender.py
Subject state
- Subject files and records
backend/service.py
Other components
- Student
- Local model runtimes
Connections 23
- Student → Browser interface: uses
- Browser interface → FastAPI routes: requests
- FastAPI routes → Application service: dispatches
- Application service → Subject files and records: reads and writes
- Application service → Multimodal loader: loads material
- Multimodal loader → Local model runtimes: reads images and audio
- Application service → Clean and chunk: chunks content
- Clean and chunk → Chunk metadata: creates chunks
- Application service → Text embedder: embeds chunks
- Text embedder → Local model runtimes: encodes text
- Application service → FAISS index: builds index
- Application service → BM25 index: builds keyword index
- Application service → Hybrid retrieval: retrieves passages
- Hybrid retrieval → Text embedder: embeds query
- Hybrid retrieval → FAISS index: searches dense index
- Hybrid retrieval → BM25 index: scores keywords
- Application service → Answer generator: generates answer
- Answer generator → Local model runtimes: generates text
- Application service → Quiz generation and grading: handles quiz
- Quiz generation and grading → Answer generator: writes and checks questions
- Quiz generation and grading → Hybrid retrieval: checks retrieval support
- Application service → Mastery and revision: updates mastery
- Application service → Hybrid retrieval: supplies question context