The problem: one LLM call isn't enough
I built an AI tool that turns natural language into editable diagrams. You describe a flow, an LLM generates Mermaid code, and the result renders in real time.
The v1 was a single LLM call: user input → LLM → diagram. After a few days in production, two failure modes kept showing up:
Syntax errors with no recovery. The generated Mermaid code looks correct, but Mermaid throws a Parse error and the user sees a red stack trace. They leave.
Silent semantic drift. The user asks for "a login flow" — the LLM helpfully adds a "send verification code" actor. It doesn't ask. It doesn't tell you it added anything.






