Live data from Hacker News

Testing GPT 4's code-writing capabilities with some real world problems

tylerglaiel.substack.com

11–20 of 677 posts

Re: Testing GPT 4's code-writing capabilities with some real world problems

#11

To be fair, in 15 years writing code, I have spent the vast majority of my time working on minor variations of problems already solved. I am not a fancy developer coming up with new algorithms. I make sign up flows, on-boarding flows, paginated lists, integrations to other apis. And I definitely feel that my job might be threatened by LLMs.

I think our jobs are threatened not because the LLMs will be much better than us, but because dirt cheap tooling will be developed on top of them that will make things which are “good enough” and are a fraction of the price.

I think outstanding software will still require well-paid, competent people orchestrating and developing a lot of complex systems for a while yet… But there’s a ton of bad software out there that will be able to be maintained for far less, and I suspect a lot of companies will be drawn to creating cookie cutter products generated by LLMs.

Just as people have turned to stores and blogs generated on templated systems, I think all of that and more will continue but with even more of it handled by LLM-based tooling.

I don’t think it’ll be next week, but I suspect it’ll be less than 10 years.

Some people expect that’ll lead to more software existing which will inevitably require more develops to oversee, but if that’s the case, I suspect they will be paid a lot less. I also expect that once AI tools are sophisticated enough to do this, they will largely make that level of oversight redundant.

Soon they could potentially patch the bugs in the software they generate by watching Sentry or something. Just automatically start trying solutions and running fuzz tests. It would be way cheaper than a human being and it would never need to stop working.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#12
One thought that came to mind when the author mentioned that GPT-4 seemed to want to use A* was that maybe the problem statement was not formed in a way that would get the best response. I'm not entirely sure if this type of back and forth would be useful, but just struck me as interesting to try.

I put the following prompt into ChatGPT (no GPT-4 access for me yet):

*A problem statement is given as follows:

An agent needs to find the best path on a 10x10 tile grid from their current location to a target location. They have a limited movement range of 5 points. Regular tiles cost 1 point to move through, water tiles cost 2 points to move through. Fire tiles cost 1 point to move through, but they should avoid pathing through them even if it means taking a longer path to their destination (provided the path is still within their limited movement range)

Please point out any parts of the problem statement that require clarification.*

Which returned the following response:

Based on the given problem statement, some potential areas that may require clarification are:

Current location and target location: It is not clear if the current location and the target location are fixed or if they change with each problem instance. If they are fixed, it should be mentioned explicitly. If they are not fixed, it should be specified how they are generated for each problem instance.

Movement range: It is not specified whether the agent's movement range is circular or square. If it is circular, it means that the agent can move to any tile that is within a distance of 5 from its current location. If it is square, it means that the agent can move to any tile that is within a range of 5 tiles in both the horizontal and vertical directions. The shape of the movement range needs to be specified.

Fire tiles: The problem statement mentions that the agent should avoid pathing through fire tiles even if it means taking a longer path to their destination, but it is not clear how the agent knows which tiles are fire tiles. It should be specified how the agent perceives and distinguishes fire tiles from regular tiles.

Tile costs: The problem statement mentions that regular tiles cost 1 point and water tiles cost 2 points, but it is not specified what happens if the agent moves diagonally. It should be specified whether diagonal moves are allowed and how much they cost.

Objective function: It is not specified how the "best path" is defined. It should be mentioned whether the objective is to find the shortest path or the path that minimizes some other cost function (e.g., total cost of the path).

Re: Testing GPT 4's code-writing capabilities with some real world problems

#13
Yep: the biggest remaining weakness is that it's incapable of thinking deeply and iteratively. This is an architectural limitation (lack of reflectivity), but to fix it will probably usher in the singularity, so maybe we should be glad for it.

I suspect if you poked GPT-4 just right (starting with a detailed design/analysis phase?) it could find a rhetorical path through the problem that resulted in a correct algorithm on the other end. The challenge is that it can't find a path like that on its own.

Op: Can you get it to write your algorithm for this problem if you describe it in detail, as-is?

