https://www.boundaryml.com logo
Nice talk at dotconference, @Vaibhav (
# general
c
Nice talk at dotconference, @Vaibhav (BAML ๐Ÿ‘) . Your thoughts on best way to use BAML and DSPy together?
v
give us 1 week! we're releasing something very soon! Here's a preview: https://dj7ggjkp4tlhz.cloudfront.net/greg-bep-5/proposals/BEP-005-prompt-optimization/

https://youtu.be/9b0yPIfDd08โ–พ

@rjurney
r
PLEASE GEPA ๐Ÿ˜„ I love the Ruby on Rails usability if BAML and do not want to switch to DSPy.
I need to get my LLM cheaper than Gemini 2.0 Flash for networks with 1B+ nodes.
It might cost $5K to do a full ER run there atm.
Could ne expensive, could be cheap, depending on whoโ€™s data and what itโ€™s for but cheaper means more potential customers ๐Ÿ™‚
p
Exciting news, and great to see BAML getting GEPA!
For anybody else that sees this, having used both extensively in 2025, I don't see BAML and DSPy being used together - they are both different ways of doing the same things. DSPy: first and foremost, a research project at the cutting edge of innovation in how we interface with LLMs BAML: Developer-first, aimed at production use cases. So I hope in the coming months we can all put out enough examples and content to educate folks about this difference.
Users would pick either DSPy or BAML, depending on their bent of mind ๐Ÿ™‚
I actually don't think the subsets of users even overlap that much, so there's plenty of room for both to innovate along their own dimensions in the coming years ๐Ÿ’ช๐Ÿป
d
We just built a GEPA prompt optimizer in our BAML pipelines!
s
The ending ๐Ÿ˜†
u
couldn't DSPy be used for providing optimized self-hosted base-models which can be called with BAML ? GEPA implementation in BAML is interesting, curious to hear more
p
Using both in a single code base will lead to needless code complexity. BAML will eventually do a lot more over time, and its functionality will even more strongly overlap with DSPy's. It's up to the user base of both tools what they prefer using over time. DSPy won't be sitting idly by, either! It's actively being rewritten in other languages and the Rust version (DSRs) looks very promising too. Very exciting time to be following both BAML and DSPy communities imo. We are lucky to have them both ๐Ÿ’ช๐Ÿฝ
My biggest reason why DSPy and BAML cannot be used together is that signatures (the core unit of abstraction in DSPy) are a like-for-like replacement to functions in BAML. They both expose type systems to the user, and they both involve a certain degree of declarative specification. With such a fundamental overlap in a core user-facing abstraction, there's really no sense in combining them both in a single code base.
u
gotcha , with this context in mind it seems that DSpy and Baml are overlapping yet on opposite sides from the model interaction: DSpy becomes the, customized & optimized Agent API, that you directly call that includes structured output (is that correct?) while Baml can fit onto any existing model API. Maybe my mental model is outdated since I haven't coded directly with DSpy in some months. What would the integration of GEPA into Baml mean for Baml's abilities: would it allow for fine-tuning prompt instructions like DSpy ?
p
Yes, the incoming GEPA in BAML can optimize instructions, descriptions and aliases all in BAML, without needing anything external
Whether it actually follows the published GEPA algorithm exactly, is unclear. But I suppose we'll learn more once folks look into its internals (whatever is publicly available)
r
Now that you got GEPA, let them remain separate. We were just worried for yโ€™all.
v
we're excited, and the best part is its quite configurable!
will go out in next release (either tonight or tmrw!)
r
Nice!
Now Iโ€™m wondering how cheap a model I can use thatโ€™s supportedโ€ฆ