AIModels.fyi

AIModels.fyi

Share this post

AIModels.fyi
AIModels.fyi
Prompting with unified diffs makes GPT-4 far less lazy

Prompting with unified diffs makes GPT-4 far less lazy

A developer for an open-source paired-programming tool discovered the trick

aimodels-fyi's avatar
aimodels-fyi
Dec 30, 2023
∙ Paid
3

Share this post

AIModels.fyi
AIModels.fyi
Prompting with unified diffs makes GPT-4 far less lazy
1
Share
Prompting with unified diffs makes GPT-4 write much better code
Aider: "Unified diffs make GPT-4 Turbo less lazy"

Artificial intelligence has shown increasing potential to aid software developers, with large language models like GPT-3 and GPT-4 demonstrating an ability to generate and edit code. AI coding assistants could significantly boost programmer productivity.

However, as we all know, these AI systems also exhibit frustrating “lazy coding” behaviors, where instead of writing full code they insert placeholder comments like “...add logic here...” This tendency toward lazy coding makes AI systems fall short of their full potential, especially on more complex coding tasks. The problem is so significant that it is a frequent top Reddit post on subreddits like r/ChatGPT.

ChatGPT skipping code logic.
People hate this failure mode - and by people, I mean me.

In this blog post, we'll take a look at an interesting finding I discovered on a blog for an AI-based paired programming tool called Aider. The creator, Paul Gauthier, found that unified diffs make GPT-4 Turbo less lazy, helping it generate better code and reducing the number of responses that skip over important logic. Let's see what he found and think about how we can take advantage of this finding in our own workflows!

Subscribe or follow me on Twitter for more content like this!

AIModels.fyi is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

Keep reading with a 7-day free trial

Subscribe to AIModels.fyi to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 AIModels.fyi
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share