B

Boundary Blog

boundaryml.com · Company blog · on HN since 2024

Blog of Boundary, makers of BAML, a language for getting structured output from LLMs, with posts on prompts and parsing.

What HN saysCommenters say they use BAML in production and find it great for structured outputs; the team explains its schema-aligned parsing approach.
21HN people shared it
12linked it in comments
21stories submitted
370story points
3 months agolast shared
2024people per year2026

Most-shared posts

  1. 1
    BAML is Basically A Made-up Language
    9 people · 3 points · first shared 2024 · discussion on HN
  2. 2
    Every Way to Get Structured Output from LLMs
    3 people · 173 points · first shared 2024 · 83 comments on HN
  3. 3
  4. 4
    Prompts are using 4x more tokens than you need
    3 people · 10 points · first shared 2024 · 2 comments on HN
  5. 5
    Structured outputs create false confidence
    2 people · 138 points · first shared 2025 · 61 comments on HN
  6. 6
    Show HN: Structured Outputs with Deepseek R1
    2 people · 9 points · first shared 2025 · 2 comments on HN
  7. 7
    How to write a Zed extension for a made up language
    1 people · 8 points · first shared 2025 · discussion on HN
  8. 8
    Semantic Streaming of LLM Outputs
    1 people · 3 points · first shared 2024 · discussion on HN
  9. 9
    Using UUIDs in prompts is bad
    1 people · 3 points · first shared 2025 · discussion on HN
  10. 10
    Lambda the Ultimate AI Agent
    1 people · 3 points · first shared 2025 · discussion on HN
  11. 11
    AI Agents Need a New Syntax
    1 people · 2 points · first shared 2025 · discussion on HN
  12. 12
    5 Years, 12 Pivots
    1 people · 2 points · first shared 2025 · discussion on HN
  13. 13
    Building a new programming language in 2024, pt. 1
    1 people · 2 points · first shared 2024 · discussion on HN
  14. 14
    A Cautionary Tale on Vibes
    1 people · 1 points · first shared 2025 · 1 comments on HN
  15. 15
    Building RAG in Ruby, using BAML, with streaming
    1 people · 1 points · first shared 2024 · discussion on HN

What HN people wrote when they linked it

farhankhan3 · 2026-01-17
BAML (https://boundaryml.com/) is really great for handling structured outputs. It's what we use at my company.
gabev · 2024-06-27
Hey, this is Gabe from zenfetch. Been following you guys for a few months now since your first launch. I definitely resonate with all the problems you've described regarding celery shortcomings / other distributed task queues. We're on celery right now and have been through the ringer with various workflow platforms. Only reason we haven't switched to Hatchet is because we are finally in a stable place, though that might change soon in which case I'd be very open to jumping ship. I know a lot of folks are going after the AI agent workflow orchestration platform, do you see yourselves progressing there? In my head, Hatchet coupled with BAML (https://www.boundaryml.com/) could be an incredible combination to support these AI agents. Congrats on the launch
jumploops · 2026-04-29
I have anecdotal experience here, but I've found more success when solving the task first, and then returning it as JSON in a separate LLM call[0]. Running a single non-reasoning LLM call from source data (text/image/audio in your diagram) to structured JSON seems fragile with the current state of LLMs. You're essentially asking the model to do two tasks in one pass: parse the input and then format the output. It's amazing it works a lot of the time, but reasonable to assume it won't all of the time. (As a human, when I'm filling out a complex form, I'll often jump around the document) Curious how the benchmarks change when you add an intermediary representation, either via reasoning or an additional LLM call. I'd also love to see a comparison with BAML[1]. [0]In my experience we were using structured outputs as part of an agentic state machine, where the JSON contained code snippets (html/js/py/etc.). In the cases where we first prompted the model for the code, and then wrapped it in JSON, we saw much higher quality/success than asking for JSON straightaway. [1]https://boundaryml.com/
AIorNot · 2026-03-23
I kind of like BAML https://boundaryml.com/ been using it in production Edit, read the article -its really good- that cycle of AI engineering progression is spot on -read the article too!
joatmon-snoo · 2025-09-23
We’ve had a lot of success implementing schema-aligned parsing in BAML, a DSL that we’ve built to simplify this problem. We actually don’t like constrained generation as approach - among other issues it limits your ability to use reasoning - and instead the technique we’re using is algorithm-driven error-tolerant output parsing. https://boundaryml.com/
reedlaw · 2025-06-26
The use case in the article is relatively simple. For more complex structures, BAML (https://www.boundaryml.com/) is a better option.
agtech_andy · 2024-08-06
I have had a lot of success using BoundaryML (https://www.boundaryml.com/) for this. They have also been super responsive for any of my questions.
SteveMorin · 2025-11-04
https://boundaryml.com/ LLM to types and done
hellovai · 2025-09-23
Have you tried techniques that don’t require modifying the LLM and the sampling strategy for structure outputs? For example, schema aligned passing, where you build error tolerance into the parser instead of coercing to a grammar. https://boundaryml.com/blog/schema-aligned-parsing
surfingdino · 2025-06-19
Meanwhile https://dev.to/rishabdugar/crafting-structured-json-responses-ensuring… and https://www.boundaryml.com/blog/structured-output-from-llms You are confusing API response payloads with Structured JSON that we expect to conform to the given Schema. It's carnage that requires defensive coding. Neither OpenAI nor Google are interested in fixing this, because some developers decide to retry until they get valid structured output which means they spend 3x-5x on the calls to the API.
aaronvg · 2025-06-01
You might also find Semantic Streaming interesting. It's t he same concept but applied to llm token streaming. It's used in BAML (the ai framework). https://www.boundaryml.com/blog/semantic-streaming I'm one of the developers of BAML.
resiros · 2024-06-18
I expected to read about the methods used by the libraries to get the structured output and not a comparison of the language compatibility for each. Fortunately the same author have a blog post (https://www.boundaryml.com/blog/type-definition-prompting-baml) explaining how their approach works and how it compares to instructor (https://github.com/jxnl/instructor). Basically these libraries provide two things: 1. A way to prompt the LLM 2. A way to get a valid JSON For 1. instructor does it through the json schema definition, BAML's innovation is that they use a simplified lossless schema definition that uses less tokens. For 2. instructor does it through reprompting until they receive a valid JSON. BAML's innovation is a fuzzy parser able to to parse non-perfect JSON. Personally I think that there is no need to all these abstractions to get structured outputs from LLMs. A simple .to_prompt() function that takes a pydantic and translate it into some prompt block you can add to your prompt and a retry is sufficient to get the same results.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close