logoalt Hacker News

BoppreHtoday at 10:59 AM13 repliesview on HN

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


Replies

stingraycharlestoday at 11:05 AM

Because they want it to be executed quickly and cheaply without blocking the workflow? Doesn’t seem very weird to me at all.

show 4 replies
codegladiatortoday at 11:15 AM

what you are suggesting would be like a truck company using trucks to move things within the truck

show 1 reply
mghackerladytoday at 1:08 PM

More like a car company transporting their shipments by truck. It's more efficient

floralhangnailtoday at 1:02 PM

Well, regex doesn't hallucinate....right?

blkstoday at 11:56 AM

Because they actually want it to work 100% of the time and cost nothing.

show 2 replies
draxiltoday at 11:17 AM

Good to have more than a hammer in your toolbox!

throwaw12today at 12:27 PM

because impact of WTF might be lost in the result of the analysis if you solely rely on LLM.

parsing WTF with regex also signifies the impact and reduces the noise in metrics

"determinism > non-determinism" when you are analysing the sentiment, why not make some things more deterministic.

Cool thing about this solution, is that you can evaluate LLM sentiment accuracy against regex based approach and analyse discrepancies

ojrtoday at 11:46 AM

I used regexes in a similar way but my implementation was vibecoded, hmmm, using your analysis Claude Code writes code by hand.

pfortunytoday at 12:22 PM

They had the problem of sentiment analysis. They use regexes.

You know the drill.

kjshsh123today at 12:30 PM

Using regex with LLMs isn't uncommon at all.

sumtechguytoday at 11:56 AM

hmm not a terrible idea (I think).

You have a semi expensive process. But you want to keep particular known context out. So a quick and dirty search just in front of the expensive process. So instead of 'figure sentiment (20seconds)'. You have 'quick check sentiment (<1sec)' then do the 'figure sentiment v2 (5seconds)'. Now if it is just pure regex then your analogy would hold up just fine.

I could see me totally making a design choice like that.

lou1306today at 11:02 AM

They're searching for multiple substrings in a single pass, regexes are the optimal solution for that.

show 2 replies