https://www.boundaryml.com logo
🟡 Is it possible to run GEPA using BAML?
# questions
a
Is it possible to run GEPA using BAML?
a
Not directly. I didn't know about this technique until today, looks like what would be a Baml function needs multiple prompts running at the same to pick from the best, which isn't something easy to do right now in Baml
p
I believe @stugorf has been working on ideas related to this. Would be interesting to see where he goes with this!
The idea is that the output of a GEPA-optimized program can be coupled as a prompt template to a BAML function downstream.
Should be doable, though there aren't that many people here in the BAML community who are using DSPy. The more that do, the more ideas we can generate and try out!
@Ajay Bhargava In principle, the user defines a DSPy compound module that mimics the structure of multiple BAML functions and how they're chained together. And then, each module of the DSPy compound module would have its own instructions that are jointly optimized by GEPA, following which it's a trivial operation to extract the instructions from the saved output of the DSPy program and pass those as template strings to the corresponding BAML function. I think this is the idea that @stugorf floated in my chats with him
s
I'm working on a DSPy wrapped BAML this week