Chain-of-Symbol Prompting for Spatial Relationships in Large Language Models

Hanxu Hu, Hongyuan Lu, Huajian Zhang, Yunze Song, Wai Lam, Yue ZhangOpenReview 2024 · Submission to ICLR 2024 · Rejected

Abstract

While conventional Chain-of-Thought prompting shows promising performance on various language tasks for LLMs, the spatial scenarios are nearly unexplored. In this paper, we first investigate the performance of LLMs on complex spatial planning and understanding tasks that require LLMs to understand a virtual spatial environment simulated via natural language and act or reason correspondingly in text. By evaluating on classic spatial planning scenarios through natural language descriptions, we found that current popular LLMs such as ChatGPT still lack abilities to handle spatial relationships in texts. This arises a question -- do the natural language is the best way to represent complex spatial environments for LLMs, or maybe other alternatives such as symbolic representations are both more efficient and effective for LLMs? To this end, we propose a novel method called **CoS** (**C**hain-**o**f-**S**ymbol Prompting) that represents the spatial relationships with condensed symbols during the chained intermediate thinking steps. CoS is easy to use and does not need additional training on LLMs. Extensive experiments indicate that CoS clearly surpasses the performance of the Chain-of-Thought (CoT) Prompting described in natural langauge in all three spatial planning tasks and existing spatial QA benchmark, with even fewer tokens used in the inputs compared with CoT. The performance gain is strong, by up to 60.8\% accuracy (from 31.8\% to 92.6\%) on Brick World scenarios for ChatGPT. CoS also reduces the number of tokens in the prompt obviously, by up to 65.8\% of the tokens (from 407 to 139) for the intermediate steps from demonstrations on the Brick World task.
BibTeX
@misc{hu2024chain,
  author = {Hanxu Hu and Hongyuan Lu and Huajian Zhang and Yunze Song and Wai Lam and Yue Zhang},
  title = {{Chain-of-Symbol Prompting for Spatial Relationships in Large Language Models}},
  year = {2024},
  url = {https://openreview.net/forum?id=B0wJ5oCPdB},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2024},
}

Loading related content...

Figure