logoalt Hacker News

voxleoneyesterday at 2:08 PM1 replyview on HN

One thing I think the “LLM as new high-level language” framing misses is the role of structure and discipline. LLMs are great at filling in patterns, but they struggle with ambiguity, the exact thing we tolerate in human languages.

A practical way to get better results is to stop prompting with prose and start providing explicit models of what we want. In that sense, UML-like notations can act as a bridge between human intent and machine output. Instead of:

“Write a function to do X…”

we give:

“Here’s a class diagram + state machine; generate safe C/C++/Rust code that implements it.”

UML is already a formal, standardized DSL for software structure. LLMs have no trouble consuming textual forms (PlantUML, Mermaid, etc.) and generating disciplined code from them. The value isn’t diagrams for humans but constraining the model’s degrees of freedom.


Replies

FuckButtonsyesterday at 5:07 PM

Have you tried this? How did it go?