# ICRSSD: Identification and Classification for Railway Structured Sensitive Data
## 2 Methods
### Rule Base Construction
#### 2.4.1 Identification Rules  
The identification rules comprise two components: regular expressions and keyword lists, which are used to identify semi-canonical sensitive data. Both the regular expressions and keyword lists are created by domain experts. However, to enhance the efficiency and accuracy of regular expression generation, experts can utilize our developed regular expression generation tool, which is designed to assist experts in generating regular expressions using a large language model. By inputting either sample data or a description of the data to be identified, the tool generates accurate and efficient regular expressions using a well-designed prompt. More important, with this regular expression generation tool, users can quickly and accurately produce regular expressions, even without prior knowledge of regular expression syntax.  
(1) Large Language Modeling to Assist Regular Expression Generation.  
The framework of the regular expression generation tool is illustrated in Figure 4. Given that most existing large language models are not specifically tailored for regular expression generation, designing well-crafted prompts becomes a key strategy to guide their focus toward this task.  
Prompt engineering refers to the methodologies and practices involved in utilizing large-scale language models (e.g., GPT) to generate, refine, or evaluate various types  
Figure 4: The framework of the regular expression generation tool.  
Figure 3: Rule Base construction.  
of prompts. Prompts are instructional texts that guide the model to produce specific outputs [24]. Prompt engineering focuses on the design and optimization of these prompts to fully leverage the model's capabilities and achieve the desired outcomes.  
To enhance the efficiency and accuracy of Large Language Models (LLMs) in generating regular expressions, we propose the RICIOE prompting framework. This framework builds upon the ICIO prompting framework summarized by [PERSON] [25] and the CRISPE prompting framework proposed by [PERSON] [26], integrating elements of the Few-Shot [27] prompting approach. The RICIOE framework is composed of six key components: Role, Instruction, Context, Input Data, Output Indicator, and Examples.  
* R: Role. Clarifies the role that the LLM should fill when performing a task.
* I: Instruction. Specifies the specific task or instruction that the LLM performs.
* C: Context. Provides background information about the instruction to help the LLM understand the task.
* I: Input Data. Specifies the specific data that the LLM needs to process.
* O: Output Indicator. Specifies the type or format of the LLM output.
* E: Example. A complete Prompt and an example of a sample LLM response message.
* Keyword Generation.  
The keyword is primarily populated manually by experts. It plays a crucial role in identifying potential sensitive terms that may not be fully captured through canonical or semi-canonical data identification methods. By incorporating these expert-curated keywords, it acts as a supplementary to enhance the identification of sensitive data, ensuring that terms potentially associated with privacy risks or security concerns are accurately flagged.  
The formal representation of the identification rules is provided in Table 1.