LLM is the Horse


Recently someone posted on Hacker News about the Claude Code source code that got leaked, and the first comment was pointing out how they have a regex to detect a negative sentiment in the code. Then one comment got me thinking:

Claude Code uses regex to analyze the sentiment of the user prompt

Claude Code uses regex to analyze the sentiment of the user prompt

More specifically that last one, reproducing here:

An LLM company using regexes for sentiment analysis? That’s like a truck company using horses to transport parts. Weird choice.

I think the analogy couldn’t be more wrong. In fact, it makes more sense inverted. The LLM is the horse, and the regex is the truck. In the sense that regex are more efficient in parsing text than an LLM is, but it requires a person driving it, like the truck. While the horse can do it by itself, it’s a more complicated system that is slower and more expensive (well, not in terms of money, but horses are animals that have needs and can’t work all the time).

That reminds me of a similar discussion I saw years ago when autonomous cars became a thing. So much research and engineering into a car to make it drive by itself and avoid obstacles, when the very previous thing we used for transportation already did all of this! Yes, the same horses!

Of course, in the case of autonomous cars, we’re talking about speed and conformation to the current transportation infrastructure we have in our cities. And in the LLM analogy, needless to say that it can perform sentiment analysis very well, but I guess everything has their own use case. Or as Hacker News user draxil posted: “Good to have more than a hammer in your toolbox!”

What are your thoughts on it?

Related posts