Live data from Hacker News

Gemini 2.5 Pro Preview

developers.googleblog.com

261–270 of 728 posts

Re: Gemini 2.5 Pro Preview

#261
post #11

I don't know if I'm doing something wrong, but every time I ask gemini 2.5 for code it outputs SO MANY comments. An exaggerated amount of comments. Sections comments, step comments, block comments, inline comments, all the gang.

So many comments, more verbose code and will refactor stuff on its own. Still better than chatgpt, but I just want a small amount of code that does what I asked for so I can read through it quickly.

Re: Gemini 2.5 Pro Preview

#262

My frustration with using these models for programming in the past has largely been around their tendency to hallucinate APIs that simply don't exist. The Gemini 2.5 models, both pro and flash, seem significantly less susceptible to this than any other model I've tried. There are still significant limitations, no amount of prompting will get current models to approach abstraction and architecture the way a person doe…

[deleted]

Re: Gemini 2.5 Pro Preview

#263
post #118

Earlier quoted context omitted.

Ok, so saying "Implement feature X" leads to a ton of comments. How do you rewrite that comment to not include "don't write comments" while making the output not containing comments? "Write only source code, no plain text with special characters in the beginning of the line" or what are you suggesting here in practical terms?

“Constrain all comments to a single block at the top of the file. Be concise.” Or something similar that does not rely on negation.

But I want no comments whatsoever, not one huge block of comments at the top of the file. How'd I get that without negation?

Besides, other models seems to handle negation correctly, not sure why it's so difficult for the Gemini family of models to understand.

Re: Gemini 2.5 Pro Preview

#264
post #4

>Best-in-class frontend web development It really is wild to have seen this happen over the last year. The days of traditional "design-to-code" FE work are completely over. I haven't written a line of HTML/CSS in months. If you are still doing this stuff by hand, you need to adapt fast. In conjunction with an agentic coding IDE and a few MCP tools, weeks worth of UI work are now done in hours to a higher level of qua…

If it's zero effort, then why do devs need to adapt fast? And wouldn't adapting be incredibly easy? The only disadvantage to not using these tools would be that your current output is slower. As soon as your employer asks for more or you're looking for a new job, you can just turn on AI and be as fast as everyone who already uses it.

Yup, I see comments like the parent all of the time and they are always a head scratcher. They would be far more rational (and a bit desperate) if they were trying to sell something, but they never appear to be.

Always "10x"/"100x" more productive with AI, "you will miss out if you don't adopt now"! Build a great company 100x faster and every rational actor in the market will notice, believe you and be begging to adopt your ways of working (and you will become filthy rich as a nice kicker).

The proof of the pudding is in the eating.

Re: Gemini 2.5 Pro Preview

#265
post #118

Earlier quoted context omitted.

Ok, so saying "Implement feature X" leads to a ton of comments. How do you rewrite that comment to not include "don't write comments" while making the output not containing comments? "Write only source code, no plain text with special characters in the beginning of the line" or what are you suggesting here in practical terms?

This is sort of LLM specific. For some tasks you might try including the word comment but give the order at the beginning and end of the prompt. This is very model dependent. Like: Refractor this. Do not write any comments. As a reminder your task is to refractor the above code and do not write any comments.

> Do not write any comments. [...] do not write any comments.

Literally both of those are negations.

Re: Gemini 2.5 Pro Preview

#266

How does it perform on anything but Python and Javascript? In my experience my milage varied a lot when using C#, for example, or Zig, so I've learnt to just let it select the language it wants. Also, why doesn't Ctrl+C work??

It's very good at Go, which makes sense because I'm assuming it's trained on a lot of Google's code

How would they train it on google code without revealing internal IP?

Re: Gemini 2.5 Pro Preview

#267
post #221

Earlier quoted context omitted.

I've found that heavily commented code can be better for the LLM to read later, so it pulls in explanatory comments into context at the same time as reading code, similar to pulling in @docs, so maybe it's doing that on purpose?

I always thought these were there to ground the LLM on the task and produce better code, an artifact of the fact that this will autocomplete better based on past tokens. Similarly always thought this is why ChatGPT always starts every reply with repeating exactly what you asked again

Comments describing the organization and intent, perhaps. Comments just saying what a "require ..." line requires, not so much. (I find it will frequently put notes on the change it is making in comments, contrasting it with the previous state of the code; these aren't helpful at all to anyone doing further work on the result, and I wound up trimming a lot of them off by hand.)

Re: Gemini 2.5 Pro Preview

#268
post #40

Earlier quoted context omitted.

I have been asking if AI without hallucination, coding or not is possible but so far with no real concrete answer.

Try dropping the entire api docs in the context. If it’s verbose, i usually pull only a subset of pages. Usually I’m using a minimum of 200k tokens to start with gemini 2.5.

That's more than 222 novel pages:

200k tk = 1/3 200k words = 1/300 1/3 200k pages

Re: Gemini 2.5 Pro Preview

#269
post #252

Earlier quoted context omitted.

Simple, and even simpler from your own example. Knowledge has an objective correctness. We know that there is a "right" and "wrong" answer and we know what a "right" answer is. "Consistently correct guesses", based on the name itself, is not reliable enough to actually be trusted. There's absolutely no guarantee that the next "consistently correct guess" is knowledge or a hallucination.

This is a circular semantic argument. You're saying knowledge is knowledge because it's correct, where guessing is guessing because it's a guess. But "is it correct?" is precisely the question you're asking the poor LLM to answer in the first place. It's not helpful to just demand a computation device work the way you want, you need to actually make it work. Also, too, there are whole subfields of philosophy that mak…

I mean, it clearly does based on your comments showing a need for a correctness check to disambiguate between made up "hallucinations" and actual "knowledge" (together, a "consistently correct guess").

The fact that you are humanizing an LLM is honestly just plain weird. It does not have feelings. It doesn't care that it has to answer "is it correct?" and saying poor LLM is just trying to tug on heartstrings to make your point.

Re: Gemini 2.5 Pro Preview

#270
post #92

My frustration with using these models for programming in the past has largely been around their tendency to hallucinate APIs that simply don't exist. The Gemini 2.5 models, both pro and flash, seem significantly less susceptible to this than any other model I've tried. There are still significant limitations, no amount of prompting will get current models to approach abstraction and architecture the way a person doe…

Making LLMs know what they don't know is a hard problem. Many attempts at making them refuse to answer what they don't know caused them to refuse to answer things they did in fact know.

> Making LLMs know what they don't know is a hard problem. Many attempts at making them refuse to answer what they don't know caused them to refuse to answer things they did in fact know.

They are the perfect "fake it till you make it" example cranked up to 11. They'll bullshit you, but will do it confidently and with proper grammar.

> Many attempts at making them refuse to answer what they don't know caused them to refuse to answer things they did in fact know.

I can see in some contexts that being desirable if it can be a parameter that can be tweaked. I guess it's not that easy, or we'd already have it.

Post reply on HN