How noteworthy-team26-27/ai-study-companion works
AI Study Companion is a PDF-based study app. A browser uploads a typed PDF; the server extracts and stores passages, then supports passage-grounded questions and generated quizzes. Quiz answers are graded deterministically and saved as anonymous, browser-specific progress. The graph also includes the documented keyword/embedding retrieval and model-provider capabilities. Some server initialization and request-handling code is unsampled, so relationships supported only by the README are cited there; uncertain wiring is omitted.
Main entry points: server.py HTTP API · attempts.py Saved attempts · question_generator.py AI question generation · models.py Model adapters
Components 16
PDF ingestion
- PDF extraction
noteworthy_app/core.py - Passages
noteworthy_app/core.py
Study and retrieval
- Study UI
noteworthy_app/static/index.html - HTTP API
noteworthy_app/server.py - Passage retrieval
noteworthy_app/search.py - Answer prompting
noteworthy_app/core.py
Quizzes and progress
- AI question generation
noteworthy_app/question_generator.py - Cloze fallback
noteworthy_app/quiz.py - Answer grading
noteworthy_app/grading.py - Progress aggregation
noteworthy_app/attempts.py
Persistence and inference
- Document store
noteworthy_app/storage.py - Model adapters
noteworthy_app/models.py - Issued quizzes
noteworthy_app/attempts.py - Saved attempts
noteworthy_app/attempts.py
Other components
- Learner browser
- Configured model service
Connections 23
- Learner browser → Study UI: uses
README.md - Study UI → HTTP API: sends requests
README.md - HTTP API → PDF extraction: extracts PDF
README.md - PDF extraction → Passages: produces
noteworthy_app/core.py - HTTP API → Document store: loads documents
noteworthy_app/server.py - HTTP API → Document store: saves uploads
README.md - HTTP API → Passage retrieval: retrieves passages
noteworthy_app/server.py - Passage retrieval → Passages: ranks
noteworthy_app/search.py - HTTP API → Answer prompting: builds answer context
noteworthy_app/core.py - Answer prompting → Model adapters: requests answer
- Model adapters → Configured model service: calls provider
README.md - HTTP API → AI question generation: generates quiz
noteworthy_app/server.py - AI question generation → Passages: selects source text
noteworthy_app/question_generator.py - AI question generation → Model adapters: requests questions
- AI question generation → Cloze fallback: uses fallback
noteworthy_app/question_generator.py - HTTP API → Issued quizzes: issues quiz
noteworthy_app/server.py - Learner browser → HTTP API: submits answers
README.md - HTTP API → Saved attempts: submits attempt
noteworthy_app/server.py - Saved attempts → Issued quizzes: reads quiz
noteworthy_app/attempts.py - Saved attempts → Answer grading: grades answers
noteworthy_app/attempts.py - Saved attempts → Saved attempts: saves result
noteworthy_app/attempts.py - HTTP API → Progress aggregation: requests progress
noteworthy_app/server.py - Progress aggregation → Saved attempts: aggregates saved scores
README.md