## 4 Case Study
### Structured Information Extraction Based on Prompt Engineering
This addition does not appear in all function descriptions, but, from the context, it reasonably supplements the applicable subject of the function, making the information expression clearer. However, in some cases, GPT-4 may also produce extraction errors, especially when processing requirement statements with strong hierarchical dependencies. For example, in the design constraint \"[The automatic fare collection system design should follow the principles of centralized management, hierarchical control, and resource sharing. ]\", GPT-4 extracts the structure as {'Subject': 'Automatic Fare Collection System Design', 'Principle 1': 'Centralized Management', 'Principle 2': 'Hierarchical Control', 'Principle 3': 'Resource Sharing'}. However, the actual subject should be \"Automatic Fare Collection System\", and \"Design\" should be treated as an attribute. The structure thus needs to be corrected to {'Subject': 'Automatic Fare Collection System', 'Attribute': 'Design', 'Principle 1': 'Centralized Management', 'Principle 2': 'Hierarchical Control', 'Principle 3': 'Resource Sharing'}. In this case, GPT-4 failed to correctly distinguish between subject and attribute, mistakenly identifying \"System Design\" as part of the subject rather than its attribute. This indicates that when handling complex hierarchical dependencies, GPT-4 may misclassify descriptive phrases as part of the subject while overlooking the actual attribute relationships. Additionally, when dealing with multi-level requirement structures, GPT-4 may lose or misinterpret hierarchical information, causing the extracted results to be inconsistent with the original requirement text's structure, thereby affecting the accuracy and consistency of knowledge graph construction. \begin{table}
\begin{tabular}{c c c} \hline
**Requirement Category** & **Requirement Description** & **Extracted Structured Data** \\ \hline \multirow{4}{*}{Functional Requirement} & The Semi-automatic Ticket Vending Machine & \{‘Subject’: ‘Semi-automatic Ticket Vending Machine’, ‘Action’: ‘should have’, ‘Function 1’: ‘processing ticket refunds for passengers’, ‘Function 2’: ‘processing ticket replacements for passengers’, ‘Function 2’: ‘processing ticket replacements for passengers’, ‘Function 3’: ‘processing fare top-ups, ticket validation, and ticket exchanges for passengers’, ‘Function 4’: ‘processing ticket validation for passengers’, ‘Function 5’: ‘processing ticket exchanges for passengers’\} \\ \hline Interface Requirement & The Automatic Fare Collection System should implement interfaces with relevant systems. & ‘Subject’: ‘Automatic Fare Collection System’, ‘Action’: ‘should implement interfaces’, ‘Object’: ‘relevant systems’ \\ \hline Performance Requirement & The grounding resistance of the Automatic Fare Collection System should not exceed 1\(\Omega\). & ‘Subject’: ‘Automatic Fare Collection System’, ‘Attribute’: ‘Grounding resistance’, ‘Value’: ‘not exceed 1\(\Omega\)’ \\ \hline \multirow{4}{*}{Physical Requirement} & Station-level hardware should be configured according to the following requirements: one set of Integrated Backup Panel (IBP) should be configured. & \{‘Subject’: ‘Station-level hardware’, ‘Action’: ‘should be configured’, ‘Object’: ‘Integrated Backup Panel (IBP)’, ‘Value’: ‘one set’\} \\ \cline{2-4}  & The Automatic Fare Collection System Design should follow the principles of centralized management, hierarchical control, and resource sharing. & \{‘Subject’: ‘Automatic Fare Collection System Design’, ‘Principle 1’: ‘Centralized Management’, ‘Principle 2’: ‘Hierarchical Control’, ‘Principle 3’: ‘Resource Sharing’} \\ \hline \end{tabular}
\end{table} 
Table 6: GPT-4 structured information extraction examples.