-
-
Lectheo: find what you missed, prove what you know. An AI study partner for concept heavy lectures.
-
Study a two-hour lecture in minutes: AI chapters, an outline, and key points that link to the exact lecture moment.
-
Explain in depth: how it works, a worked example, common mistakes and related concepts, written from the lecture with cited moments.
-
Watch and press L ("I'm lost") or I ("Important"). Chapters let you jump to the part you need, or play one chapter only.
-
Confidence before options finds your confident mistakes: ideas you're sure about but get wrong. Coverage shows what's left to test.
-
Spot the flaw: question an AI author and find the wrong sentence in their explanation. Hints and a second try come before the answer.
-
The lecture as a concept map with prerequisite links, mastery states and your marks; each concept opens with its practice options.
-
Bring your own lecture: paste a YouTube link (checked before any AI spend), or add captions, audio or a transcript.
Inspiration
Every student in a concept-heavy course knows the feeling: you leave a two-hour lecture, you rewatch the recording before the exam, and it all looks familiar. Then the exam asks you to use the idea, and you can't. Rereading and recall quizzes build familiarity, not understanding: rereading is among the lowest-utility study techniques (Dunlosky et al., 2013).
The gap that hurts most is the one you can't feel. If you are sure about something that's wrong, you'll never review it. I wanted a study partner that finds those gaps for each student, from their own lecture, and then makes them reason with the idea instead of memorising it. That fits the AI + Education track: move beyond memorization, make connections, apply what you learn.
What it does
Lectheo (LEK-thee-oh) turns a lecture into a personal map of understanding.
- Study or watch. Read a brief of the lecture chapter by chapter, in minutes, and open any idea in depth. Or watch it and press L ("I'm lost") or I ("Important"). Every claim links to the exact lecture moment.
- Map. Lectheo builds a concept map of the whole lecture with prerequisite links, so a "lost" moment is traced back to the earlier idea it depends on.
- Diagnose. A short diagnostic asks how sure you are before you see the options. Sure and wrong twice is a confident mistake: the gap you didn't feel. Results show how much of the lecture was tested, and Test the rest covers the remainder.
- Practice. Activities that need reasoning: Spot the flaw (question an AI author and find the wrong sentence in their explanation), Teach-back (explain it to Sam, a curious first-year), Transfer (a problem the lecture never covered) and Stump the AI (beta).
- Master. A concept turns Mastered only after two independent correct answers in two different activity types. There are no points, streaks or badges.
Students can bring their own lectures: a recording plus its .vtt/.srt captions (the video plays from the laptop and is never uploaded), an audio file, a transcript, or a YouTube link. The live app has a sample account (Harvard CS50x Lectures 3–5) that needs no sign-up.
How I built it
- App: Next.js 16, React 19, Tailwind v4, shadcn/ui, and React Flow + ELK for the map, in a pnpm + Turborepo monorepo. A REST API is shared through Zod contracts.
- Data: Supabase (Postgres, Auth with Google and anonymous sample accounts, Storage) with Drizzle. Row-level security denies all client access, so only the server touches the database.
- Pipeline: a durable Vercel Workflow processes each lecture in this order:
- Transcript: captions, audio through AssemblyAI, or YouTube through Gemini.
- Segment the transcript.
- Extract concepts, prerequisite links and chapters.
- Validate the graph.
- Lay out the map.
- Align the student's marks.
- Draft and verify questions, and write in-depth explanations, in parallel.
- AI with a role for each model: through the Vercel AI SDK and AI Gateway.
- Claude Sonnet 5.5 generates concepts, questions, explanations and the AI personas.
- GPT-6.1 Sol blind-solves every generated question before a student can see it, and grades answers against a rubric fixed before the activity.
- TypeSafe Jev checks every reply from the AI author for answer leaks.
- Gemini 3.8 Flash, called directly, transcribes YouTube lectures in 2-minute clips.
- Trust by design:
- Answer keys, flaws and rubrics live in separate server-only tables, and every response passes an explicit schema, with a test guarding every route.
- Mastery is computed from attempts on every read.
- A spend governor pauses new AI work before the budget runs out.
- Testing: 677 unit and integration tests (Vitest with in-process Postgres via PGlite) and 13 Playwright end-to-end specs running against a deterministic fake AI mode.
- Built with AI: the product decisions, specs and testing are mine. Most of the code was written with Claude Code, working in parallel git worktrees from written specs, with every change going through a pull request and the test suite.
Challenges I ran into
- Trusting AI-generated questions. A wrong answer key would teach the wrong thing. Every question is blind-solved by a model from a different company; mismatches are redrafted once or dropped (6% of library drafts were rejected).
- An AI that hides a flaw without giving it away. In Spot the flaw, the AI author defends a flawed explanation. It never sees the flaw, and a separate guard checks each reply for leaks before it's shown (0 of 15 adversarial attempts leaked).
- Exact timestamps from a language model. Models are unreliable with times. I made them cite transcript segment numbers instead, and the server turns those into exact lecture links for concepts, chapters and explanations.
- YouTube transcription. My first approach, through the AI gateway, ignored the clip boundaries and billed the whole video. A spike showed long clips drift about 10 seconds per minute. Two-minute clips in parallel, through Google's API directly, gave a 5.5% word error rate, 2.6 s p95 timestamp drift and $0.42 per hour of video.
- Teams transcripts. Real Teams
.docxexports carry one timestamp per speaker turn, which breaks the "I'm lost" alignment. I dropped.docxand point students to Teams'.vttexport instead. - Making the judge path never fail. A pre-built CS50 library, a deterministic fake AI for end-to-end tests, and fallbacks (an official audio track if a YouTube embed is blocked) keep the two-minute demo working.
Accomplishments that I'm proud of
- The confident mistake finding: confidence before options, plus a follow-up question, separates a slip from a real misconception.
- A trust chain a student can check: verified questions, fixed rubrics, a separate judge, and a lecture link on every result.
- A two-hour lecture becomes a brief you can study in about 15 minutes, chaptered, with any idea explained in depth.
- It runs end to end on the live site, works with lectures students already have, and keeps their video on their own laptop.
What I learned
- Asking for confidence before the answer options changes what a diagnostic can find.
- With LLMs, structure beats trust. Anchoring output to things the server can check (segment numbers, exact sentence positions, rubrics written in advance) makes AI output reliable enough to learn from.
- Measure before building: a one-day spike decided how YouTube support works and what it costs.
What's next for Lectheo
- Lecture slides (PDF) as extra input, so concept names and terms match the lecturer's slides.
- Evaluating it on subjects beyond computer science (the pipeline is subject-neutral, but only CS has been tested), and languages other than English.
- Spaced follow-ups on confident mistakes, so a fixed misconception stays fixed.
- Trying it with a real course cohort to measure whether it improves exam performance.
Built With
- assemblyai
- claude
- claude-code
- cloudflare-turnstile
- drizzle-orm
- gemini
- next.js
- openai
- playwright
- pnpm
- postgresql
- react
- react-flow
- shadcn-ui
- supabase
- tailwindcss
- turborepo
- typescript
- vercel
- vercel-ai-gateway
- vercel-ai-sdk
- vercel-workflows
- vitest
- youtube-data-api
- zod
Log in or sign up for Devpost to join the conversation.