Abstract
BACKGROUND: Stress, arising from the dynamic interaction between external stressors, individual appraisals, and physiological or psychological responses, significantly impacts health yet is often underreported and inconsistently documented. When documented, stress-related information is often captured as unstructured narrative text, limiting systematic assessment, secondary use, and computational analysis. PURPOSE: This study aimed to develop a mental stress ontology and to explore the feasibility of using a Large Language Model (LLM) to extract and structure stress-related information from narrative text in an ontology-guided manner. METHODS: Mental Stress Ontology (MeSO) was developed using Protégé by integrating theoretical frameworks on stress with concepts derived from 11 validated stress assessment instruments. MeSO was evaluated for content coverage using additional concepts collected from 58 text sources and for structural quality using the OntOlogy Pitfall Scanner! (OOPS!) and the Protégé Debugger. A mental health expert provided an overall qualitative evaluation of the ontology. Ontology-guided extraction of stress-related information was performed on 35 Reddit posts using an LLM (Claude Sonnet 4) and MeSO for six categories of stress-related information including stressor, stress response, coping strategy, duration, onset, and temporal profile. Human reviewers assessed the appropriateness of the extracted information and MeSO coverage of the identified stress concepts. RESULTS: The final ontology included 181 concepts across eight top-level classes. Human reviewers identified 220 extractable stress-related items from 35 Reddit posts. Ontology-guided extraction using an LLM resulted in 172 correctly extracted items (78.2%), with 27 items (12.3%) misclassified and 21 items (9.5%) missed. Of the extracted items, 22 represented numeric stress duration values and were excluded from ontology-based concept mapping. Of the remaining 150 items, 120 were successfully mapped to MeSO. CONCLUSION: This study provides initial evidence that ontology-guided large language models may facilitate the structuring of stress-related information from narrative text, offering a foundation for future research toward systematic stress assessment and documentation.