2026.11.03 · 4 min · ai · llm · claude-code · javascript
HackerTube: use an LLM as a sieve, not a writer.
Karpathy built HackerTube, a YouTube of 6,454 videos Hacker News recommends, by having Claude sort millions of HN comments and the YouTube API supply the facts. The model didn't write any content; it made one yes/no call per comment. The pipeline, the pattern you can copy, and where it goes wrong. As of 2026.11.
Most of us use LLMs to generate text. Karpathy's HackerTube uses one to sort it. The site is a YouTube made only of videos that people on Hacker News recommended, and the model didn't write a word of it. It read comments and decided which ones to keep. The facts about each video came from the YouTube API.
Watch the 60-second version on Instagram.
"LLM as a sieve, not a writer" is my name for the pattern, not Karpathy's. But his post, dated 2026.10.31, is a clean example of it.
The pipeline
The source is the Hacker News archive on Hugging Face (open-index/hacker-news): every HN item since 2006 as monthly Parquet files, about 43M comments. In Karpathy's words, Opus downloaded the comments and "filtered them", then he "ran Sonnet over them in a Workflow (Claude Code feature)", "got rid of spam, and narrowed everything down to 40K comments recommending a YouTube video". The post doesn't say which step cut how much, so I won't either.
The widths in the figure are not to scale: at real scale, the 40K bar would be thinner than a hairline.
From those 40K comments, the YouTube API (with a Google Cloud API key he created by hand) filled in the video details. The result: "6,454 YouTube videos ... recommended by a few people on HN from 2007-2026 across 150 topics".
| Stage | What | Count |
|---|---|---|
| Source | HN comments, Hugging Face archive | ~43M |
| Sieve | Claude (Opus, then Sonnet in a Workflow), spam removed | 40K comments |
| Facts | YouTube API | 6,454 videos, 150 topics |
Writer vs sieve
Ask a model to name a good video and it writes the title itself. It might be right. It might also be made up, and you can't tell from the output. Ask it "does this comment recommend a YouTube video?" and it makes one small decision you can check, with nothing invented. The title and the length come from an API that actually knows them.
A sketch of that pattern (not Karpathy's code; his prompt and code aren't published):
const verdict = await llm(`Does this comment recommend a YouTube video?
Answer YES or NO only.\n\n${comment.text}`);
if (verdict.trim() === "YES") keep.push(comment.videoId); // facts come from the YouTube API, not the modelThat's the whole recipe you can copy this week: a dataset, one classify prompt, and an API for the details.
The site
HackerTube has a "ForYou" feed (one word) that works "without any user accounts, storing state in local browser session", so your history is stored in your browser. It uses the 50% thumbnail instead of the uploaded one, has keyboard shortcuts, and offers a data export so you can build your own. The nav is Home, Longs, Liked, History, Watch later, Categories and Playlists. The post doesn't explain how ForYou picks videos, so don't read an algorithm into it.
Karpathy says "This takes ~2 hours now." His only manual steps were the API key, a VPS and the domain; Claude did the rest, including the deploy. The post doesn't define what the 2 hours covers, so treat it as approximate.
What people get wrong
- "AI made the content." It didn't. Every video and every recommendation came from real people on HN. The model only chose which comments to keep.
- "It was all Sonnet." Opus downloaded and pre-filtered, Sonnet ran inside a Claude Code Workflow, and spam removal was a step too.
These next ones are general advice, mine rather than Karpathy's:
- Asking the model for titles or URLs. That invites made-up answers. Get facts from an API.
- Free-form output. Constrain it to YES/NO or JSON so you can parse it.
- Trusting the sieve blind. Spot-check a sample of what was kept and what was dropped. A sieve has false positives.
- Sending everything to the model. Run a cheap regex (
youtube.com,youtu.be) first and only send the matches. That cuts cost.
On a client project I'd run the regex pass and a hand-labelled sample of a few hundred items before spending anything on a model call, so I know the sieve's false-positive rate before I trust its output.
The short version
- HackerTube is 6,454 YouTube videos recommended on Hacker News, 2007 to 2026, across 150 topics.
- Claude filtered ~43M HN comments down to 40K that recommend a video; the model wrote none of the content.
- The YouTube API, not the model, supplied the titles and details.
- The pattern: a dataset, a YES/NO prompt per item, and an API for the facts.
- Pre-filter with a regex, constrain the output, and spot-check both piles.
Sources: Karpathy, HackerTube · HackerTube · open-index/hacker-news (Hugging Face)