3 ms·
> Sometimes a regex is the right tool. I’d argue that in this case, it isn’t. Exhibit 1 (from the earlier thread): https://github.com/anthropics/claude-code/is
by layer8 7mo ago
> Sometimes a regex is the right tool.
I’d argue that in this case, it isn’t. Exhibit 1 (from the earlier thread): https://github.com/anthropics/claude-code/issues/22284 https://github.com/anthropics/claude-code/issues/22284.
The user reports that this caused their account to be banned: https://news.ycombinator.com/item?id=47588970 https://news.ycombinator.com/item?id=47588970
Maybe it would be okay as a first filtering step, before doing actual sentiment analysis on the matches. That would at least eliminate obvious false positives (but of course still do nothing about false negatives).
- ArvinJA 7mo agoIs this really the use-case? I imagine the regex is good for a dashboard. You can collect matches per 1000 prompts or something like that, and see if the number grows or declines over time. If you miss some negative sentiment it shouldn't matter unless the use of that specific word doesn't correlate over time with other negative words and is also popular enough to have an impact on the metric.
- internetter 7mo agoWhen you read the code, what you propose is actually its exclusive use... logging.
- ach9l 7mo agohave you heard about rlhf?