BAML is an expressive language for structured text generation

$ pip install baml-py
Backed by
YC Logo
Trusted by developers at
Aer Compliance
PMMI
AI Tinkerers
Cerebral Valley
Haven AI
Vetrec
Zenfetch
Forget JSON.parse(). BAML's parser was built for LLMs
LLM yapping immunity
JSON error correction
Schema coercion
BAML automatically finds your schema amongst any other additional generated text. Use techniques like chain-of-thought with ease no matter how complex your schema is.
LLM output
llm yapping
BAML
Parsed Response
llm yapping
Function-calling for every model, in your favorite language
All models get better with BAML

BAML achieves state-of-the-art results in function-calling with GPT 3.5 over nearly all other models and frameworks.

.4%
AST Score
+
.9%
Gain for GPT4o
Berkeley Function-Calling Benchmark (AST Score)

Learn more about the BFCL Benchmark

BAML was designed for easier, more reliable prompting
Syntax that transforms prompt engineering to coding.
file_name.baml
Developers love building with BAML
BAML is amazing. I've used it in Python and Typescript. It's a game changer.
Adam Gitzes

Just set up baml for my project, 10/10 experience and much faster than langchain.
Jason Fan

Finic.ai

It's amazing!! Was able to cut down my tokens and time-to-first-token significantly without compromising results.
Ray del Vecchio

Cerebral Valley

BAML is definitely a must have if you want any structured data from LLM; no more BS/long paragraphs describing what the output should be like, it just works!!!
Hankel Bao

Coldreach.ai

BAML is amazing. I've used it in Python and Typescript. It's a game changer.
Adam Gitzes

Just set up baml for my project, 10/10 experience and much faster than langchain.
Jason Fan

Finic.ai

It's amazing!! Was able to cut down my tokens and time-to-first-token significantly without compromising results.
Ray del Vecchio

Cerebral Valley

BAML is definitely a must have if you want any structured data from LLM; no more BS/long paragraphs describing what the output should be like, it just works!!!
Hankel Bao

Coldreach.ai

BAML is amazing. I've used it in Python and Typescript. It's a game changer.
Adam Gitzes

Just set up baml for my project, 10/10 experience and much faster than langchain.
Jason Fan

Finic.ai

It's amazing!! Was able to cut down my tokens and time-to-first-token significantly without compromising results.
Ray del Vecchio

Cerebral Valley

BAML is definitely a must have if you want any structured data from LLM; no more BS/long paragraphs describing what the output should be like, it just works!!!
Hankel Bao

Coldreach.ai

BAML is amazing. I've used it in Python and Typescript. It's a game changer.
Adam Gitzes

Just set up baml for my project, 10/10 experience and much faster than langchain.
Jason Fan

Finic.ai

It's amazing!! Was able to cut down my tokens and time-to-first-token significantly without compromising results.
Ray del Vecchio

Cerebral Valley

BAML is definitely a must have if you want any structured data from LLM; no more BS/long paragraphs describing what the output should be like, it just works!!!
Hankel Bao

Coldreach.ai

The test case and playground is quite literally the BEST feature. It has improved the iteration speed and quality by an order of magnitude.
Joseph Tutera

Docucare AI

I really really like what Baml offers [...] I think it's a step-wise improvement over Marvin. Having complete control over the prompt WITH strong type guarantees is fantastic.
I also think the dedicated testing playground is awesome.
Gabe

Zenfetch

Code is hella clean now. Look at [the] folder structure, and each folder for a respective pipeline. Each file just a prompt. Clean, elegant, beautiful.
Paulo Rossi

Magnaplay

Just got the categorizer to work first try.
Felt like landing a kickflip
Eitan Borgnia

Squack

The test case and playground is quite literally the BEST feature. It has improved the iteration speed and quality by an order of magnitude.
Joseph Tutera

Docucare AI

I really really like what Baml offers [...] I think it's a step-wise improvement over Marvin. Having complete control over the prompt WITH strong type guarantees is fantastic.
I also think the dedicated testing playground is awesome.
Gabe

Zenfetch

Code is hella clean now. Look at [the] folder structure, and each folder for a respective pipeline. Each file just a prompt. Clean, elegant, beautiful.
Paulo Rossi

Magnaplay

Just got the categorizer to work first try.
Felt like landing a kickflip
Eitan Borgnia

Squack

The test case and playground is quite literally the BEST feature. It has improved the iteration speed and quality by an order of magnitude.
Joseph Tutera

Docucare AI

I really really like what Baml offers [...] I think it's a step-wise improvement over Marvin. Having complete control over the prompt WITH strong type guarantees is fantastic.
I also think the dedicated testing playground is awesome.
Gabe

Zenfetch

Code is hella clean now. Look at [the] folder structure, and each folder for a respective pipeline. Each file just a prompt. Clean, elegant, beautiful.
Paulo Rossi

Magnaplay

Just got the categorizer to work first try.
Felt like landing a kickflip
Eitan Borgnia

Squack

The test case and playground is quite literally the BEST feature. It has improved the iteration speed and quality by an order of magnitude.
Joseph Tutera

Docucare AI

I really really like what Baml offers [...] I think it's a step-wise improvement over Marvin. Having complete control over the prompt WITH strong type guarantees is fantastic.
I also think the dedicated testing playground is awesome.
Gabe

Zenfetch

Code is hella clean now. Look at [the] folder structure, and each folder for a respective pipeline. Each file just a prompt. Clean, elegant, beautiful.
Paulo Rossi

Magnaplay

Just got the categorizer to work first try.
Felt like landing a kickflip
Eitan Borgnia

Squack

Get high quality results

Talk to one of our AI Experts

We have seen hundreds of prompts and AI pipelines. Talk to a founder to learn more about our roadmap, our enterprise support and observability platform, or join our community to see what others are up to.