make any llm speak your dsl
dsl·ai makes an LLM reliably produce your custom DSL. Give it your language's grammar (the same EBNF/GBNF-style rules you'd write for a parser) and dsl·ai compiles it into a decoding constraint. generated output is syntactically valid by construction, not just if you're lucky.
before & after
an llm that breaks your dsl's syntax
beforeprompt-and-pray, then parse failures on invalid output
aftergrammar-constrained decoding: output is valid by construction
making a model learn your language
beforefine-tune on a dataset, rent a gpu
afterpaste your grammar: no training set, no gpu, in the browser
knowing why input is invalid
beforea cryptic failure with no position
aftera deterministic validator points to the exact spot and what it expected
a look inside
a few of the screens you'll actually use.
- grammar-constrained output
- deterministic validation
- free · no account
a real generated parser returns valid/invalid plus the exact position — a compiler error, not a confidence score.
one grammar, playground to production
the guarantee follows your grammar from the browser to a hosted open model.
dsl·ai guides
Ways to use dsl·ai, and how it compares.
- comparisonConstrained decoding vs fine-tuning: the right way to get valid DSL out of an LLMConstrained decoding vs fine-tuning: dsl·ai makes invalid DSL impossible by constraining the grammar — beating fine-tuning on cost, speed, and correctness.
- how toHow to make an LLM output valid DSL every time (without fine-tuning)Valid DSL from an LLM is a grammar problem, not a prompting problem. dsl·ai turns your grammar into a decoding constraint and a deterministic validator.
- use caseValidate your DSL in CI: reject malformed config in a pull requestValidate DSL in CI: dsl·ai generates a deterministic validator from your grammar, so invalid DSL fails the pull request with a precise, reproducible error.
- use caseFine-tuning an LLM on your DSL: when it's worth it, and when it isn'tFine-tune an LLM on your DSL? Usually the wrong first move. When fine-tuning genuinely helps, and the cheaper wedge — dsl·ai — to try before it.
- use caseStructured LLM output for your own language — guaranteed, not hoped forStructured LLM output for a custom language: dsl·ai constrains generation to your grammar — valid by construction, deterministically validated.
- comparisonJSON schema vs grammar-constrained decoding: when JSON mode isn't enough for your languageJSON schema vs grammar-constrained output: schemas stop at JSON shapes; a full grammar covers any language. Where dsl·ai's grammar constraints take over.