Loading video...

Video Failed to Load

Go Home

i'm a little sick of chatgpt giving me obviously broken code i've found a "micro agent" approach to LLM code generation can work much better the LLM first generates a *test*, and then enters a loop where it generates and iterates on the code until the tests pass source below

544,171 views • 2 years ago •via X (Twitter)

10 Comments

Steve (Builder.io)'s profile picture
Steve (Builder.io)2 years ago

would love your feedback i find this more useful than just asking chatgpt for code and having to discover myself where its broken, and go back to chatgpt manually on a loop its customizable to your specific test criteria (vitest, jest, lint, tsc, etc)

Steve (Builder.io)'s profile picture
Steve (Builder.io)2 years ago

we've found this approach to be valuable for all kinds of use cases - giving an LLM clear acceptance criteria and having it iterate with feedback until the criteria is met we're using this technique for visual matching to more perfectly match your designs and coding style

Steve (Builder.io)'s profile picture
Steve (Builder.io)2 years ago

in my experience LLMs are way more reliable at writing tests in one shot than code and this can solve the biggest problems with LLM agents - derailing without recovery having clear test criteria can help get the agent back on track this, in our exp, makes all the difference

Steve (Builder.io)'s profile picture
Steve (Builder.io)2 years ago

we're also working on a closer integration with visual copilot so you can end to end convert figma designs to code with extreme accuracy to the design and the style of how you code (using your components, design tokens, stylistic preferences, etc)

Steve (Builder.io)'s profile picture
Steve (Builder.io)2 years ago

this is all part of our visual copilot team and project to make your design <-> code flows way more seamless

Günther Brunner's profile picture
Günther Brunner2 years ago

Does this means that TDD finally might have its golden age?

Steve (Builder.io)'s profile picture
Steve (Builder.io)2 years ago

it back baby

Gordon Wintrob's profile picture
Gordon Wintrob2 years ago

Wow, this is super cool. I wonder if you could make it run in the background before doing an autocomplete in VSCode.

Steve (Builder.io)'s profile picture
Steve (Builder.io)2 years ago

oh thats interesting

Saulo Vallory's profile picture
Saulo Vallory2 years ago

Planning before acting is what makes the difference. Creating a test isn't exactly planning, but it includes one crucial part of it: restricting the how and defining what done means. Check this ChatGPT convo. I asked it to set up an entire project for me

Related Videos