Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've had a notion that LLMs can read Typescript types much better, than JSON schema types.

So, I've been tinkering around with a library that can generate schemas for structured JSON outputs, according to a Typescript-like custom schema definition: https://github.com/nadeesha/structlm

So far, I've been seeing promising results with accuracy on-par or better, but using 20-40% less tokens than JSON schemas.



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

Search: