正在加载视频...
视频加载失败
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 次观看 • 2 年前 •via X (Twitter)
10 条评论

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)

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

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

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)

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

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

it back baby

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

oh thats interesting

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
