Live data from Hacker News

My LLM codegen workflow

harper.blog

61–70 of 168 posts

Re: My LLM codegen workflow

#61
I have been using LLM for a long time but these prompts ideas are fantastic; they really opened up a world for me.

Because a lot of the benefits of LLM is bringing ideas or questions I am not thinking of right now, and this really does that. Typically this would happen as I dig through a topic, not before hand. So that's a net benefit.

I also tried it and it worked a charm, the LLM did respect context and the step by step approach, poking holes in my ideas. Amazing work.

I still like writing codes and solving puzzles in my mind so I won't be doing the "execution" part. From there on, I mostly use LLM as auto complete and I'm stuck here or obscure bug solving. Otherwise, I don't get any satisfaction from programming, having learnt nothing.

Re: My LLM codegen workflow

#62
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.…

If you steer it and build a stdlib, you get better outcomes. See https://ghuntley.com/stdlib

> I'm hesitant to give this advice away for free

With all the layoffs in our sector, I wouldn't blame you if you didn't share it, so thank you for sharing.

Re: My LLM codegen workflow

#64
post #35
post #28

Earlier quoted context omitted.

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

In my experience, you often remember and/or discover relationships to other parts of the system during the current development task, by delving into the implementation. These relationships also aren't necessarily explicit in the code you're looking at. For example, they can relate to domain-level invariants or to shared resources, or simply shared patterns and conventions. In general you can't prepare everything that would be relevant up front.

Re: My LLM codegen workflow

#65

I'm a bit confused here, what promt do you use to start Aider and how do you just let Aider run wild so you can play cookie clicker?

Am I overthinking yes | aider

Hahahaa well that might work but I wish you could just say `aider --go-hog-wild`

Re: My LLM codegen workflow

#66

The first part of this, where you told it to ask YOU questions, rather than laboriously building prompts and context yourself was the magic ticket for me. And I doubt I would have stumbled on that sorta inverse logic on my own. Really great write up!

That's one of the key wins with o1-pro's deep research feature. The first thing it tends to do after you send a new prompt is ask you several questions, and they tend to be good ones.

One idea I really like here is asking the model to generate a todo list.

Re: My LLM codegen workflow

#67

Earlier quoted context omitted.

Am I overthinking yes | aider

Hahahaa well that might work but I wish you could just say `aider --go-hog-wild`

fwiw it doesn't/that was a joke. In some cases the LLM will suggest running a command that doesn't terminate (eg npm run dev to run a webserver), so it'd get stuck running that command just waiting for user input.

Re: My LLM codegen workflow

#68

Earlier quoted context omitted.

Hahahaa well that might work but I wish you could just say `aider --go-hog-wild`

fwiw it doesn't/that was a joke. In some cases the LLM will suggest running a command that doesn't terminate (eg npm run dev to run a webserver), so it'd get stuck running that command just waiting for user input.

:( big sad

Re: My LLM codegen workflow

#69
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.…

If you steer it and build a stdlib, you get better outcomes. See https://ghuntley.com/stdlib

I’ve been following this, my workflow doesn’t us cursor (VS Code descendants just aren’t my preference) but I’ve built your advice into my home made system using emacs and gptel. I keep a style guide that is super detailed for each language and project, and now I’ve been building the stdlib you recommended. It’s great, thanks for writing this!

Re: My LLM codegen workflow

#70

The first part of this, where you told it to ask YOU questions, rather than laboriously building prompts and context yourself was the magic ticket for me. And I doubt I would have stumbled on that sorta inverse logic on my own. Really great write up!

I add something like “ask me any clarifying questions” to my my initial prompts. For larger requests, it seems to start a dialogue of refinement before providing solutions.
Post reply on HN