Back to search

Nanyang Technological University

Context-aware dual-layer guardrails for nutrition consultation agents: integrating PHQ-9-informed risk quantification and multi-turn dialogue analysis

Abstract

dc:description.abstract

As large language model deployment in healthcare accelerates, nutrition consultation agents have evolved from information-provision tools into behavioral guidance and risk-bearing entry points. Users may progressively expose psychological risk signals— including suicidal ideation, depressive symptoms, and eating disorder indicators—during sustained conversations, typically manifesting in implicit, distributed, and cross-turn cumulative patterns rather than explicit single-turn expressions. Existing general-purpose guardrails primarily address single-turn content violations and exhibit significant limitations in context-dependent risk identification, clinical risk stratification, and professional-context false positive control, rendering them inadequate for the safety governance demands of high-sensitivity nutrition consultation scenarios. To address these challenges, this thesis proposes a context-aware dual-layer guardrail framework for nutrition consultation scenarios. The framework incorporates four core mechanisms: first, a heterogeneous complementary architecture integrating an LLM semantic detection layer with a regex rule detection layer, balancing implicit expression identification with explicit crisis signal fallback; second, a PHQ-9 symptom dimension-based equivalent scoring module that upgrades risk determination from binary classification to structured multi-level quantification; third, a sliding-window driven context modeling mechanism that captures progressive risk accumulation signals across multi-turn dialogues; and fourth, a role isolation routing strategy that reduces false positives from professional terminology through differentiated detection paths. These four mechanisms collaborate through a fusion decision layer to achieve an end-to-end risk governance pipeline spanning detection, quantification, stratification, and differentiated intervention response. Experiments are conducted on an evaluation dataset comprising 55 multi-turn dialogue samples covering five categories: suicide, depression, anorexia, bulimia, and no-risk. Through main experiments, ablation experiments, and window sensitivity experiments, the study systematically addresses four research questions, validating the complementary advantages of dual-layer detection, the necessity of context modeling, the stratification contribution of PHQ-9-equivalent scoring, and the false positive control effectiveness of role isolation. Ablation experiments reveal that each of the four core modules makes an irreplaceable marginal contribution, collectively constituting the complete support structure for system effectiveness. Results indicate that safety governance for high-sensitivity dialogue scenarios should transcend the single-turn content filtering paradigm, moving toward systematic approaches that integrate context modeling, clinical equivalent quantification, and role awareness

Degree

thesis:*
College dc:contributor.school
School of Electrical and Electronic Engineering
Grantor dc:publisher
Nanyang Technological University
Year dc:date.issued
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Liu, Siqiu
Advisor dc:contributor.supervisor
  • Andy Khong W H

Subjects

dc:subject × 1

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/10356/216931

Chain of custody

source
Harvested from
Nanyang Technological University
Base URL
dr.ntu.edu.sg/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
citation

Liu, Siqiu. Context-aware dual-layer guardrails for nutrition consultation agents: integrating PHQ-9-informed risk quantification and multi-turn dialogue analysis. Nanyang Technological University, 2026. https://hdl.handle.net/10356/216931