Looks interesting! How would you say it compares to Microsoft's TypeChat (beyond the obvious Python/TypeScript difference)?
https://microsoft.github.io/TypeChat/blog/introducing-typech...
Thanks for bringing this library to my attention! From my understanding, TypeChat proceeds by (1) generating (2) attempting validation (3) if it fails, call the LLM again to fix the output (4) etc.
Our method on the other guarantees that the output will follow the specs of the JSON schema. No need to call the LLM several times.
There's also https://lmql.ai/
LQML (and guidance https://github.com/guidance-ai/guidance) are much more inefficient. They loop over the entire vocabulary at each step, we only do it once at initialization.