Claude 3.7 has clearly been specially trained to be good at generating React code and SVGs.

· Bits and Bobs 3/10/25
  • Claude 3.7 has clearly been specially trained to be good at generating React code and SVGs.
    • They are almost certainly using RLAIF to post-train the model to be significantly better in those domains.
    • It probably looks something like this:
      • Generate React code to accomplish the user's request for a simple UI.
      • Then execute the code and poke at it with Playwright to get screenshots of it, and see how it responds to simulated user actions.
      • Ask an LLM to judge the quality of the result.
        • Does this look like what the user asked for?
        • Does it appear to work as a user would expect?
    • This gives an ability to get better and better at it by throwing a lot of compute at the problem.
    • Note that this only really works for React code (vs general programming) because frontend code is not algorithmically complex, but rather tedious.
    • LLMs do great at writing tedious code; they struggle with novel algorithmically hard code.
      • Put another way, LLMs can use React well, but it would struggle to write React itself.

More on this topic

From other episodes