Enhancing Language Model Agents Using Diversity of Thoughts

Abstract

A popular approach to building agents using Language Models (LMs) involves iteratively prompting the LM, reflecting on its outputs, and updating the input prompts until the desired task is achieved. However, our analysis reveals two key shortcomings in the existing methods: $(i)$ limited exploration of the decision space due to repetitive reflections, which result in redundant inputs, and $(ii)$ an inability to leverage insights from previously solved tasks. To address these issues, we introduce DoT (Diversity of Thoughts), a novel framework that a) explicitly reduces redundant reflections to enhance decision-space exploration, and b) incorporates a task-agnostic memory component to enable knowledge retrieval from previously solved tasks—unlike current approaches that operate in isolation for each task. Through extensive experiments on a suite of programming benchmarks (HumanEval, MBPP, and LeetCodeHardGym) using a variety of LMs, DoT demonstrates up to a $\textbf{10}$% improvement in Pass@1 while maintaining cost-effectiveness. Furthermore, DoT is modular by design. For instance, when the diverse reflection module of DoT is integrated with existing methods like Tree of Thoughts (ToT), we observe a significant $\textbf{13}$% improvement on Game of 24 (one of the main benchmarks of ToT), highlighting the broad applicability and impact of our contributions across various reasoning tasks.

Cite

Text

Lingam et al. "Enhancing Language Model Agents Using Diversity of Thoughts." International Conference on Learning Representations, 2025.

Markdown

[Lingam et al. "Enhancing Language Model Agents Using Diversity of Thoughts." International Conference on Learning Representations, 2025.](https://mlanthology.org/iclr/2025/lingam2025iclr-enhancing/)

BibTeX

@inproceedings{lingam2025iclr-enhancing,
  title     = {{Enhancing Language Model Agents Using Diversity of Thoughts}},
  author    = {Lingam, Vijay and Tehrani, Behrooz Omidvar and Sanghavi, Sujay and Gupta, Gaurav and Ghosh, Sayan and Liu, Linbo and Huan, Jun and Deoras, Anoop},
  booktitle = {International Conference on Learning Representations},
  year      = {2025},
  url       = {https://mlanthology.org/iclr/2025/lingam2025iclr-enhancing/}
}