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

So, so much this.

Structured outputs are the most underappreciated LLM feature. If you're building anything except a chatbot, it's definitely worth familiarizing yourself without them.

They're not too easy to use well, and there aren't that much resources on the internet explaining how to get the most out of them you can.





In Python, they're very easy to use. Define your schema with Pydantic and pass the class to your client calls. There are some details to know (eg field order can affect performance), but it's very easy overall. Other languages probably have something similar.



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

Search: