Can Large Language Models Explore In-Context?

Abstract

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 GPT3.5, GPT4, 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: GPT4 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.

Cite

Text

Krishnamurthy et al. "Can Large Language Models Explore In-Context?." ICML 2024 Workshops: ICL, 2024.

Markdown

[Krishnamurthy et al. "Can Large Language Models Explore In-Context?." ICML 2024 Workshops: ICL, 2024.](https://mlanthology.org/icmlw/2024/krishnamurthy2024icmlw-large/)

BibTeX

@inproceedings{krishnamurthy2024icmlw-large,
  title     = {{Can Large Language Models Explore In-Context?}},
  author    = {Krishnamurthy, Akshay and Harris, Keegan and Foster, Dylan J and Zhang, Cyril and Slivkins, Aleksandrs},
  booktitle = {ICML 2024 Workshops: ICL},
  year      = {2024},
  url       = {https://mlanthology.org/icmlw/2024/krishnamurthy2024icmlw-large/}
}