What I learned building an AI-driven spaced repetition app

Open original

Sean Goedecke built AutoDeck, an app that generates an endless feed of spaced repetition flashcards on any topic with an LLM, adjusting difficulty from the user's responses. He uses it to explain why he skipped the chat interface and what building it with Codex was like.

  • Generating flashcards is the hard part of spaced repetition for new topics, and LLMs make it possible to create decks on demand.
  • Parallel generation produced duplicate cards, and waiting for one batch was slow, so he streamed cards in XML chunks as each was generated, since JSON can't be parsed mid-stream.
  • Codex did most of the coding but made bad calls he had to fix, such as over-engineering a background job system and tracking cards by index instead of ID; he found Claude Code slower and needing more intervention.
  • Paid inference costs pushed him to charge for the app, which he thinks made him build something more useful than a free side project would have been.

Sean Goedecke built AutoDeck over a couple of weeks: an AI-driven spaced repetition app that generates an endless feed of flashcards on any topic and adjusts difficulty based on how you respond, so saying "I know" to a card pushes the next ones harder. His motivation is that spaced repetition works well but is hard to apply to new subjects, since writing your own Anki decks requires the expertise you're trying to acquire, and existing decks rarely match your exact interest. LLMs fill that gap by producing cards on demand, and he argues the interface doesn't have to be a chat box. He treats the card feed as a conventional app where the AI runs behind the scenes, which he sees as a more promising direction than the chat-with-your-data pattern dominating current AI products. The technical meat is in the feed design. Generating one card per request is too slow, since time-to-first-token alone runs a few hundred milliseconds and a fluent user will clear cards faster than they arrive. Batching ten cards per request fixes throughput but makes users wait for the first card. Parallel requests reintroduce speed problems and produce near-duplicates, so you get "what year was the Bastille stormed" right beside "in what year was the storming of the Bastille." His solution was batching while streaming each card as it finishes. That rules out JSON structured outputs, because a partial JSON array isn't parseable mid-stream, so he switched to XML-style card tags that can be parsed incrementally. Generation also has to run in the background, which means the client polls for newly available cards instead of requesting one and waiting. On the building process, he used OpenAI's Codex for most of the code and found it useful but far from autonomous. He intervened on roughly one change in three and fully rethought the approach on about one in ten. Examples include Codex trying to build a job system with IDs and polling that he judged overkill, misdiagnosing a Stripe metadata bug by constructing a full Stripe Connect integration, and tracking cards by index rather than ID, which caused re-rendering bugs. He found Claude Code slower and needing more correction for this project, a reversal from his earlier experience. His takeaway is that you still need to be a competent engineer to ship something like this. He also makes an economic point: because every AI call costs money per user, he was pushed to charge for AutoDeck, which he thinks forced him to build something more finished than he would have made as a free project with cheap inference.

Ask about this article