Large Language Models (LLMs) are increasingly being deployed in critical domains such as healthcare, finance, and public infrastructure to support intelligent decision-making and conversational interactions. However, these systems introduce significant challenges related to security, reliability, and trustworthiness. Vulnerabilities such as adversarial prompt injections, behavioral manipulation, and multi-stage attacks can lead to unsafe outputs, privacy risks, and loss of user trust. There is a need for robust approaches that ensure both safe application-level interactions and adaptive system-level defenses against evolving LLM threats. In this thesis, we propose a unified two-layer approach to enhancing the trustworthiness and security of LLM-enabled systems. At the application layer, we develop EmpathAI, a RAG-based mental healthcare chatbot that incorporates source tagging, sentiment-aware context retrieval, and a two-layer defense mechanism using regex filtering and prompt engineering to mitigate prompt injection attacks. Building on this, at the system layer, we introduce the Adaptive LLM Threat Response (ALTR) framework, which integrates behavioral anomaly detection, context-aware prompt classification, and temporal threat memory to identify and mitigate adversarial interactions in real time. We evaluate both layers using conversational datasets and adversarial interaction traces. At the application layer, EmpathAI achieves high semantic alignment (similarity scores >0.80–0.85), with all prompt injection classes successfully mitigated. At the system layer, ALTR attains strong detection performance (accuracy and AUC of 0.961, false-negative rate of 0.9 percent) under low-latency constraints (<20 ms). Together, these results demonstrate that securing LLMs in critical domains requires both application-layer trust and systemlayer defense, and that combining domain-aware RAG systems with adaptive multi-layer security frameworks enables their trustworthy and reliable deployment in high-risk environments.
The fast deployment of large language models (LLMs) in critical-domain applications such as financial systems has introduced new types of security vulnerabilities (e.g., adversarial prompt injections, semantic obfuscation, and multi-stage social engineering attacks) that conventional countermeasures cannot typically handle. These vulnerabilities need to be detected through the natural language interface interactions, and relevant security policies need to be applied based on the context of the interactions. In this paper, we present a novel Adaptive LLM Threat Response (ALTR) framework, that supports trustworthy decision-making in LLM-enabled applications by integrating real-time behavioral anomaly detection with context-aware prompt validation to mitigate the risks of vulnerable LLMs. Specifically, we develop a Behavioral Anomaly Engine (BAE) that uses Isolation Forests to identify anomalies in user behavior during LLM interactions in financial systems. In addition, we develop a Context-Aware Prompt Classifier (CAPC) that employs DistilBERT and syntactic analysis to determine malicious inputs. To address the latency requirements in threat response, we create a Threat Response Memory (TRM) knowledge base that stores the aggregated behavioral and semantic risk signals from prior user sessions, and uses LSTM to perform longitudinal threat analysis to predict threat severity. We perform validation experiments using public datasets and a taxonomy of AI-based threats outlined in the Cisco AI Defense Capture-the-Flag (CTF) challenge. Our experiment results show the effectiveness of our ALTR approach by achieving an accuracy of 0.961, an AUC of 0.961, and a low false-negative rate of 0.9%, while maintaining an inference latency ($<\mathbf{2 0 m s}$) of across a range of LLM security vulnerabilities.
Vani Seth, Srikar Alla, Sd Md Abidar Rahman et al.· International Conferences on...· 0 citations