Computer Science > Computation and Language
arXiv:2508.04660 (cs)
[Submitted on 6 Aug 2025 (v1), last revised 11 May 2026 (this version, v2)]
Title:Composing Policy Gradients and Prompt Optimization for Language Model Programs
Authors:Noah Ziems, Dilara Soylu, Lakshya A Agrawal, Isaac Miller, Liheng Lai, Chen Qian, Kaiqiang Song, Meng Jiang, Dan Klein, Matei Zaharia, Karel D'Oosterlinck, Christopher Potts, Omar Khattab
View a PDF of the paper titled Composing Policy Gradients and Prompt Optimization for Language Model Programs, by Noah Ziems and 12 other authors
View PDF
HTML (experimental)
Abstract:Group Relative Policy Optimization (GRPO) has proven to be an effective tool for post-training language models (LMs). However, AI systems are increasingly expressed as modular programs that mix together multiple LM calls with distinct prompt templates and other tools, and it is not clear how practitioners can best leverage online RL algorithms like GRPO to improve these systems. We begin to address this challenge by investigating whether it is possible to effectively instantiate GRPO for arbitrary multi-prompt programs and whether it can work robustly as an off-the-shelf optimizer for LM programs using the same abstractions and constraints typically involved for prompt optimization. Our main variant of multi-module GRPO constructs groups from module-level invocations, and we also consider trajectory-level grouping as another natural instantiation. We find for the first time that GRPO (and its multi-module counterpart) empirically composes well with automatic prompt optimization, and together they improve accuracy by 11% on average across classification, many-hop search, and privacy-preserving delegation tasks against the post-trained LM - with 5% gains against prompt optimization on its own. We open-source multi-module GRPO in the DSPy library at this https URL .
| Comments: | ACM CAIS 2026. Lakshya*, Dilara*, and Noah* contributed equally to this work |
| Subjects: | Computation and Language (cs.CL) |
| Cite as: | arXiv:2508.04660 [cs.CL] |
| (or arXiv:2508.04660v2 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2508.04660
arXiv-issued DOI via DataCite
|
Submission history
From: Dilara Soylu [view email][v1] Wed, 6 Aug 2025 17:28:31 UTC (56 KB)
[v2] Mon, 11 May 2026 11:25:22 UTC (818 KB)
Full-text links:
Access Paper:
- View PDF
- HTML (experimental)
- TeX Source
View a PDF of the paper titled Composing Policy Gradients and Prompt Optimization for Language Model Programs, by Noah Ziems and 12 other authors
References & Citations
Loading...
BibTeX formatted citation
Data provided by:
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
