StressAgent: A Dual-Agent System for Human Stress Classification with Retrieval Augmentation
Abstract
Identifying stress states from user text is important for mental health monitoring, but it remains difficult because stress expression is subjective and varied, and language cues across states overlap. In closed-set classification, the model must select a label from a fixed set of labels, as vague or weak evidence often leads to errors. While instruction follows LLMs to accomplish this task, the output can be word-sensitive and use unconstrained reasoning when the evidence is insufficient. We propose StressAgent, an evidence-enhanced dual-agent framework, to improve robustness. StressAgent breaks down closed-set predictions into two steps: a Reasoning and Decision (RD) agent and a Retrieval-Augmented Generation (RAG) agent. The RAG agent retrieves the 10 most similar training instances from the search index and returns their category labels and short text fragments associated with the tags as evidence. The RD agent then integrates the retrieved evidence into a restricted closed-set output format to generate a final label. Experiments were conducted on Qwen2.5-7B-Instruct and Deepseek-Chat to evaluate all combinations of enabled or disabled retrieval and enabled or disabled chains of thought. The results show that retrieval enhancement provides continuous accuracy improvements and explains most improvements. Search using cosonic similarity outperformed Euclidean distance, highlighting the impact of similarity measures on the usefulness of evidence. In the absence of chain of thought, cosine similarity retrieval improved the accuracy of Qwen2.5-7B-Instruct from 61.97% to 71.37%, and Deepseek-Chat from 67.52% to 74.89%. Once retrieval is enabled, the further benefits of chains of thought are limited. Overall, StressAgent provides an interpretable, controllable, evidence-based driven classification paradigm for closed set stresses.
References
- Pang B, Lee L. Opinion mining and sentiment analysis [M]. Now Publishers Inc, 2008.
- Xu J, Chen D, Qiu X, et al. Cached long short-term memory neural networks for document-level sentiment classification [C]//Proceedings of the 2016 conference on empirical methods in natural language processing. 2016: 1660-1669.
- Kim Y. Convolutional neural networks for sentence classification [C]//Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP). 2014: 1746-1751.
- Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need [J]. Advances in neural information processing systems, 2017, 30.
- Lee J, Toutanova K. Pre-training of deep bidirectional transformers for language understanding [J]. arXiv preprint arXiv: 1810.04805, 2018, 3(8): 4171-4186.
- Zhang Y, Tiňo P, Leonardis A, et al. A survey on neural network interpretability [J]. IEEE transactions on emerging topics in computational intelligence, 2021, 5(5): 726-742.
- Hendrycks D, Gimpel K. A baseline for detecting misclassified and out-of-distribution examples in neural networks [J]. arXiv preprint arXiv: 1610.02136, 2016.
- Gao B B, Xing C, Xie C W, et al. Deep label distribution learning with label ambiguity [J]. IEEE Transactions on Image Processing, 2017, 26(6): 2825-2838.
- Ouyang L, Wu J, Jiang X, et al. Training language models to follow instructions with human feedback [J]. Advances in neural information processing systems, 2022, 35: 27730-27744.
- Zhuo J, Zhang S, Fang X, et al. ProSA: Assessing and understanding the prompt sensitivity of LLMs [C]//Findings of the Association for Computational Linguistics: EMNLP 2024. 2024: 1950-1976.
- Ji Z, Lee N, Frieske R, et al. Survey of hallucination in natural language generation [J]. ACM computing surveys, 2023, 55(12): 1-38.
- Lewis P, Perez E, Piktus A, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks [J]. Advances in neural information processing systems, 2020, 33: 9459-9474.
- Qian C, Liu W, Liu H, et al. Chatdev: Communicative agents for software development [C]//Proceedings of the 62nd annual meeting of the association for computational linguistics (volume 1: Long papers). 2024: 15174-15186.
- Yao S, Zhao J, Yu D, et al. React: Synergizing reasoning and acting in language models [C]//The eleventh international conference on learning representations. 2022.
- Li G, Hammoud H, Itani H, et al. Camel: Communicative agents for" mind" exploration of large language model society [J]. Advances in neural information processing systems, 2023, 36: 51991-52008.
- Shinn N, Cassano F, Gopinath A, et al. Reflexion: Language agents with verbal reinforcement learning [J]. Advances in neural information processing systems, 2023, 36: 8634-8652.
- Madaan A, Tandon N, Gupta P, et al. Self-refine: Iterative refinement with self-feedback [J]. Advances in neural information processing systems, 2023, 36: 46534-46594.