Natural language (NL) has long been the predominant format for human cognition and communication, and by extension, has been similarly pivotal in the development and application of Large Language Models (LLMs). Yet, besides NL, LLMs have seen various non-NL formats during pre-training, such as code and logical expression. NL's status as the optimal format for LLMs, particularly in single-LLM reasoning and multi-agent communication, has not been thoroughly examined. In this work, we challenge the default use of NL by exploring the utility of non-NL formats in these contexts. We show that allowing LLMs to autonomously select the most suitable format before reasoning or communicating leads to a 3.3 to 5.7\% improvement in reasoning efficiency for different LLMs, and up to a 72.7\% reduction in token usage in multi-agent communication, all while maintaining communicative effectiveness. Our comprehensive analysis further reveals that LLMs can devise a format from limited task instructions and that the devised format is effectively transferable across different LLMs. Intriguingly, the structured communication format decided by LLMs exhibits notable parallels with established agent communication languages, suggesting a natural evolution towards efficient, structured communication in agent communication. Our code is released at \url{https://github.com/thunlp/AutoForm}.
翻译:自然语言(NL)长期以来一直是人类认知与通信的主要格式,并由此在大语言模型(LLMs)的开发与应用中发挥着至关重要的作用。然而,除了自然语言,LLMs在预训练阶段也接触到多种非自然语言格式,例如代码和逻辑表达式。自然语言作为LLMs最优格式(尤其是在单LLM推理和多智能体通信中)的地位尚未得到彻底检验。在本工作中,我们通过探索非自然语言格式在这些场景中的效用,对自然语言的默认使用提出挑战。我们证明,允许LLMs在推理或通信前自主选择最合适的格式,可使不同LLMs的推理效率提升3.3%至5.7%,并在保持通信有效性的前提下,将多智能体通信中的令牌使用量降低高达72.7%。我们的综合分析进一步揭示,LLMs能够从有限的任务指令中设计出格式,且该设计出的格式可有效跨不同LLMs迁移。有趣的是,由LLMs决定的结构化通信格式与已有的智能体通信语言存在显著相似性,这表明智能体通信正自然演进至高效、结构化的通信方式。我们的代码发布于\url{https://github.com/thunlp/AutoForm}。