# Holistic Spatial Reasoning for Chinese Spatial Language Understanding
## 3 Methodology
### Spatial Chain-of-Thought Framework  
The prompt in the vanilla ICL only contains input-output pairs for the target task. This demands that the model learns the task in one go, which becomes more challenging as the task grows more complex. Existing studies on chain-of-thought methods reveal that prompts containing step-by-step instructions assist the model in decomposing the task and making better predictions. Now, we present our CoT prompt design. However, vanilla CoT simply appends the \"Let us think step by step\" instruction to the target problems fed to LLMs [37], which may cause missing-step errors and misunderstanding errors. For Chinese SLU tasks, the holistic context and external language usage must be taken into consideration, and missing steps or semantic misunderstandings may lead to suboptimal outputs. Thus, we propose the Spatial Chain-of-Thought (Spatial-CoT) framework, which explicitly prompts by using instructions for each reasoning step. Inspired by one's own thought process when solving a spatial reasoning task, we introduced a three-step prompt in order to decompose complex spatial reasoning problems into simpler sub-problems. Then, we introduced the prompts of the three tasks as follows. **Step-1: Entity Analyzer. ** The entity analyzer (EA) template is used to extract entities. Generally, to solve SLU problems while avoiding errors resulting from missing attention on key entities, this step aims to construct templates to extract all of the related entities in the scenes in input descriptions. Thus, the prompt would be as follows:  
**ASpSR:**_You are acting as an entity analyzer. Based on the description, please list all of the entities in this scene. Description: [input description]_  
**SpRL:**_You are acting as an entity analyzer. Based on the description, please list all of the entities in this scene. Description: [input description]_  
**SpSM:**_You are acting as an entity analyzer. Based on the two pieces of description, list all of the entities in the two scenes. Description 1: [input description] Description 2: [input description]_  
**Step-2: Context Analyzer. ** The step of the context analyzer (CA) is used to generate the preliminary decision of a task based on the holistic perspective of the described scene by leveraging the entity clues generated by the EA. In this step, \"pay attention to the whole scene\" is added to the trigger sentence to request the LLMs to perform holistic spatialreasoning as accurately as possible. In the SpRL task, we also include the candidate role labels. The templates of CA are designed as follows:  
**ASpSR:**_You are acting as a context analyzer. Based on the description and the entity clues generated previously, please tell whether there are any abnormal expressions in the given description. Pay attention to the whole scene. Description: [input description]_  
**SpRL:**_You are acting as a context analyzer. Based on the description and the entity clues generated previously, please label the related roles in the description. Pay attention to the whole scene. The role labels should be chosen from [R]. Description: [input description]_  
**SpSM:**_You are acting as a context analyzer. Based on the descriptions and the entity clues generated previously, please tell whether the two pieces of text describe the same scene. Pay attention to the whole scene. Description 1: [input description], Description 2: [input description]_  
**Step-3: Common Knowledge Analyzer. ** The entities and context-based preliminary decisions generated in the first two steps are used to refine and generate cognitive results while considering common sense and language knowledge. In this step, the three tasks adopt the same instruction, as \"pay attention to the Chinese-language characters\" is added to help LLMs focus on Chinese language usage. The templates of the CKA are designed as follows:  
**ASpSR/SpRL/SpSM:**_You are acting as a common knowledge analyzer.