Live data from Hacker News

My LLM codegen workflow

harper.blog

31–40 of 168 posts

Re: My LLM codegen workflow

#31
post #16

I’m curious, is adding “do not hallucinate” to prompts effective in preventing hallucinations? The author does this.

Apple were using that in their Apple Intelligence system prompts last year, I don't know if they still have that in there. https://simonwillison.net/2024/Aug/6/apple-intelligence-prom...

I have no idea if it works or not!

Re: My LLM codegen workflow

#32

Something I quickly learned while retooling this past week is that it’s preferable not to add opinionated frameworks to the project as they increase the size of the context the model should be aware of. This context will also not likely be available in the training data. For example, rather than using Plasmo for its browser extension boilerplate and packaging utilities, I’ve chosen to ask the LLM to setup all of that…

The end of artisan frameworks - probably for the better.

Re: My LLM codegen workflow

#33
post #15

Has anyone who evolved from a baseline of just using Cursor chat and freestyling to a proper workflow like this got any anecdata to share on noticeable improvements? Does the time invested into the planning benefit you? Have you noticed less hallucinations? Have you saved time overall? I’d be curious to hear because my current workflow is basically 1. Have idea 2. create-next-app + ShadCN + TailwindUI boilerplate 3.…

I'm wondering the same thing.

Most of these workflows are just context management workflows and in Cursor it's so simple to manage the context.

For large files I just highlight the code and cmd+L. For short files, I just add them all by using /+downarrow

I constantly feed context like this and then usually come to a good solution for both legacy and greenfield features/products.

If I don't come to a good solution it's almost always because I didn't think through my prompt well enough and/or I didn't provide the correct context.

Re: My LLM codegen workflow

#34
post #32

Something I quickly learned while retooling this past week is that it’s preferable not to add opinionated frameworks to the project as they increase the size of the context the model should be aware of. This context will also not likely be available in the training data. For example, rather than using Plasmo for its browser extension boilerplate and packaging utilities, I’ve chosen to ask the LLM to setup all of that…

The end of artisan frameworks - probably for the better.

It's likely the end of a lot of abstractions that made programming easier.

At some point, specialized code-gen transformer models should get really good at just spitting out the lowest level code required to perform the job.

Re: My LLM codegen workflow

#35
post #28

Earlier quoted context omitted.

Well, do you as a human have the whole codebase loaded in to your memory with the ability to mentally reason with it? No, you work on a small scope at a time.

You may work in a limited scope at a time, but you are aware how it fits into the larger scope, and more often than not you actually have to connect things across different scopes.

Well you can use an LLM similarly. Have it write docs for all your files including a summary for each function / class, ideally in order of dependency. Then use only the summaries in context. This should significantly lower your token count.

Haven't tried it personally but it should work

Re: My LLM codegen workflow

#36
post #5
post #3

Nice, I coincidentally wrote a blog post today exploring workflows as well: https://ggulati.wordpress.com/2025/02/17/cursorai-for-fronte... Your workflow is much more polished, will definitely try it out for my next project

let me know how it works!

Looks like your blog crashed, I've been wanting to read it

Re: My LLM codegen workflow

#38
post #28

Earlier quoted context omitted.

Well, do you as a human have the whole codebase loaded in to your memory with the ability to mentally reason with it? No, you work on a small scope at a time.

You may work in a limited scope at a time, but you are aware how it fits into the larger scope, and more often than not you actually have to connect things across different scopes.

you do the same thing with the llm, you have it describe the api of modules not related to your code and that in place of those segments of the code.

Re: My LLM codegen workflow

#39
post #14

I think LLM codegen still requires a mental model of the problem domain. I wonder how many upcoming devs will simply never develop one. Calculators are tools for engineers /and/ way too many people can't even do basic receipt math.

Calculations are for calculators. I was good at math in school but now I struggle / take so much time doing receipt math and for what? What's the purpose of the time you spend doing it, when do you need to have your brain trained for this specific task?

Re: My LLM codegen workflow

#40
This is effing great...thanks for sharing your experience.

I was just wondering how to give my edits back to in-browser tools like Claude or ChatGPT, but the idea of repo mix is great, will try!

Although I have been flying bit with copilot in vscode, so right now I have essentially two AI, one for larger changes (in the browser), and then minor code fixes (in vscode).

Post reply on HN