Efficient Sequential Decision Making with Large Language Models

Dingyang Chen, Qi Zhang, Yinglun Zhu

Abstract

Traditional sequential decision-making algorithms often suffer from the "cold start" problem, requiring extensive data before achieving high performance. While Large Language Models (LLMs) possess significant prior knowledge, their high computational cost and latency make them impractical for real-time applications. This paper proposes a hybrid framework that combines the zero-shot reasoning of LLMs with the long-term adaptability of traditional bandit algorithms through online model selection. Our approach achieves up to a 6x performance improvement on large-scale benchmarks while requiring LLM calls for only 1.5% of decisions, effectively bridging the gap between static prior knowledge and dynamic environmental learning.

Introduction

In domains such as recommendation systems and medical diagnosis, agents must learn optimal actions through sequential interactions with an environment. This process faces two primary challenges: the "cold start" problem, where algorithms perform poorly initially due to lack of data, and the "efficiency gap" of LLMs, which are too resource-intensive for continuous real-time use.

This research introduces a "best of both worlds" strategy. By leveraging LLMs to provide a "warm start" and then transitioning to lightweight, specialized algorithms that adapt over time, the proposed framework maintains high performance while ensuring computational efficiency.

Methodology

The framework consists of two primary components:

1. LLM-as-Agent (Algorithm 1)

To bridge the gap between natural language LLM outputs and discrete action spaces, the authors developed a mapping system. The LLM is prompted for a decision, and its top-k textual responses are embedded into a vector space. These embeddings are then mapped to the closest valid actions in the environment using similarity measures like cosine similarity.

2. The Hybrid Framework (Algorithm 2)

The core innovation is an online model selection mechanism. The system treats the LLM-powered policy and a standard bandit algorithm (e.g., SpannerGreedy) as competing experts. Using Log-Barrier Online Mirror Descent, the framework dynamically decides which expert to trust at each time step.

The strategy prioritizes the LLM during the initial "cold start" phase and gradually shifts trust to the traditional bandit algorithm as it accumulates environment-specific data. To minimize costs, sampling strategies (such as polynomial or exponential decay) are employed to reduce LLM invocation frequency as the system matures.

Experimental Setup

The framework was evaluated on two large-scale textual decision-making benchmarks:

  • OneShotWikiLinks-311: A named-entity recognition task with 622,000 rounds and 311 possible actions.
  • AmazonCat-13K: An extreme multi-label classification task involving over 1.1 million rounds and 13,330 possible actions based on item metadata.

Key Insights

  • LLMs as Warm Starters: While vanilla LLMs show strong initial performance, they lack the ability to improve over time without retraining.
  • Efficiency through Hybridization: The LLM's primary role is to "warm start" the data pool for the traditional algorithm, allowing the latter to learn significantly faster.
  • Model Size Flexibility: Integration into this hybrid system allows even small models, such as the 80M parameter Flan-T5 small, to outperform much larger standalone baselines.
Performance of different model sizes within the hybrid framework.

Results

The hybrid approach demonstrates significant advantages in both performance and efficiency:

  • Performance Gains: On the AmazonCat-13K dataset, the framework achieved a 6x higher average reward compared to standard bandit baselines.
  • Operational Efficiency: These results were obtained with the LLM being called in only 1.5% of total time steps.
  • Computational Speed: Traditional bandit algorithms are 52x to 159x faster than LLM inference, making the hybrid system suitable for low-latency environments.
Comparison of the hybrid approach against standard bandit and standalone LLM baselines.

Conclusion and Future Work

The proposed framework successfully utilizes LLM prior knowledge to overcome the cold start problem in contextual bandits without incurring prohibitive costs. Future research will explore extending this logic to full Reinforcement Learning (RL) scenarios involving state transitions and investigating lightweight LLM updates (e.g., LoRA) to further enhance the system's adaptability.

Summary updated

BibTeX
@inproceedings{chen2024efficient,
  author = {Dingyang Chen and Qi Zhang and Yinglun Zhu},
  title = {{Efficient Sequential Decision Making with Large Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.517},
}
Figure