# Validity In our paper, we propose a simple sequence-to-sequence framework to tackle the NER task in the legal domain. We formulate the NER task as a sequence generation problem, and design an entity-type-aware module to reduce the possibility of entity type prediction errors. Additionally, we obtain the entity extraction results in a generative way of improving the effect of intricate and lengthy entities recognition. To validate our method, we conduct experiments which show that our framework can effectively solve entity type prediction errors and achieve better performance in recognizing intricate and lengthy entities. Furthermore, the experiments show that our framework achieves the state-of-the-art performance on two legal datasets. # Limitations In the proposed method, multi-task learning primarily involves the joint training of the contrastive learning task in the encoder's entity-type-awareness module and the entity recognition result generation task in the decoder. Whether additional downstream tasks that could enhance the performance of entity recognition can be incorporated into the multi-task learning process is worth further investigation. Moreover, although the study focuses on legal domain-specific named entity recognition, its effectiveness in other domains remains uncertain. Additionally, the generative approach used for handling legal named entity recognition tasks is often slow during the decoding process, indicating a need for improvements in model efficiency and decoding speed.