{
  "id": 1371445,
  "title": "I built a content recommender as a graph, and it found similarities I wasn't looking for",
  "url": "https://urgent.news/2026/08/16/i-built-a-content-recommender-as-a-graph-and-it-found-similarities-i",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-16T23:01:05.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mbadr3227sys/i-built-a-content-recommender-as-a-graph-and-it-found-similarities-i-wasnt-looking-for-3kj7"
  },
  "original_language": "en",
  "account": "The author developed a content recommender using a weighted graph structure, which enabled it to discover similarities the system hadn't initially anticipated. This project, called CreatorRoute, focuses on recommending short-form video content. Users input a video they like, and the system suggests similar videos, as well as a few unexpected recommendations.\n\nThe dataset for CreatorRoute consisted of 40 short-form videos, each with five attributes: id, title, niche, hook type, length, editing style, and call-to-action type. Crucially, each attribute value had to appear in several videos, preventing isolated nodes in the graph. If all videos had distinct hook types, for example, there would be no edges to traverse between them.\n\nTo construct the graph, each video served as a node, and edges connected nodes that shared at least one attribute. The weight of each edge was determined by the inverse of the number of shared attributes. For instance, if two videos had four attributes in common, the edge weight would be 0.25; if they shared just one, the weight would be 1.0. This weighting system ensured that videos with more similarities were considered more closely related, and shortest-path algorithms could rank them accordingly, without the need for additional calculations.\n\nInitially, the author planned to use breadth-first search (BFS) to achieve this. However, BFS proved inadequate. With a small catalogue, nearly every video shared attributes with nearly every other video, resulting in brev distances that did not effectively rank similarity. Dijkstra's algorithm proved more successful. This algorithm walks the graph while accumulating the accumulated weights, resulting in a ranking of similarities that accurately reflected the relationships between videos.",
  "summary": "Most beginner recommendation projects are a dictionary lookup. You type \"comedy\", it returns the comedy list. That works, and it is also the reason those projects are forgettable: a dictionary can tell you what is similar, but it can never tell you what is interestingly different . I wanted the second thing. So I modelled the catalogue as a weighted graph instead, and ended up finding a kind of…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}