sanyam jain

How related posts work

planted Sept 2026 · 🌱 seedling

Algorithm A (crude) - Match word by word

  1. If a blog title contains hello, and another blog's title also contains hello - they might be related

simple. easy peasy.

Algorithm B (transformer) - Use semantics of a word

  1. When I end up writing a blog, the blog goes through an algorithm called transformer
  2. transformer converts the "title + content content" into a decimal format.
  3. "hello world" -> 1.2, "gym" -> 5.1, "fitness"-> "5.9"
  4. For every blog we have this number.
  5. if the numbers are closer - they are closely related.

the transformer does the heavy lifting.

how transformer works