Prism

Inspiration

We all lose hours to short-form video feeds. The format is engineered to hold attention — infinite, frictionless, perfectly paced. The tragedy is that almost none of it teaches you anything. Meanwhile the best educational content in the world — 3Blue1Brown, Khan Academy, Crash Course — sits in 40-minute lectures that demand exactly the kind of sustained focus the feed has trained out of us.

Prism is the obvious question made real: what if the feed worked for you? What if the same mechanics that make you swipe could carry calculus, organic chemistry, or the French Revolution — and what if, unlike a real feed, it actually knew what you understood and what to show you next?

What it does

You type a topic. Prism goes and finds the best long-form lectures on it, transcribes them, and uses an LLM to cut out the strongest self-contained moments — each one becomes a short, vertical clip with a hook, a one-line summary, and a subject tag. The result is a swipeable feed that teaches.

But the feed is only half of it. As you watch, Prism builds two graphs:

  • A prerequisite graph. For any goal ("backpropagation," "eigenvalues"), it decomposes the concept into what you need to know first, as a real dependency tree. Advanced topics stay gated until their prerequisites are met, and the recommender always knows the next thing you're actually ready for.
  • A memory graph. An Obsidian-style map of everything you've learned, linked across subjects and colored by topic, so your knowledge is something you can see grow.

It tracks mastery per concept, surfaces what to study next, and — in the Practice tab — generates quizzes grounded in the exact clips you watched, so you can test understanding instead of just scrolling past it.

How we built it

Prism is one phone-frame SPA (React + Vite) sitting on top of three cooperating services, all served from a single origin so the whole app runs behind one URL:

  • Clipper (FastAPI / Python): discovers source videos, transcribes them with Groq Whisper, and uses Claude Sonnet to select clip boundaries and write each clip's hook, summary, and subject tag with structured JSON output.
  • Token compression: before any transcript hits the model, we run extractive sentence pruning plus a compact prompt format — cutting input tokens by ~40–48% with no loss in clip quality, with the savings tallied live on a stats page.
  • Memory service (Node, mounted inside Vite): persists lessons to Redis and uses Claude Opus to embed and link new concepts into the memory graph.
  • Recommender (Python): builds the prerequisite DAG via LLM concept-decomposition, tracks per-node mastery, selects the next concept with a UCB policy, and persists the whole knowledge state to Redis.

Everything is wired through one Vite origin (frontend + both APIs), so a single tunnel exposes the entire app with no CORS or mixed-content headaches.

Challenges we ran into

  • Long lectures vs. real limits. Full lectures blew past transcription upload limits and ballooned token counts — which is what pushed us to build the compression layer and make its savings measurable rather than hand-wavy.
  • A recommender with no GPU. The recsys stack assumed a heavy ML embedding model (torch + sentence-transformers). We made embeddings degrade gracefully — falling back to deterministic vectors — so the LLM-built prerequisite graph runs end-to-end on plain CPU. The curriculum reasoning comes from the model, not from hardware we didn't have.
  • The seams, not the models. Most of the real debugging was plumbing: collapsing three services onto one origin, a profile store that silently reset state between requests, missing persistence dependencies, and environment variables that quietly broke the SDK clients. Getting the seams right was harder than getting the AI right.
  • A graph you can actually read. Laying out the knowledge graph so nodes spread out, labels stay legible, and a selected subject visibly separates from the rest took real iteration.

Accomplishments that we're proud of

  • A feed that knows what you know — not just another recommender, but one backed by an explicit prerequisite model and per-concept mastery.
  • The full pipeline runs live: raw lecture → transcript → clips → knowledge graph → quiz, all in one app.
  • Real, demoable token savings (~40–48%), shown on a dedicated stats view instead of claimed.
  • A prerequisite graph and mastery engine that run on a laptop CPU, with the LLM doing the curriculum reasoning.
  • A genuinely nice interface — a dark, phone-native feed that feels like the thing it's competing with.

What we learned

  • LLMs are reliable enough to do real curriculum work — decomposing a goal into prerequisites and selecting teachable clips — when you lean on structured output.
  • Token discipline is a feature, not an afterthought. Treating it as something to measure and show changed how we built the pipeline.
  • In a multi-model app, the hard part is the integration surface — origins, persistence, and environment — far more than any single prompt.

What's next for Prism

  • Swap the CPU embedding fallback for proper vector retrieval, so recommendations rank on real semantic similarity.
  • Close the loop with spaced repetition — feed Practice results back into mastery so the graph forgets and re-surfaces like a real study schedule.
  • More sources and multi-subject learning plans, plus shareable knowledge graphs.
  • A mobile-native build, so the feed lives where the habit already is.

Built With

Share this project:

Updates