Language Models (LMs) have significantly advanced complex NLP tasks through sophisticated prompting techniques and multi-stage pipelines. However, designing these LM Programs relies heavily on manual “prompt engineering,” a time-consuming process of crafting lengthy prompts through trial and error. To address this, there is a need for more systematic and automated approaches to optimize multi-stage LM pipelines. Various methods have been introduced, but they often fall short in addressing the complexities of multi-stage LM programs. To fill this gap, a more flexible and comprehensive optimization approach is needed.