Live data from Hacker News

Ask HN: Did you encounter any leap year bugs today?

news.ycombinator.com

241–250 of 498 posts

Re: Ask HN: Did you encounter any leap year bugs today?

#243
post #207

Earlier quoted context omitted.

Wired: LLM are practically AGI Tired: ChatGPT thinks February 29th isn't a valid date.

My favorite prompt: asking "How many e's are there in the word egregious". Always says three (ChatGPT 3.5, 4, 4 turbo). When you ask it which three, it realizes its mistake and apologizes (or sometimes tells you where they are that is completely wrong). Looks like it just outputs gibberish for these things.

ChatGPT is specifically bad at these kinds of tasks because of tokenization. If you plug your query into https://platform.openai.com/tokenizer, you can see that"egregious" is a single token, so the LLM doesn't actually see any "e" characters -- to answer your question it would have had to learn a fact about how the word was spelled from it's training data, and I imagine texts explicitly talking about how words are spelled are not very common.

Good explanation here if this still doesn't make sense: https://twitter.com/npew/status/1525900849888866307, or check out Andrej Karpathy's latest video if you have 2 hours for a deep dive: https://www.youtube.com/watch?v=zduSFxRajkE

IMO questions about spelling or number sense are pretty tired as gotchas, because they are all basically just artifacts of this implementation detail. There are other language models available that don't have this issue. BTW this is also the reason DALL-E etc suck at generating text in images.

Re: Ask HN: Did you encounter any leap year bugs today?

#244
post #23

Heard from a friend in China: the age calculation portion of the app to schedule a marriage certificate had a bug where they subtracted 22 (legal minimum age) from the year, which resulted in 2002-02-29 which doesn't exist. The app intends to compare this against the user's birth date. The error handling code assumes all errors are from the comparison. The app then rejected all marriage certificate appointments by co…

This is why you use a datetime library.

Re: Ask HN: Did you encounter any leap year bugs today?

#245
post #217

Earlier quoted context omitted.

It’s always gibberish, it’s just really good at guessing. I forgot what exactly it was I was doing. We were trying to get it to generate word lists of words ending with x or maybe it was starting with. For a marketing PoC and it made up oceans of words that not only didn’t start/end with x but mostly didn’t include x at all. Isn’t this also why it can pass CS exams and job interviews better than like 95% of us, but t…

But also it doesn't see characters. It sees tokens. The only way it would be reliably able to solve it is if it had a lookup table of token to characters. Which it likely doesn't. You couldn't do it either unless you learned the exact matchings of all tokens to all characters in that token and their positions if you were given tokens as an input. You would have learned the meaning of the token, but not what the exact…

Even if it sees tokens, I don't think it's an impossible task. Certainly an advanced enough LLM should be able to decipher token meanings, to know that a word is made up of the individual character tokens regardless of how the full word is tokenized. Maybe something gpt5 can do (or there's some real technical limitation which I don't understand)

Re: Ask HN: Did you encounter any leap year bugs today?

#246

We have a rails 6 app, and there's a test that essentially expects time_ago_in_words(1.year.from_now) to return "about 1 year" (as part of a user facing message). The test failed. I thought it's a flaky test but i was able to reproduce it locally. Turns out executing that code on a leap day returns "almost 1 year" instead. Can test it in rails console if you are interested: irb(main):001:0> include ActionView::Helper…

> distance_of_time_in_words(Date.new(2025, 2, 28), Date.new(2024, 2, 28)) Curiously, this is also not quite a year, even though the days and months are the same.

It’s probably comparing the number of days between the dates with the number of days in a year, which would usually work.

Re: Ask HN: Did you encounter any leap year bugs today?

#248

The other way around! Today a few services that don't congratulate me on my birthday (on non-leap years) did. I was born on February 29th.

Happy birthday to you! It’s a special day and We don’t get this chance to say this often. Enjoy your day

Re: Ask HN: Did you encounter any leap year bugs today?

#249
post #103

We have a product that uses ChatGPT via the API, using the 3.5 turbo version. Our query involves some dates. Instead of giving back text like it usually does, today it has been giving errors because it does not think 2024-02-29 is a valid date. This is easy to reproduce with the web interface, at least sometimes [0]. It start out by saying it's not a valid date and then as it's explaining why it isn't it realizes its…

ChatGPT thinks today is March 1. Go ahead and ask it what today’s date is.

thats better then Mistral... it "thinks" it is March 15th 2023

"The current date is March 15, 2023. However, please note that as a large language model, my knowledge is based on the data I was trained on, which is up to 2021. Therefore, I cannot provide real-time information or updates on current events or dates. I recommend checking a reliable source such as a calendar or a trusted news website for the most accurate and up-to-date information."

Re: Ask HN: Did you encounter any leap year bugs today?

#250
post #27

Yes, Hesai LiDAR [1] bug is grounding cars. [1] https://pandaily.com/hesai-technology-addresses-lidar-produc...

Fascinating - why does a LiDAR involve the date?

LiDARs and other sensors typically need to be time-synchronized with the rest of the robotic system. I wouldn't be surprised if the bug is related to that.
Post reply on HN