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.
Gemini 2.5 Pro Preview
261–270 of 728 posts
Re: Gemini 2.5 Pro Preview
#262My 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…
Re: Gemini 2.5 Pro Preview
#263Earlier 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.
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>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.
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
#265Earlier 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.
Literally both of those are negations.
Re: Gemini 2.5 Pro Preview
#266How 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
Re: Gemini 2.5 Pro Preview
#267Earlier 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
Re: Gemini 2.5 Pro Preview
#268Earlier 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.
200k tk = 1/3 200k words = 1/300 1/3 200k pages
Re: Gemini 2.5 Pro Preview
#269Earlier 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…
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
#270My 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.
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.