https://www.boundaryml.com logo
🟡 Plan to Introduce Prompt Optimization in BAML
# questions
a
Hi BAML dev, is there a plan to introduce prompt optimisation like what DSPy offers? BAML is great and super fast to prototype, but to ship it in production env, without a automatic prompt optimisation framework, it will become hard to maintain. eg. 6-12 months later, the model being used in prod need to be rotated to a newer model, then the prompt often needs to be upgraded to fit the new model. Without some self-contain self-optimisation mechanism, it will require the developer to manually play around with the prompt again each time the model is rotated. Or can BAML actually just integrate DSPy? ps. we have pipeline implemented with LangGraph as orchestrator and DSPy program as the llm wrapper, and what we found is using DSPy, the accuracy for that specific classification task is 95% compared to the prompt that we optimised manually (89%). Hence ever since then, we have decided not to write prompt manually for prod project ever again. And upgrading model is super easy as well, as it's just simply retriggering the prompt optimisation pipeline by switching the llm model. Tho it's still a manual trigger, but we can certainly make it as part of the CICD pipeline to automate it. But I then come across BAML and really love the flexibility and clarity it provides compares to DSPy, so wonder if I can get the best of both world
t
https://langwatch.ai/prompt-optimizer have you looked into something like this?
a
no but it seems really interesting, thanks for sharing!