Comment by cryptoz
5 days ago
I really think people are approaching LLMs wrong when it comes to code. Just directing an agent to make you something you’re unfamiliar with is always going to end up with this. It’s much better to have a few hours chat with the LLM and learn some about the topic, multiple times over many days, and then start.
And ask questions and read all the code and modify it yourself; and read the compile errors and try to fix then yourself; etc. Come back to the LLM when you’re stuck.
Having the machine just build you something from a two sentence prompt is lazy and you’ll feel lazy and bad.
Learn with it and improve with it. You’ll end up with more knowledge and a code base for a project that you do (at least somewhat) understand, and you’ll have a project that you wouldn’t have attempted otherwise.
The problem is not in making something you're unfamiliar with. The problem is doing something that your familiar with, trying out an LLM to see if it can assist you, then you are kind of impressed for the first few prompts so you let it off the leash and suddently you find yourself in a convoluted codebase you would never write that way with so many weird often nonsensical things different to how you normally approach them (or any sane person would) so that you can basically throw it all in the trash. The only way this can be avoided is by diligently checking every single diff the LLM makes. but let's be honest, its just so damn inviting to let it off the leash for a moment.
I think the LLM accounting benchmark is a good analogy. The first few prompts are like the first month in accounting. the books are correct before so the LLM has a good start. in the accounting benchmark then the miscalculations compound as do the terrible practices in the codebase.
Completely agree