20 years of Hacker News in an interactive timeline
Classifying all HN front page posts since 2007 and visualizing it
After seeing a lot of hype around Jev and similar decision models, I wanted to give them a try myself. And the best way to learn something is to build a fun side project with it. Since I’ve dabbled with HN data in the past (e.g. checking how many Show HN submissions are fully AI-generated), I thought I could do a fun classification task on HN front-page discussions.
The promise of decision models sounded very interesting to me. If I can have a model that takes arbitrary text input plus a set of questions, and quickly (milliseconds) and cheaply ($0.042/MTok) spits out structured output, that would be amazing for data engineering work, where we do a lot of classification tasks.
Jev makes classification cheap enough to just play around with. You don’t need a training set to label for a BERT or spaCy model (I remember labeling data for days…) and no slow, costly calls to large reasoning models.
Since I love data visualization, I turned it into an interactive timeline of all HN front-page posts since 2007, plus five years of an AI-imagined future.
Open the interactive HN timeline →
How it works
The names on the timeline are capitalised and then grouped together with all stories that mention the same topic/name. Different spellings get merged using an LLM-generated synonym dictionary. A name shows up on the timeline once it gets 2.5× its usual points over four weeks.
Setting up a classifier is very simple as you can imagine. You define a set of questions, pass it to the model alongside the HN post, and quickly get the structured output back.
Classifying all 215,363 front-page posts since 2007 cost me about $23. One year of front pages (~11,000 posts) takes about 85 seconds with 40 parallel requests.
import httpx
TOPICS = {
"ai_ml": {
"covers": "Artificial intelligence, machine learning, LLMs, AI companies, AI models, AI coding assistants and agents, AI safety and AI policy",
"not": "Ordinary data analysis with no AI angle",
},
"startups_vc": {
"covers": "Startups, founders, venture capital, fundraising, Y Combinator, acquisitions of startups",
},
# ... 32 more topics
}
body = {
"model": "jev-1.13.0",
"state": {"title": "Cloudflare acquires Deno", "site": "deno.com"},
"questions": {
"topic": {
"type": "choice",
"instructions": {
"question": "What is the primary topic of this Hacker News story?",
"focus": "Judge what the story is mainly about, using the title first and the site as a hint. Pick the single best category.",
},
"criteria": TOPICS,
},
"sentiment": {
"type": "score",
"instructions": {
"question": "What is the overall tone of this headline?",
"focus": "Judge the framing of the headline itself, not whether the topic is important.",
},
"criteria": [
{"summary": "Very negative", "signals": ["disaster, scandal, death, outrage, collapse, serious harm"]},
{"summary": "Negative", "signals": ["criticism, problems, failure, decline, layoffs, warnings, complaints"]},
{"summary": "Neutral", "signals": ["informational, technical, how-to, release notes, plain description"]},
{"summary": "Positive", "signals": ["progress, success, launch framed as an improvement, praise, curiosity, fun"]},
{"summary": "Very positive", "signals": ["celebration, major breakthrough, triumph"]},
],
},
},
}
r = httpx.post(
"https://api.typesafe.ai/v1/systemone",
json=body,
headers={"Authorization": f"Bearer {API_KEY}"},
)
Response:
{
"model": "jev-1.13.0",
"answers": {
"topic": {
"type": "choice",
"choice": "startups_vc",
"confidence": 0.77,
"probabilities": {
"startups_vc": 0.78,
"software_engineering": 0.18,
"big_tech_business": 0.03,
"infrastructure": 0.01
}
},
"sentiment": {
"type": "score",
"score": 2.04,
"confidence": 0.97,
"probabilities": { "0": 0.0, "1": 0.0, "2": 0.96, "3": 0.04, "4": 0.0 }
}
},
"usage": { "input_tokens": 2482, "output_tokens": 334 }
}