Ship the AI Flashcard Generator
end-to-end pipeline
Part of: AI Flashcard Generator
Every stage exists. This lesson chains them into one function that does what the whole app does. Notes go in, and a grouped deck comes out, ready for the scheduler. The pipeline. 1. Split the pasted text into candidate facts (lesson 1). 2. Ask the model for one card per fact as JSON (lesson 2). 3. Validate each reply and drop duplicates (lesson 3). 4. Embed each card and group related ones (lessons 4 and 5). 5. Schedule every new card as due today, with reps 0 and ease 2.5 (lessons 6 and 7). Each card is embedded with its front and back together, because the answer often carries the topic words. "What is the aorta?" says little about hearts until you add "the largest artery leaving the heart". Putting it behind a web endpoint. The pure function is the hard part. Wrapping it in an HTTP route takes a few lines with FastAPI. The front end posts the pasted text, then renders each group as a section of cards. Swap fake model for a real client call that requests JSON output, and swap embed for a real embedding API, and nothing else in the pipeline changes. Cap the length of the pasted text at the route, because a learner who pastes a whole textbook chapter would otherwise trigger hundred
Challenge: Notes In, Deck Out