News for hackers. Stuff that matters.
Re:Show HN: LLMs can generate valid JSON 100% of the time by spott on Monday August 14, 2023 @04:32PM (#37126442)
Regex-guided gen is slick… is it arbitrary? Or are you custom building it for json?

If arbitrary, how are you pre-defining a set of masks? I would expect that splitting an arbitrary regex into a bunch of contexts for a masking dictionary to be non-trivial.

Re:Show HN: LLMs can generate valid JSON 100% of the time by remilouf on Tuesday August 15, 2023 @10:46AM (#37134638)
Regex-Gen is implemented in all generality in the library (minus some constructs that we still have to add). JSON is merely an application.

You can read https://blog.normalcomputing.ai/posts/2023-07-27-regex-guide... for a more detailed explanation of how it works. Should answer your question :)