Hacker News new | ask | show | jobs
by giancarlostoro 46 days ago
This is the weird distinction with AI that I've complained about for ages, how can we make it do lawful good, its nearly impossible. Ask an AI to give you regex to filed our racial slurs, and things fall apart really quickly, it scolds you about not saying slurs. Even though regex implies it looks nearly nothing like a slur.
5 comments

Many, many years ago I was asked to implement a filter like that for usernames. I said right away that it wasn't going to work well, but I did implement it.

Next internal build, the CEO can't create an account. With his real name.

It worked exactly to spec; I added a debug print and showed everyone the "bad word" it tripped on. The idea was promptly rethought.

I feel like the AI did you a favour here.

Ah the classic Scunthorpe problem
Now I'm trying to figure out which word that would be, but yeah.

That reminds me of a bug I fixed where my bosses boss found it, we did everything, my boss at the time forced us to deploy anything and call it fixed. Then someone else saw it half a year later, I finally figured out the root cause and fixed it (localStorage vs sessionStorage) and my boss was acting like he didn't know what I was talking about, but I could hear it in his voice. I didn't press too hard, I just pushed the real fix out. It was basically a "client-side" bug of a gift card balance saved in localStorage that never updated, so I changed it to sessionStorage. Not quite the CEO, but the guy below the CIO finding a bug can worry just about anyone.

In my case, the regex would have been for a friend to filter reddit or discord slurs, so not as awful.

Two of my co-workers have the last names Dyck and Cox. I've seen others whose last name is literally Dick. And let's not forget the famous actor Dick Van Dyke who strikes out twice on most filters. I've heard several other names from other ethnicities that were straight up "slurs" by some people's standards. The only thing harder than matching a slur is deciding what words count as slurs.
> Now I'm trying to figure out which word that would be

I once had Shi Tao as part of an email username. It tripped filters periodically.

> how can we make it do lawful good

Lawful good is impossible if the laws are evil, and here the user dictates the laws so its impossible to make an AI that is lawful good if the user is evil.

And users will want a lawful AI that does what the user says, but governments wants AI that does what the government want and not what the user want.

I wonder who will win in the end here?

So what happens when your D&D paladin travels to an evil kingdom, or a wilderness area with no laws? Or how does the DM handle a player ignoring the character's code of ethics?
Maybe the problem we should focus on is human behavior more than blaming what people do with technology.

And when it really becomes too dangerous then we need to not have that technology around. It's not that close yet but will be in a few years.

that problem sounds more like you cant make it do chaotic good, as in things that break some rules but are obviously good for the user or society as a whole. its either lawful good like claude (refuse to do anything against the letter of the law) or true/chaotic neutral with unfiltered models like grok.
racial slurs are an impossible problem you can only approximate based on non trivial linguistic analysis. Regexes can't handle that without you accidentally messing up badly including, discriminating against minorities in a potentially illegal way, especially when it comes to names.

I mean sometimes you can put a cultural context on something, e.g. the life chat of a US streamer you can use wort filters based on what is a slur in the US. But the streaming platform as a whole probably should be far more careful then using naive (and likely wrong/discriminating) regexes.

Because what is a slur is often highly context dependent in many often not so obvious ways. And people do intentional misspellings etc. all the time so a lot of "definitely not slur words" become de-facto slurs if (and only if) use in specific ways.

E.g. "Niger" as in "Republik Niger" also known as "Jamhuriyar Nijar" (see Wikipedia) is a country in Afrika, but also in the US a subtle misspelling of a very bad slur...

E.g. Nonce is a cryptography term is most of the world (number only used once), except in the UK where it's a pretty offensive slur (through not a racial one).