back
▲ 2 points

Ask HN: Is it a good idea to make a tiny AI for fixing form input formats?

by kuberwastaken·1y ago·5 comments·view on hn ↗
Why not have a very tiny LLM (or something similar) for fixing inputs in forms?

If I put in my address in 2 lines and it required 3, it makes it 3 automatically If I put my dates in the non US format and it required US format, it "corrects" it automatically

Something designed to be light weight enough that even the most basic sites can run them inside

Do you think this is something companies would pay for? Or making this a subscription based browser extension?

5 comments
I wonder if you could use the Chrome local AI API to build something like this: https://developer.chrome.com/docs/ai
Interesting, I'll look into it
Other people may have other opinions, but I think it's generally a bad idea when you automatically "fix" input for a user. Notice how nobody complains about typing suggestions on phones, but there are plenty of complaints about autocomplete. Whenever you "correct" what someone was deliberately trying to do, you'll cause rage.

It reminds me of an experience I had at work. I wrote some tests for a feature that would store some values in a database. However, my tests would always fail. Retrieved data would never match the input data. I eventually decided to trace exactly what was happening in the database and found a stored procedure ran whenever I entered data. It "fixed" my input data. When I told another dev about this they said their "database expert" said it was "good design".

Absolute insanity. Never, ever, "correct" deliberate input. Validate it and tell the user what is wrong. 1) This raises awareness 2) The desired behavior is easier to test.

Not changing the input, just re-ordering it if that makes sense

like the examples I gave - fixing date formats, address lines, name seperation, perhaps auto compressing images, etc

How have one done it on former times? I would just do like this. Why LLM? Even when it's tiny, it's not fast enough and costs money

Regex, custom logic, and Dateformat libs, are enough