https://www.boundaryml.com logo
Structured output support
# help
d
Hi! Quick question, does BAML support structured output? Many models now have this parameters available in the API and might prevent
BamlValidationError
from happening all together. Wondering if this is something already supported (I couldn't find it in the docs) or if the dev team plans to implement or not. Thank you!
v
hi @dlmgary ! we've started thinking about it and some some specs put together here. But the reason we don't want to require this yet is because even if we do this, just because the model generates the correct structure doesn't actually mean it's answering the question accurately. For example: Imagine that you're an HR company who processes resumes and you expect a resume data type coming out of it, but then the user makes a mistake and uploads a receipt. If you require the structured output, the receipt will actually turn into a resume-type, even though that's completely incorrect. This can get magnified the more complex your structured output grammar is. That said, as Baml devs, we actually believe that you should be able to choose which tradeoffs you make. So we will be supporting this hopefully very, very soon.
d
Hi @Vaibhav (BAML 🐑) ! I appreciate the response—that makes sense. Do you have an idea when this feature might be released? 😄