# Chapter-Based YouTube Comment Sorting Without an AI Model

Apps & experiments · Creator, sole engineer · shipped

Comments on a long video are an undifferentiated stream. The ones relevant to the section you are actually watching are buried under hundreds about the intro.

## The detail

This segments them into chapter-based buckets synced to playback position.

The interesting part is what it does not use. An earlier version of this called a language model to classify each comment batch - slow, costly, and it required the user to supply an API key. The current version replaces that entirely with a hand-written TF-IDF and cosine-similarity matcher running in the content script: faster, free, completely private, and good enough for the task.

Knowing when not to reach for a model is a skill in itself, and this project is the clearest demonstration of it in my portfolio.

Vanilla JavaScript, Chrome Manifest V3, classical information retrieval.

## What I did

- Built a browser extension that segments comments into chapter buckets synced to playback position
- Wrote a TF-IDF and cosine-similarity matcher by hand, running entirely in the content script
- Replaced an earlier LLM-based version after determining classical retrieval was faster, free and private
- Shipped both versions and can articulate the trade-off between them

## Stack

JavaScript, Chrome Extension, Information Retrieval, TF-IDF, Algorithms, DOM Manipulation

Case study: https://www.siddhvasudev.com/projects/chapter-based-youtube-comment-sorting-without
