Code as the Carrier of Standing Constraints in Multi-Turn Instruction Following
Yi Zhou ⋅ Sungeun An ⋅ Chad DeLuca
Abstract
LLMs struggle to follow instructions across multi-turn conversations, particularly when users update the set of active constraints without restating the full list each time. We present Code-as-Carrier (CoCa), which instead carries the standing constraints of each topic thread in an executable program: every turn rewrites that thread's program as a delta, so constraints are re-imposed by construction rather than re-read from the growing history. We empirically verified that CoCa can significantly boost model's multi-turn instruction following ability, in particular, we examined five open-weight LLMs spanning 3B to 27B, and our method on average improves instruction satisfaction by $\sim $30\% and robustness by $\sim$45\% over direct prompting. It cuts failures on carried constraints by $\sim$38\% without introducing failures on newly introduced ones. Moreover, CoCa's per-turn context stays flat and spends $5.7\times$ fewer token than direct inference.
Chat is not available.
Successful Page Load