AI LLMs can't count lines in a file

Was starting to mess around with the latest LLM models and found that they're not great at counting lines in files.

I gave Gemini 2.5 flash a python script and asked it to tell me what was at line 27 and it consistently got it wrong. I tried repeatedly to prompt it the right way, but had no luck.

https://g.co/gemini/share/0276a6c7ef20

Is this something that LLM bots are still not good at? I thought they had gotten past the "strawberry" counting problems.

Here's the raw file: https://pastebin.com/FBxhZi6G


Comments URL: https://news.ycombinator.com/item?id=44176179

Points: 8

# Comments: 7

https://news.ycombinator.com/item?id=44176179

Created 17d | Jun 4, 2025, 1:40:12 AM


Login to add comment

Other posts in this group

Show HN: SecureBuild – Zero-CVE Images That Pay OSS Projects

We're launching SecureBuild: https://securebuild.com — a new way for open source projects and maintainers to earn revenue by partnering with an

Jun 20, 2025, 6:50:11 PM | Hacker news
Show HN: Nxtscape – an open-source agentic browser

Hi HN - we're Nithin and Nikhil, twin brothers and founders of nxtscape.ai (YC S24). We're building Nxtscape ("next-scape") - an open-source, agentic browser for the AI era.

-- Why bother buildi

Jun 20, 2025, 6:50:09 PM | Hacker news
Show HN: SnapQL – Desktop app to query Postgres with AI

SnapQL is an open-source desktop app (built with Electron) that lets you query your Postgres database using natural language. It’s schema-aware, so you don’t need to copy-paste your schema or writ

Jun 20, 2025, 4:30:20 PM | Hacker news