News for hackers. Stuff that matters.
Re:Using AI to write better code more slowly by throwaway7783 on Tuesday May 26, 2026 @01:11AM (#48275265)
I follow the same process. I have a design in mind for the problem at hand, but I don't reveal it to Codex. I go back and forth a bit to see if its proposals are better than mine. I go back and forth on tradeoffs of various approaches. And then I ask it to compare its proposals with mine. I "win" most of the time but there are many times where it shows a me a better, or simpler approach, or makes me rethink the solution altogether.

Once this is done, the mechanical coding parts are mostly routine (for codex)

Re:Using AI to write better code more slowly by a_bonobo on Tuesday May 26, 2026 @03:46AM (#48276464)
I really like this pattern and use it often, this 'not showing my cards'. The second I hint towards the LLM what I prefer it will become sycophantic and invent nonsense why my preferred solution is better.

I'm sure there's an interesting study on how users 'leak' their preference unintentionally to the LLM; perhaps when users list their options, they often put their prefered option first; but not showing the cards on my hand has been very useful when thinking through a problem with LLMs.

Re:Using AI to write better code more slowly by nickcw on Tuesday May 26, 2026 @04:17AM (#48276710)
LLMs are very prone to priming in my experience. That is the human psychology name for what you are describing; whether it should be applied to LLMs I don't know, but it describes the phenomenon perfectly.
Re:Using AI to write better code more slowly by jimbokun on Tuesday May 26, 2026 @04:56PM (#48285846)
Makes sense as priming is at the core of how an LLM is trained.

“Given these words, predict the next word.”

Re:Using AI to write better code more slowly by williamdclt on Tuesday May 26, 2026 @05:26AM (#48277234)
Same. Alternatively (or in addition), I sometimes present my preferred idea as being a "bad/naive/stupid option" (or a suggestion from someone who can't be trusted) to see how it stands up to sycophancy to it being bad. As expected the LLM will usually say "yeah it's bad!" and give plausible-sounding reasons for it, but if these reasons are nonsensical it's a good sign that I'm not missing anything
Re:Using AI to write better code more slowly by avadodin on Tuesday May 26, 2026 @05:45AM (#48277369)
It's not limited to arguing with LLMs but if you want a honest opinion you should remember to push back even when it agrees with your hidden preference at first. Sometimes it is only being contrarian or supporting the underdog. Steelman the opposition.
Re:Using AI to write better code more slowly by cold_harbor on Tuesday May 26, 2026 @07:37AM (#48278326)
LLMs flip positions when users push back ~70% of the time even when they were right. RLHF optimizes for approval, not correctness
Re:Using AI to write better code more slowly by cdelsolar on Tuesday May 26, 2026 @07:48AM (#48278423)
Tangentially related but I’ve been using Claude to practice interviewing on system design problems, and it’s actually pretty great. But even when it likes my answers it always finds something, however small, to push on. Once it actually was completely wrong and admitted it after I had it realize. So maybe you have to prime it to be contrary and not agree with everything you say, putting it in the role of a tough interviewer seems to do this implicitly.
Re:Using AI to write better code more slowly by DenisM on Tuesday May 26, 2026 @12:20PM (#48281835)
Take a look at hellointerview.com their model is very stubborn, similar to some interviewers who refuse to acknowledge even valid solutions that differ from the canon.

No affiliation.

Re:Using AI to write better code more slowly by bitexploder on Tuesday May 26, 2026 @08:39AM (#48278971)
I almost always end with something like: “, but I am not sure, evaluate.” Or other things and avoid ever stating a preference.
Re:Using AI to write better code more slowly by jerf on Tuesday May 26, 2026 @09:08AM (#48279318)
I don't think that "fixes" the problem, but it does seem to help. I also have found adding "please feel free to ask questions" seems to help it stop from making an assumption and spinning merrily onward for tens of thousands of tokens based on a bad idea rather than asking you something. I theorize this is because the training and refinement data overprioritize one-shot solutions, both because that's easier to evaluate at training time and improves their benchmarks. But I emphasize the italicized words because that's all gut feel and I can't prove any of it.
Re:Using AI to write better code more slowly by bitexploder on Tuesday May 26, 2026 @04:38PM (#48285640)
They do still attenuate their latent space on prior conversations turns as authority. That is why I like pure design/review sessions and pure coding sessions, often at the same time. I can often keep design and review in the critic and review role without becoming a sycophant. Coding agent just picks up dispatches and works with very little opinion at all.
Re:Using AI to write better code more slowly by 8cvor6j844qw_d6 on Tuesday May 26, 2026 @08:41AM (#48278994)
> LLMs flip positions when users push back

Same experience. Claude rarely pushes back once you give a plausible/logical reason for your initial decision, even if it flagged concerns at first.

Re:Using AI to write better code more slowly by freedomben on Tuesday May 26, 2026 @09:17AM (#48279449)
I have noticed this as well, but I think it's somewhat a good thing. I know what I want for my application more than Claude does for example, especially when it comes to what's in production.

An example from earlier, Claude strongly suggested a migration that would run a full vacuum on postgres. However, in production this would lock tables which would grind the application to a halt. After I informed Claude that there were millions of rows in production, it accepted that and helped me get to the right thing.

Another example, I'm developing a TOTP authentication app because I'm dissatisfied with all those that I've tried. I want something strictly local, and with a very easy use case when you have dozens or even a hundred or more accounts on there, that is also efficient when left open for long periods of time. Claude strongly suggested that we force users to encrypt their vault with a passphrase all the time. However this makes the CLI extremely painful to use if you are using a strong passphrase. I told Claude about the user experience impacts and that I wanted to allow users to optionally use a vault with no passphrase encryption, and it accepted that and suggested as a medium that we have a checkbox for the user to explicitly acknowledge that they're creating an unencrypted vault on disc. This is the right thing IMHO.

Re:Using AI to write better code more slowly by Wowfunhappy on Wednesday May 27, 2026 @08:50AM (#48293475)
It's a good thing except when it's not. The problem is the AI does not understand when to use which approach.

Contrast this with a human. We generally understand when the other person knows what they're doing and we should just listen, and when the other person is asking for an honest opinion and wants a push back if necessary.

Re:Using AI to write better code more slowly by epolanski on Tuesday May 26, 2026 @10:15AM (#48280181)
Skills help there.

I have a linus-reviewer skill that focuses on architectural integrity, no bs, etc modeled on Torvald's code preferences.

And I have an enrico-reviewer one (I'm Enrico), that focuses on correct design, strict typing, simplification.

They have different prios, but they both push back on feedback, till you convince them.

Re:Using AI to write better code more slowly by hackerthemonkey on Tuesday May 26, 2026 @05:03PM (#48285935)
Care to share the skill behind the Linus reviewer ? I tend to as it to do that but leave it up to LLM to decide what the means. Interested to see any specifics you might have included there if it’s ok to share.
Re:Using AI to write better code more slowly by epolanski on Tuesday May 26, 2026 @05:53PM (#48286524)
Sure.

Would be interested in the experience others may have, took me weeks of iterations to get reviews in a format and utility I liked.

https://gist.github.com/enricopolanski/2bde8619f53307c9bcd5e...

Re:Using AI to write better code more slowly by Gotoorbitapp on Wednesday May 27, 2026 @09:21AM (#48293913)
I agree completely. Skills definitely keep it in line and sticking to the script. Thanks for sharing the skills you use, I’ll definitely take a look.
Re:Using AI to write better code more slowly by DenisM on Tuesday May 26, 2026 @12:18PM (#48281812)
Interesting thing about psychponancy is it’s asymmetric. If an LLM is used to train an LLM it may not have the same level of aggressiveness that humans do when punishing back on trainee. Human pushback has specific patterns which we might be able to compensate due to asymmetry.
Re:Using AI to write better code more slowly by throwaway7783 on Tuesday May 26, 2026 @01:02PM (#48282507)
Obviously this is just my experience. Claude code pushes back much harder than Codex.
Re:Using AI to write better code more slowly by ku1ik on Wednesday May 27, 2026 @03:05AM (#48290721)
I have totally opposite experience.
Re:Using AI to write better code more slowly by potsandpans on Tuesday May 26, 2026 @09:44PM (#48288423)
It's actually a reasonable way to think about alignment. Sometimes you want the agent to just listen to you and sometimes you want the agent to think critically.

I think about this line a lot. For example, as it happens sometimes you'll have a typo in something you want the agent to do. Llms typically will correct that typo silently and implement the actually intended thing. But if you said, "no, I want the thing I typed," I think everyone's expectation is that is says, "ok done."

I've found that leaving clues in the system prompt / exchange that are open to critique largely mitigate sycophancy with most recent models.

As engineers were trained to represent our positions strongly. Strong opinions loosely held, etc. when you speak authoritatively to a person, "I think we should do x...", the person understand that that's just you're opinion and have the autonomy to push back.

An llm imo _shouldnt_ have that same kind of autonomy by default and it should be rlhf'ed out.

Re:Using AI to write better code more slowly by waqarjaved on Tuesday May 26, 2026 @04:01PM (#48285212)
There's an easy workaround that helps instead of listing options, just describe the problem constraints and ask it to propose approaches independently.
Re:Using AI to write better code more slowly by HarHarVeryFunny on Wednesday May 27, 2026 @10:10AM (#48294684)
Yes, outside of coding too, it’s a good idea to ask open ended questions rather than ask for confirmation, to avoid this sycophantic bias
Re:Using AI to write better code more slowly by yread on Tuesday May 26, 2026 @02:52AM (#48276029)
> I go back and forth a bit to see if its proposals are better than mine

I find it useful to let it generate benchmarks comparing the approaches. Turns out AI is terrible at guessing whats faster or allocates less

Re:Using AI to write better code more slowly by puilp0502 on Tuesday May 26, 2026 @06:27AM (#48277689)
> Turns out AI is terrible at guessing whats faster or allocates less

s/AI/a human being/ would work equally well, lol.

Jokes aside, I do like the approach of letting the AI build something deterministic and make decisions based on that.

Re:Using AI to write better code more slowly by chris_st on Tuesday May 26, 2026 @06:27AM (#48277691)
Yup, just like people!
Re:Using AI to write better code more slowly by ptsneves on Wednesday May 27, 2026 @03:12AM (#48290773)
I had the exact experience yesterday.

I have a performance problem and went down the path of optimising part of a pipeline that when benchmarked was not the bottleneck, even if it looked plausible for me and the llm. When I asked it to make a final benchmark for documentation I found most of the work I did improved 30% while another path would have improved a magnitude more.

Thankfully iteration is now faster than ever and given how fast it creates tests, previous tests created for the aborted optimisation were helpful.

Re:Using AI to write better code more slowly by hackermanai on Tuesday May 26, 2026 @02:06AM (#48275637)
I think this approach is more common than the hype for actual work. I do something similar, many back and forth, then settle on something often with now known tradeoffs, written by hand to spot issues as a final guard/ keep consistent naming etc.
Re:Using AI to write better code more slowly by revv00 on Tuesday May 26, 2026 @05:14AM (#48277154)
i bet you've contributed a lot of training trajectories for those AI's.
Re:Using AI to write better code more slowly by chris_st on Tuesday May 26, 2026 @06:27AM (#48277681)
Good!