An LLM company using regexes for sentiment analysis? That's like a truck company using horses to transport parts. Weird choice.
Because they want it to be executed quickly and cheaply without blocking the workflow? Doesn’t seem very weird to me at all.
Oh it’s worse than that. This one ended up getting my account banned: https://github.com/anthropics/claude-code/issues/22284
Because they actually want it to work 100% of the time and cost nothing.
what you are suggesting would be like a truck company using trucks to move things within the truck
Good to have more than a hammer in your toolbox!
LLMs are good at writing complex regex, from my experience
A lot if things dont make sense until you involve scale. Regex could be good enough do give a general gist.
It's more like workers on a large oil tanker using bicycles to move around it, rather than trying to use another oil tanker.
It's more like a truck company using people to transport some parts. I could be wrong here, but I bet this happens in Volvo's fabrics a lot.
Cloud hosted call centers using LLMs is one of my specialties. While I use an LLM for more nuanced sentiment analysis, I definitely use a list of keywords as a first level filter.
Don’t worry, they used an llm to generate the regex.
Using some ML to derive a sentiment regex seems like a good actually?
This just proves its vibe coded because LLMs love writing solutions like that. I probably have a hundred examples just like it in my history.
Not everything done by claude-code is decided by LLM. They need the wrapper to be deterministic (or one-time generated) code?
> That's like a truck company using horses to transport parts. Weird choice.
Easy way to claim more “horse power.”
LLMs cost money, regular expressions are free. It really isn't so strange.
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
I used regexes in a similar way but my implementation was vibecoded, hmmm, using your analysis Claude Code writes code by hand.
More like a car company transporting their shipments by truck. It's more efficient
They had the problem of sentiment analysis. They use regexes.
You know the drill.
As far as I can tell they do nothing with it. They just log it.
Using regex with LLMs isn't uncommon at all.
It's all regex anyways
Because they are engineers? The difference between an engineer and a hobbyist is an engineer has to optimize the cost.
As they say: any idiot can build a bridge that stands, only an engineer can build a bridge that barely stands.
The amount of trust and safety work that depends on google translate and the humble regex, beggars the imagination.
Asking a non deterministic software to act like a deterministic one (regex) can be a significantly higher use of tokens/compute for no benefit.
Some things will be much better with inference, others won’t be.
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.
They're searching for multiple substrings in a single pass, regexes are the optimal solution for that.
it's like a faster than light spaceship company using horses. There's been infinite solutions to do this better even CPU only for years lol.
It's almost as if LLMs are unreliable
[dead]
The difference in response time - especially versus a regex running locally - is really difficult to express to someone who hasn't made much use of LLM calls in their natural language projects.
Someone said 10,000x slower, but that's off - in my experience - by about four orders of magnitude. And that's average, it gets much worse.
Now personally I would have maybe made a call through a "traditional" ML widget (scikit, numpy, spaCy, fastText, sentence-transformer, etc) but - for me anyway - that whole entire stack is Python. Transpiling all that to TS might be a maintenance burden I don't particularly feel like taking on. And on client facing code I'm not really sure it's even possible.