tech digest: up to five links a day, ranked by code
how tech digest collects, classifies and ranks articles every morning, and why the final order is decided by code.
the problem
there is more to read about software and ai every day than anyone can open. most newsletters answer that with summaries. i wanted the opposite: a short list that only answers which links are worth opening, and then sends you to the original article.
tech digest sends up to five links a day at 7:00, brasília time. on a day with no article above the cutoff, no email goes out. the first one is the pick of the day. it is free, needs no account, and everyone gets the same edition.
how it works
the backend is a python service with a sqlite database. a scheduler inside the same process runs the whole pipeline:
- it collects rss and atom feeds every four hours, with one extra run before the edition closes.
- it stores the metadata of each article.
- it fetches each article and extracts the text. if that fails it uses the feed excerpt, and if the excerpt is no good either, a later attempt works from the title and the url.
- a language model classifies each article: what it is about and how important it looks.
- a score written in python turns that classification into a number.
- the list is ranked, spread across topics and deduplicated. to tell whether two articles cover the same story, the model is asked again.
- each subscriber gets a separate html email, and the edition is published in the web archive.
the site is a separate astro app on cloudflare workers. it stores no editions: it reads each one from the api, validates each response before rendering, and caches pages at the edge for an hour. after each send, the api tells the site to drop the cache for the archive and the new edition.
decisions
the model says what an article is about; code decides how much i care. the first version asked the model for a score from 0 to 100, and the scores were inconsistent. now the model classifies topic and importance, and explicit weights, in configuration and in python, produce the order. when i disagree with a ranking, i can read why it happened and change a number.
the full article text is never stored. it is used during analysis and then dropped. the database keeps the metadata, the excerpt that came in the feed and what was derived from them. the digest points to articles, it does not republish them.
the “why” line is built from the classification. each link comes with a short reason. it is assembled from the classification, not written freely by a model, so it says nothing the classification does not support.
deduplication happens twice. first by url, then by meaning: the model compares each candidate against the stories sent in the last three days.
one instance, one sqlite file. the workload is small, and a single database file keeps operations simple.
unsubscribing takes a confirmation page. mail clients that prefetch links would otherwise remove people who never clicked anything.
trade-offs
scores mostly measure topic, so they bunch together in a narrow band. there is a rescoring tool to test different parameters against past editions before changing the real ones.
diversity is a preference, not a quota: after one or two articles from the same group, each extra one loses points, but a strong day on one subject can still dominate. and an edition can come out with fewer than five links: on a weak day the cutoff drops a little to reach three, and stops there.
design
the email and the site follow the same style: lowercase labels, a light theme, a numbered list and a “today’s pick” label. the subject line is the title of the pick followed by how many other links came with it.
some editions carry a note from me. those are written by hand, approved by hand, limited to one per edition and frozen once sent. nothing in the notes is generated.
what i took from it
a language model is good at reading and bad at being consistent with numbers. splitting the work, so the model describes and the code decides, made the digest both easier to trust and easier to change.
