Altheia Study — Project Writeup Inspiration University students face a universal problem during exam preparation: the pile of chaotic, fragmented materials. Between official lecture slides, peer-shared zip files, nested Google Drive folders, screenshots of whiteboards, and handwritten notes, students spend hours organizing what to study instead of actually studying.
Existing AI tools attempt to solve this with generic chat interfaces. However, asking an unstructured chatbot to "summarize my PDF" creates three major issues:
Passive reading illusion: Skimming AI summaries feels productive, but research shows it yields poor long-term exam retention compared to active recall.
Hallucinations without provenance: Chatbots state facts confidently without proving where they came from.
Fragility online: Internet access on university campuses is notoriously unreliable, making cloud-only study tools unusable right when students need them most.
We built Altheia Study on a simple core thesis: The value is not in the chat. It is in the closed feedback loop: Ingest $\rightarrow$ Organise $\rightarrow$ Generate $\rightarrow$ Schedule $\rightarrow$ Drill $\rightarrow$ Adapt.
What it does Altheia Study is a local-first desktop study application that transforms raw course materials into an offline, citation-backed active recall system.
Local Vault & Ingest: Students point Altheia at a Google Drive folder or ZIP archive. Altheia cleans, deduplicates, OCRs handwriting/slides, classifies source files, and builds an authoritative, frozen Course Topic Registry.
100% Verifiable Artifacts: It generates structured course "Spines", topic walkthroughs, atomic concept cards, and exam-formatted practice questions. Every single claim explicitly cites its exact source file and page ({material, page}).
Deterministic FSRS Scheduler: Instead of guessing study schedules, Altheia uses the Free Spaced Repetition Scheduler (FSRS) to build a realistic daily agenda based on available study minutes. If an exam is approaching, a "deadline clamp" pulls reviews forward so students are fully prepared on exam day.
Contextual PDF Reader & Floating Chat: Highlighting text in any PDF opens a movable, resizable chat drawer anchored directly to that passage using W3C-standard fuzzy quote matching—surviving text re-extractions or renderer changes.
Guided Socratic "Learn Mode": A 4-stage state machine (Diagnose $\rightarrow$ Scaffold $\rightarrow$ Check $\rightarrow$ Consolidate) leads the student through active problem-solving rather than dropping walls of text.
How we built it Altheia is built around a strict division of responsibility: Meaning belongs to the model; arithmetic and logic belong to code.
┌────────────────────────────────────────────────────────────────────────────────────────┐ │ PROBABILISTIC / MODEL (Gemini & Gemma 4 E2B) │ │ • Multimodal OCR for slides & handwriting │ │ • Material classification & two-pass Question Generation / Critique │ │ • Natural-language calendar input parsing to JSON diffs │ └───────────────────────────────────────────┬────────────────────────────────────────────┘ │ ▼ ┌────────────────────────────────────────────────────────────────────────────────────────┐ │ DETERMINISTIC / CODE ENGINE (Python & SQLite) │ │ • FSRS interval calculation & deadline clamping │ │ • Daily minute budgeting & task distribution arithmetic │ │ • Interleaving session shuffle & W3C quote anchor resolution │ └────────────────────────────────────────────────────────────────────────────────────────┘ Cloud Pipeline (Online Ingest & Generation): Uses Google's Gemini Files API and Multimodal Embeddings for high-accuracy processing of PDFs and lecture captures. We leverage Context Caching on course material to reduce latency and cost during bulk generation passes.
Local Inference Surface (Offline Mode): Bundles LiteRT-LM running Gemma 4 E2B. The client application uses an OpenAI-compatible endpoint interface, allowing seamless local execution for ad-hoc queries, annotation chats, and Socratic tutoring turns when offline.
Database & Local Vault: FSRS state, review history, chunk indexes, and anchor offsets are stored in SQLite. All user-facing study guides, spines, and notes are written in standard Markdown on disk—ensuring the user's data remains accessible even without the app running.
Challenges we ran into Preventing Schedule Hallucinations: Large language models routinely fail at simple calendar arithmetic—allocating 120 minutes of work into a 40-minute daily budget or making off-by-one errors on exam dates. We solved this by stripping the model of scheduling authority. The LLM only translates natural language inputs (e.g., "My exam moved to Friday") into structured JSON diffs; our deterministic Python engine re-runs the calendar math.
Anchor Drift in PDF Annotations: Character-offset and coordinate-based text highlights break when PDFs are re-extracted or zoomed. We implemented W3C quote-based anchoring (storing 32-character prefix/suffix strings alongside the quote), allowing highlights to dynamically resolve fuzzy matches even after re-ingestion.
Preventing Socratic Drift in AI Tutoring: When prompted via standard instructions to "act like a tutor," LLMs inevitably drift into long-winded lecturing. We built Learn Mode as an explicit algorithmic state machine where code enforces stage transitions and the model is only permitted to fill turn-specific content.
Accomplishments that we're proud of 100% Citation Integrity: Every generated summary card, walkthrough, and review question links directly to a clickable page reference in the student's original course materials.
True Offline Autonomy: Students can ingest materials online at home, then head to a classroom with zero Wi-Fi and complete full active-recall drill sessions, annotation chats, and Socratic tutoring using local Gemma inference.
Confidence Calibration Matrix: Altheia tracks the pair (confidence, correctness) before revealing answers, explicitly flagging "high confidence, low accuracy" topics—targeting the single most dangerous blind spot in exam preparation.
What we learned The Power of Two-Pass Critique: Having a model critique its own generated questions against a strict rubric (atomicity, single defensible answer, exam-format alignment) drastically raised question quality and eliminated ambiguous review items.
Hardware Floor Reality: Building local AI tools requires strict memory budgeting. Designing Altheia's local inference surface around Gemma 4 E2B via LiteRT-LM allowed us to maintain fast turn times without overwhelming modest student hardware.
What's next for Altheia Multimodal Handwriting Anchors: Extending floating annotation chats to work on bounding-box selections over handwritten equations and lecture figures.
Native Audio Ingest: Allowing direct ingestion and citation mapping of recorded lecture audio alongside slides and PDFs.
Spoken Tutoring Interface: Integrating real-time audio streaming APIs to allow natural, voice-driven Socratic tutoring sessions during Learn Mode.
Built With
- css
- html5
- javascript
- tauri
Log in or sign up for Devpost to join the conversation.