从培训生到培训师:基于LLM设计的、支持多智能体推理的强化学习培训环境
From Trainee to Trainer: LLM-Designed Training Environment for RL with Multi-Agent Reasoning
摘要
用于大型语言模型训练的强化学习流程通常需要手动重新设计各个阶段的环境设置,因此从业者必须通过启发式方法来确定哪种配置能最有效地提升当前策略性能。为了自动化这一过程,我们提出了“LLM作为环境工程师”框架——该框架中,当前策略模型会结合上下文信息与失败情况,从而提出对下一阶段训练环境设置的优化方案。我们还引入了MAPF-FrozenLake这个可控制的测试平台,其生成器能够提供多维度的环境配置信息,从而便于研究与环境设计的优化。在这个测试平台上,环境工程师依据策略行为、失败案例以及环境统计数据的结构化信息来生成下一阶段的配置。以Qwen3-4B作为核心模型,我们的框架在测试指标上取得了最佳成绩,其性能优于其他大型专有语言模型(如GPT、Gemini)以及固定环境训练基准模型。我们还分析了哪些类型的上下文信息最为有效,发现有效的环境更新依赖于失败数据,同时保留那些已经有效的配置。有趣的是,当前的强化学习检查点作为环境工程师的效果优于原始基础模型,这表明策略学习的过程有助于提升模型识别自身缺陷的能力。
English Abstract
Reinforcement learning pipelines for Large Language Model (LLM) training often rely on manually redesigned environments between stages, requiring practitioners to heuristically infer which configuration will best improve the current policy. To automate this process, we propose the LLM-as-Environment-Engineer framework in which the current policy model analyzes failure trajectories together with contextual information and proposes modifications to the next-stage training environment configuration. We also introduce MAPF-FrozenLake, a controllable testbed whose generator exposes multi-dimensional environment configurations, making it suitable for studying and benchmarking environment redesign. On this testbed, we condition the environment engineer on structured summaries of policy behavior, failure cases, and environment statistics, from which it produces the configuration for the next training stage. With Qwen3-4B as the backbone, our framework achieves the strongest aggregate performance on our benchmarks, outperforming larger proprietary LLMs (e.g., GPT, Gemini) and fixed-environment training baselines. We further analyze which forms of context are most effective, finding that successful environment updates rely on failure evidence and preserve configurations that already work. Interestingly, the current RL checkpoint serves as a better environment engineer than the original base model, suggesting that policy learning improves the model's ability to diagnose its remaining weaknesses.