This looks really interesting. I recently did something similar to this at <a href="https://prlang.com" rel="nofollow">https://prlang.com</a>. Although my DSL is much simpler, and mostly focused on chaining multiple prompts together and handling their results, like a declarative langchain.<p>LMQL seems to allow for fine grained control of prompts as the results are generated. The constraint system is super interesting. I'm going to have to read the paper, I'm interested in how they're achieving token costs savings with a system that looks like it should increase it.