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
JSON error correction
LLM yapping immunity
Schema coercion
BAML fixes broken JSON like trailing commas, unquoted keys, unescaped quotes, new lines, and even fractions.
analyze-repo.baml
llm yapping
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 all other models and techniques, including OpenAI's new strict structured outputs

.42%
Overall Score (Sonnet3.5)
+
.17%
Gain for GPT35
Berkeley Function-Calling Benchmark (Overall 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.