Michael Isaac will be talking about Flex at the upcoming Bay Area DSPy meet up, along with lightning talks from @NoahZiems, @MaximeRivest, @JoshPurtell, @benzhang04, and more!
Sign up here: https://t.co/SYc5sEHfxi
DSPy can now optimize your program's code, in addition to the prompt.
It's insane: GEPA took one task from 90% accuracy to 95%…while making 75% FEWER LLM calls.
Introducing Flex: https://t.co/FHlPeF0Xto
Flex is a new dspy idea where the optimizers can (among other things) replace the AI call by deterministic (cheap) code! Sometimes, beating GEPA in both accuracy and cost!
LLMs are always the 'worse' way to do a task, but very often they are the only way! Now, with flex you can search for better ways, so you keep only what needs to be AI calls as such.
The new experimental dspy.Flex, led by @michaelnisaac, lets you learn code that represents your task, not just optimize its instructions.
By expanding dspy.GEPA, Flex can rewrite predictors, control flow, DSPy primitives, and the balance between Python and LM calls.
We find it extremely helpful for reducing the cost of pipelines, and are excited to share more in a blog coming soon.