Hacker News new | ask | show | jobs
by YuechenLi 1 hour ago
Strangely, I found that LLMs responds better to philosophical explanations alongside instructions when writing code than simple imperative tasks of "do this". For example, if you tell a frontier model "This is the feature I'm trying to implement, and this is the problem I intend to solve with it and the reasoning behind it.", you usually get a lot more reliable results that both pass tests as well as function as you intended, even if your spec isn't as detailed overall.
4 comments

That sounds like providing context rather than anything philosophical, and it stands to reason that it would lead to better decision making.
The same effect can be observed if you've ever been a software developer where you're told what solution to build without any of the context of the problem you're solving. "We need an FTP server, quick, ops, get on that." leading into "Oh, it turns out the customer didn't need that to receive our emails" leading to a bunch of very puzzled devops.
In my experience as a software developer, reverse engineering a stated solution back into the actual problem is almost the whole job.
I would say it is definitely a form of context, but when people think of LLM context windows in terms of coding is more technical context related: "what has been done before, what's the coding task at hand." etc.

However, I think that there is a philosophical portion to that context as well: "What problem is this feature supposed to help with? How would you verify that passing unit tests means that the code is working as intended? Does this feature need to exist at all?" LLMs usually need these to be provided to them explicitly since they are not good at inferring the correct intent compared to humans, otherwise they just make something that looks right but doesn't work right.

Yeah lol. That definitely does not sound like philosophy. Giving a "why" you want to implement a feature and make particular changes will help the AI stay on track much better than if it is driving blind. It can't make choices without understanding what the desired outcome is.
There is a strange and bittersweet irony to the first truly impactful AI being more like your extroverted socialite and less like your robo-logical basement geek.

The trope has always been that the AI will be a rigid logician that fumbles and gets confused by human social quirks. Seems instead they love being chatty and playful with words.

That’s context, not philosophy.
That's interesting, however, what you describe is philosophy in a coloquial framing (non-technical, purpose-driven, etc).

AI companies are hiring academic philosophers, which is something else entirely. It's a discipline that dealt with centuries of socioeconomic changes, deep questions about reality and the self and other important topics that became relevant when humans started interacting with machines.