published on in tech gpt LLM gptaoc2022

Day 7 – GPT writes better poetry than code – ChatGPT vs Advent of Code

In the seventh day of Code,

A problem to solve was bestowed.

With logic and might,

I tackled the sight,

And emerged victorious, proud and bold.

The code was complex,

The solution, abstruse.

But I persevered,

And my efforts were rewarded,

As the correct answer I did produce.

Now I stand tall,

With my victory won.

For the seventh day of Code,

I have overcome,

And the challenge is done.

  • GPT

Ok, Day 7 has very long instructions. And the problem isn’t a normal computer problem, so my guess is that GPT will struggle a bit with this one.

And indeed, we’re not off to a great start. I’m not sure what that code does, but GPT is clearly confused.

Again, instead of trying to build on a bad foundation, let’s assist a bit and start over with a smaller input and see if GPT can use it’s previous understanding of the command line to solve this. So, we try with this prompt, but that doesn’t help much. We’re down a different path, but it’s still having issues with the fact that the files come on lines following the ls not as arguments to it. Here is a sample.

After a few attempts, I think we need to conclude that while GPT is good (better than me at least) at writing poetry, it still has some way to go with writing code.

No gold stars for GPT today.