https://www.boundaryml.com logo
🟑 Inquiring about structured output in BAML
# questions
u
Is there documentation, blog, or youtube about using structured output in BAML? What I see is the LLM is outputing things like
Copy code
json
...
in some instances, and I am wanting to understand specifics around using the LLM service providers' structured output checking.
g
The LLM responds with just ellipsis? β€œβ€¦β€?
We don’t support vendor-provided structured outputs today, like JSON mode, etc. One of our main theses is that models can produce valid structured data without resorting to the vendors format, if you use our prompting techniques, and in fact the output quality increases when you prompt through BAML, compared to using the vendors structured output API.
That said, people have wanted this feature and it’s on our roadmap. But there’s no good way to do it today.
Can you share some BAML code that produces just β€œβ€¦β€?
u
For the ..., I just removed the content. The return was from the initial example:
Copy code
json
{
  "name": "Vaibhav Gupta",
  "email": "vbv@boundaryml.com",
  "experience": [
    "Founder at BoundaryML",
    "CV Engineer at Google",
    "CV Engineer at Microsoft"
  ],
  "skills": [
    "Rust",
    "C++"
  ]
}
v
Might be easier to hop on office hours?
u
The "vendor-provided structured outputs" are of considerably different quality depending on the vendor.
v
fyi, you're muted!
do you want to try this link instead?