Can large language models explore in-context?

📄 arXiv: 2403.15371v3 📥 PDF

作者: Akshay Krishnamurthy, Keegan Harris, Dylan J. Foster, Cyril Zhang, Aleksandrs Slivkins

分类: cs.LG, cs.AI, cs.CL

发布日期: 2024-03-22 (更新: 2024-10-28)

备注: Accepted to NeurIPS 2024. This version: added references to related and concurrent work


💡 一句话要点

探讨大型语言模型在上下文中探索能力的局限性

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 探索能力 强化学习 决策制定 多臂老虎机 链式推理 外部总结

📋 核心要点

  1. 现有大型语言模型在复杂环境中的探索能力不足,缺乏有效的自主决策能力。
  2. 本研究通过在多臂老虎机环境中测试LLMs,探索其在上下文中进行探索的能力,未进行任何训练干预。
  3. 实验发现,只有GPT-4在特定配置下表现出良好的探索行为,其他配置未能实现稳健的探索,提示外部总结的重要性。

📝 摘要(中文)

本研究调查了当代大型语言模型(LLMs)在探索能力方面的表现,这是强化学习和决策制定中的核心能力。我们专注于现有LLMs的原生性能,未进行训练干预。通过在简单的多臂老虎机环境中部署LLMs,完全在上下文中指定环境描述和交互历史。实验结果显示,只有一种配置(GPT-4结合链式推理和外部总结的交互历史)表现出令人满意的探索行为,而其他配置则未能实现稳健的探索。这表明外部总结在复杂环境中可能是获取理想行为的重要因素,最终得出结论,复杂环境中可能需要非平凡的算法干预来增强LLM决策代理的能力。

🔬 方法详解

问题定义:本研究旨在解决大型语言模型在复杂环境中探索能力不足的问题。现有方法未能有效利用LLMs的潜力,导致其在自主决策中表现不佳。

核心思路:研究通过在多臂老虎机环境中测试LLMs的原生性能,探索其在上下文中进行有效探索的能力,强调环境描述和交互历史的设计。

技术框架:整体架构包括环境设置、LLM代理的部署和交互历史的管理。主要模块包括环境描述、提示设计和结果评估。

关键创新:最重要的技术创新在于通过外部总结交互历史来增强LLMs的探索能力,这一方法与传统的直接输入历史的方式有本质区别。

关键设计:实验中使用了多种提示设计,特别是GPT-4结合链式推理和外部总结的配置,显示出显著的探索行为,而其他配置则未能实现类似效果。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,只有在特定配置下(GPT-4结合链式推理和外部总结的交互历史),模型表现出满意的探索行为。其他配置未能实现稳健的探索,强调了外部总结在复杂环境中的重要性。这一发现为未来的模型设计提供了重要的指导。

🎯 应用场景

该研究的潜在应用领域包括智能决策系统、自动化代理和游戏AI等。通过增强LLMs的探索能力,可以在更复杂的环境中实现更有效的决策支持,推动智能系统的发展。未来,研究结果可能影响如何设计和训练决策代理,以提高其在动态环境中的适应性和表现。

📄 摘要(原文)

We investigate the extent to which contemporary Large Language Models (LLMs) can engage in exploration, a core capability in reinforcement learning and decision making. We focus on native performance of existing LLMs, without training interventions. We deploy LLMs as agents in simple multi-armed bandit environments, specifying the environment description and interaction history entirely in-context, i.e., within the LLM prompt. We experiment with GPT-3.5, GPT-4, and Llama2, using a variety of prompt designs, and find that the models do not robustly engage in exploration without substantial interventions: i) Across all of our experiments, only one configuration resulted in satisfactory exploratory behavior: GPT-4 with chain-of-thought reasoning and an externally summarized interaction history, presented as sufficient statistics; ii) All other configurations did not result in robust exploratory behavior, including those with chain-of-thought reasoning but unsummarized history. Although these findings can be interpreted positively, they suggest that external summarization -- which may not be possible in more complex settings -- is important for obtaining desirable behavior from LLM agents. We conclude that non-trivial algorithmic interventions, such as fine-tuning or dataset curation, may be required to empower LLM-based decision making agents in complex settings.