How we made v0 an effective coding agent

(vercel.com)

27 points | by MaxLeiter 4 days ago ago

11 comments

  • ramon156 a day ago ago

    Depends what you consider an "effective coding agent"

  • pxheller a day ago ago

    I feel like using sequential transformers generating code feels like a brute-force solution for UI generation.

    The "obvious" path forward for frontend assistants is to move away from raw code generation toward some domain-specific language. UI is inherently structural - it should be expressed through component hierarchies that implement pre-defined design guidelines (with colors, margins, border radius etc being defined outside of the core model, and applied as a kind of theme to the model's output).

    If we define the UI as a composition of VStacks/HStacks and predefined components, we can use diffusion models to generate the layout, and consistently apply the 'theme' afterwards. It's a much cleaner abstraction than asking an LLM to hallucinate valid CSS classes.

  • themafia a day ago ago

    > A simple example is substituting long strings the LLM often refers to. For example, when a user uploads an attachment, we give v0 a blob storage URL. That URL can be very long (hundreds of characters), which can cost 10s of tokens and impact performance.

    > Before we invoke the LLM, we replace the long URLs with shorter versions that get transformed into the proper URL after the LLM finishes its response.

    So, instead of fixing your blob URLs, you effectively run a regex to search and replace on the prompt before you feed it to the LLM? That does not seem like high quality engineering.

    > In addition to text injection, we worked with the AI SDK team to provide examples in the v0 agent’s read-only filesystem. These are hand-curated directories with code samples designed for LLM consumption. When v0 decides to use the SDK, it can search these directories for relevant patterns such as image generation, routing, or integrating web search tools.

    Curated or created? If you "curated" them what is the copyright license on those examples? Are they just copied into the project?

    Remember when programming was about creating useful libraries of code? Now it's about sequestering them inside of an LLM and then charging insane amounts of money to convince a machine to sometimes copy them into your code for you.

    Just.. wow... what are we even doing? Prepare for a very fragile future.

    • Aurornis a day ago ago

      > Curated or created? If you "curated" them what is the copyright license on those examples?

      Given that they’re talking about their own SDK that they created in this article, the examples are probably from their own docs and engineers.

      > Are they just copied into the project?

      No, v0 doesn't copy and paste snippets into projects. LLM coding tools don't work like that.

      Providing example code or patterns for LLMs to follow is a very effective technique. They don't copy and paste or clone the code. They're good at identifying patterns, especially when you give them hints. What they did is not new or novel, it's just a well-known and effective technique for accomplishing various things with LLMs. Providing similar or generic examples goes a long way.

      • aziaziazi a day ago ago

        > They don't copy and paste or clone the code

        That’s not how I understand his post, instead "read-only filesystem" seems to reference the LLM working directory and not it’s outpost directory. He’s asking what’s the licences of the code sample which is fair.

        It’s forbidden for Toyota to use a process protected by BID even if they only sell the result of that process (the car) and not the process itself.

        I might have misunderstood the original article or themafia message though.

        • Aurornis a day ago ago

          The article is about their AI SDK. So this isn’t taking from someone else and using it as an example. They literally wrote the SDK, the docs for it, and the examples.

      • MaxLeiter a day ago ago

        v0 actually can directly copy files out of its examples and then apply edits. This saves it from having to write out the long examples verbatim. The rest of your comment is accurate

    • roncesvalles a day ago ago

      Although your criticisms are totally contrived, if it makes you feel better, nobody considers this real programming. Things like v0 are just an evolution on the no-code front, which has some utility but will always remain a niche without possibility of serious scale.

    • mikert89 a day ago ago

      [flagged]

  • atonse a day ago ago

    Whatever their secret sauce is (model, system prompt, or harness), v0 creates some of the most beautiful designs and mockups when I ask it to. And it looks really polished.

    Even better than anything I’ve seen from Claude Code.

    So I use it a lot for inspiration for screens and even have used it for proposals.

  • llmslave3 a day ago ago

    Doesn't everyone use OpenCode or Claude Code these days? I haven't heard about V0 in a long time.