DSPy Introduces Flex: Optimizers Rewrite Code, Not Just Prompts

lateinteraction · x · 2026-08-18

DSPy unveils Flex, a module enabling optimizers like GEPA to improve programs by rewriting both instructions and underlying Python code. Flex routes easy cases to fast deterministic code, reserving model calls for ambiguity, cutting cost and latency while boosting accuracy. Implemented by CMU PhD student Michael Isaac during internship at cmpnd.

Original post →

More from coding & agent

coding & agent channel →