## 2 Related Work
### Legal Compliance and AI  
The intersection of artificial intelligence and legal compliance has rapidly emerged as a critical and dynamic field. This emergence is propelled by the proliferation of data privacy regulations worldwide. The advent of comprehensive legal frameworks such as the General Data Protection Regulation (GDPR) in Europe [2], the California Consumer Privacy Act (CCPA) in California [21], and, most pertinently to our research, the Personal Data Protection Act (PDPA) in Thailand [4], has fundamentally reshaped the landscape of data processing and privacy protection. These regulations, while varying in specific details, share a common objective: to empower individuals with greater control over their personal data and to mandate organizations to implement robust safeguards. These safeguards protect data from unauthorized access, misuse, and breaches. Compliance with these regulations is no longer merely a matter of adhering to legal mandates; it has become an essential component of responsible data governance, ethical AI practices, and maintaining the trust of stakeholders, including customers, partners, and regulatory bodies.  
AI technologies themselves are increasingly recognized as holding significant potential for automating and streamlining various aspects of legal compliance. AI-powered tools can be deployed to assist in data discovery, enabling organizations to efficiently identify and catalog the vast repositories of data they hold. This is a crucial step in understanding data privacy obligations. Data classification, another area where AI excels, can be leveraged to automatically categorize data based on sensitivity levels and regulatory requirements, facilitating targeted privacy controls. Access control mechanisms, critical for ensuring data security and limiting unauthorized access, can be enhanced through AI-driven systems that dynamically manage permissions and monitor data access patterns.  
In the specific context of PDPA compliance, AI can play a pivotal role in automating tasks such as identifying personal data within datasets, managing user consent for data processing, and continuously monitoring data security posture to detect and mitigate potential vulnerabilities [22]. However, the application of AI to legal compliance is not without its inherent challenges. Legal regulations, by their nature, are often expressed in complex, nuanced, and sometimes ambiguous language, requiring sophisticated interpretation and contextual understanding. Furthermore, the dynamic and evolving nature of legal landscapes necessitates continuous adaptation and refinement of AI-driven compliance systems. Large language models (LLMs), with their remarkable capabilities in natural language understanding and generation, offer a promising avenue for addressing these challenges. LLMs possess the potential to interpret complex legal documents, extract relevant information, and assist in automating compliance-related tasks that require sophisticated language processing and reasoning [23]. Our research directly explores this potential by leveraging LLMs to interpret PDPA guidelines and make informed decisions regarding the redaction of personal data on labels. We aim to bridge the gap between AI capabilities and the practical requirements of legal compliance in the realm of data privacy.