News for hackers. Stuff that matters.
Re:Type-constrained code generation with language models by notnullorvoid on Tuesday May 13, 2025 @08:12PM (#43979332)
The general idea seems very promising, I had been hoping someone would do something like this since seeing JSON schema structured outputs for LLMs.

Need to dig in a bit more on the implementation, but I was surprised that the paper didn't mention hooking into existing language service/server. There's more than types that an LLM could leverage from existing language tooling. Auto imports is a good example, it is handy for the human developer to keep a linear writing flow, something a LLM needs even more.

Re:Type-constrained code generation with language models by nielstron on Wednesday May 14, 2025 @02:11AM (#43981374)
the problem with LSPs is that they don't guarantee generating a type annotation that we can use for constraints, i.e. we can not ensure the prefix property using LSPs. so we had to roll our own :)

Pulling in more features to help the system is definitely worth looking into!