Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: LLMs following grammar for general-purpose PLs (github.com/uiuc-focal-lab)
11 points by sugare 22 days ago | hide | past | favorite | 3 comments



SynCode is efficient (<10% overhead) and provably sound in generating syntactical LLM output for any LR(1) grammar. Currently supports built-in grammars for Python, Go, Java, JSON, SQL, first-order logic, and support for many grammars is WIP.

We have added some interesting notebooks with miscellaneous grammars here: https://github.com/uiuc-focal-lab/syncode/tree/main/notebook...

The arXiv version of the paper is available here: https://arxiv.org/abs/2403.01632


It would be interesting if these constraints could be extended to give even more guarantees, like type safety. Such constraints probably need some kind of backtracking.


Yeah, thinking about these follow-ups next




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: