Hacker News new | ask | show | jobs
by Havoc 884 days ago
>Constrained grammars do look like an possible alternative.

I'd suggest combining this with a something like nexusraven. i.e. both constrain it but also have an underlying model fine tuned to output in the required format. That'll improve results and let you use a much smaller model.

Another option is to use two LLMs. One to sus out the users natural lang intent and one to paraphrase the intent into something API friendly. The first model would be more suited to a big generic one, while second would be constrained & HA fine tuned.

Also have a look at project functionary on github - haven't tested it but looks similar.