I suspect the difficulty here is just finding a socratic part to that description, which would tend to be rare in the training material. Most online material explains what and how, not why; more importantly, it doesn't tend to explain why first.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#14
The only take-home message here is that people who claim to write 'self-documenting code' are well, let's not be hyperbolistic, but come on. No comments on that code example? Every line could have an explanatory comment, then the author could remember what they were thinking at the time and it would probably help the AI out too.

> "People who claim code can document itself considered harmful"

Re: Testing GPT 4's code-writing capabilities with some real world problems

#15

To be fair, in 15 years writing code, I have spent the vast majority of my time working on minor variations of problems already solved. I am not a fancy developer coming up with new algorithms. I make sign up flows, on-boarding flows, paginated lists, integrations to other apis. And I definitely feel that my job might be threatened by LLMs.

Whenever these kinds of comments are made, the short story “Profession” comes to mind by Isaac Asimov. In this story people’s aptitudes are evaluated and the relevant knowledge and skills are downloaded. The protagonist of the story however keeps being rejected for download and has to struggle to acquire the same skills his peers acquire instantly and magically. It’s a great read with a fantastic ending.

The morale is that it’s always better to have unique hard won skill sets that others don’t. Double down on those. Think of LLMs as freeing you to do more interesting high level tasks. Rather than having to build those menial tasks, what if you focused on your creativity getting the AI to build new types of product or gain new insights that peers aren’t considering. What if you leveraged the AI to build prototypes of ideas you wouldn’t have to otherwise?

Of course that’s easier said than done. For now, take comfort in the fact that no one is seriously trusting this as anything more than a glorified autocomplete (if that).

Re: Testing GPT 4's code-writing capabilities with some real world problems

#16
post #8

In before all the comments about how “most code is trivial” or “most programming is stuff that already exists” or “you’re missing the point look how it’s getting better”. I really am in awe of how much work people seem willing to do to justify this as revolutionary and programmers as infantile, and also why they do that. It’s fascinating. Thinking back to my first job out of college as a solid entry level programmer.…

I think most people see where the puck is going, and even where it is right now is very impressive. It's not hard to see that it will be likely less than 5 years before it will be able to do what you did on day 2, and much more, at a tiny fraction of the cost, with no downtime, no attitude problems, sick days, etc. The things you mentioned (taking on board feedback, testing across devices, iterating on solutions) doesn't seem very far away at all.

The rate of increase in capabilities is also unpredictable, which is what is amazing & terrifying.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#17
So it continues to reaffirm what we’ve known: generative LLM does not have a model of the world, can not reason and can not plan. It generates text by mix-matching remembered texts and thus it can not generate truly new content.

No surprise because GPT-4 is built upon the same model as GPT-3. Clever Engineering will bring us far, but breakthrough requires change of the fundamentals.

Nevertheless, it’s useful and can helps us solve problems when we guide it and split the work into many smaller subunits.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#18
post #7

So, how long until GPT decides it wants to automate all this tedious work and starts trying to code its own language model?

GPT won't even have to decide that, we'll look for ways to expand the model to self learn and tell it to do just that. Self improving AI is the goal for a lot of people.

Not that this is a particularly controllable goal, nor a long term smart goal if you're human.

Re: Testing GPT 4's code-writing capabilities with some real world problems

#19
As a human programmer I didn't quite understand the problem statement until I read the whole article and the tests.

I believe the goal is to find a path with the fewest possible "fire" cells and the minimum cost as a tie breaker. The cost of a path is the sum of its cells' cost and it can't be greater than 5.

If I understood the assignment correctly, I don't think the problem statement is equivalent to what's included in the prompt. Specifically, the prompt doesn't clarify what happens if you have to cross through multiple "fire" cells.

> Fire tiles cost 1 point to move through, but they should avoid pathing through them even if it means taking a longer path to their destination (provided the path is still within their limited movement range)

Re: Testing GPT 4's code-writing capabilities with some real world problems

#20
This is one of the best analyses of gpt4 Ive read so far. Besides potentially including the visual aspect, I wonder if part of the reason it has trouble with harder problems is that it’s been tuned/prompted in a suboptimal way. The advertised used case mostly is “write down the solution for this problem”, but for novel problems it does much better when it’s given the chance to reason through it before trying to write down a solution. I wonder how much better it would do with a prompt like “try to work out a way to solve this problem, and then validate it to be sure if it’s a correct solution.”
Post reply on HN