Technique | Institution | Date of Publication | Paper | Code |
---|---|---|---|---|
Tabular Chain-of-Thought Prompting (Tab-CoT) | StatNLP Research Group, Singapore University of Technology and Design | May 2023 | Tab-CoT: Zero-Shot Tabular Chain-of-Thought | Xalp/Tab-CoT |
Tabular Chain-of-Thought Prompting (Tab-CoT) is a novel approach to Chain-of-Thought (CoT) prompting. Tab-CoT suggest to structure the reasoning process in CoT in the form of a table.
Unlike traditional CoT methods that rely on verbose natural language prompts, Tab-CoT leverages the power of tables. This allows Large Language Models (LLMs) to reason in a two-dimensional format, ensuring consistency and facilitating a more organized thought process.
Zero-Shot CoT vs. Tab-CoT: Zero-Shot CoT uses “Let’s think step by step” to guide the LLM through reasoning. However, these methods tend to be verbose and often result in less organized outputs. In contrast, Tab-CoT generates concise, structured reasoning steps in a table format. It allows for 2-dimensional reasoning, enabling the model to check for consistency across both rows and columns.
CoT vs. Tab-CoT: In CoT, human-engineered reasoning demonstrations are used to guide the model. While this method can yield high performance, it requires significant effort to manually create task-specific examples. Tab-CoT removes this need by automatically generating the reasoning structure in a table, making it more scalable across various tasks without manual intervention.
Tab-CoT encourages the LLM to captured its reasoning as a series of steps in a table format.
The table typically has the following columns:
This format breaks down complex problems into manageable steps, enabling the model to "think" in a structured way before generating the final answer.
A chef needs to cook 9 potatoes. He has already cooked 7. If each potato takes 3 minutes to cook, how long will it take him to cook the rest?
Step | Subquestion | Process | Result |
---|---|---|---|
1 | How many potatoes are left to cook? | 9 - 7 = 2 | 2 |
2 | How many minutes will it take? | 2 * 3 minutes | 6 |
This table allows LLMs to provide a more organized and efficient reasoning process compared to standard CoT, which may involve verbose, unstructured explanations.
To use Tab-CoT, follow these steps:
The reasoning is structured in a table format with predefined columns that reflect the step-by-step thinking process.
Here's the prompt template:
[Your Question]
|step|subquestion|procedure|result|
Once the table is generated, a final prompt like “The answer is” can be used to extract the result from the completed table. This ensures that the model provides the final answer after performing all reasoning steps.
Therefore, the answer is
The code for Tab-CoT is open-sourced by researchers from StatNLP Research Group, Singapore University of Technology and Design, and available for further research and implementation at Xalp/Tab-CoT.
Tab-CoT has been evaluated on multiple reasoning tasks, including arithmetic, symbolic, and commonsense reasoning tasks. Below are some key results from experiments comparing Zero-Shot CoT and Tab-CoT:
Task | Zero-Shot CoT | Tab-CoT |
---|---|---|
SingleEq | 78.0% | 81.9% |
AddSub | 69.6% | 70.9% |
MultiArith | 78.7% | 81.2% |
GSM8K | 40.7% | 44.4% |
AQUA | 33.5% | 37.0% |
SVAMP | 62.1% | 60.5% |
Tab-CoT presents a significant advancement in CoT prompting methods by introducing a highly structured, tabular approach to reasoning. It offers a concise, scalable, and effective solution for reasoning tasks, outperforming traditional CoT methods in several cases. As LLMs continue to evolve, Tab-CoT's table-based reasoning structure could become a standard for promoting structured reasoning in language models.
Valeriia Kuka, Head of Content at Learn Prompting, is passionate about making AI and ML accessible. Valeriia previously grew a 60K+ follower AI-focused social media account, earning reposts from Stanford NLP, Amazon Research, Hugging Face, and AI researchers. She has also worked with AI/ML newsletters and global communities with 100K+ members and authored clear and concise explainers and historical articles.
Jin, Z., & Lu, W. (2023). Tab-CoT: Zero-shot Tabular Chain of Thought. https://arxiv.org/abs/2305.17812 ↩