Be responsible in your answers! Monitoring out-of-domain behaviors in domain-specific LLMs
Year: 2026
Type: conference-paper
Abstract: Large Language Models (LLMs) have accelerated the rapid development of chatbot web applications in various domains, such as coding, biomedicine and psychology. Compared to general LLMs like ChatGPT, domain-specific LLMs require a greater sense of responsibility. For instance, if a programming LLM casually answers medical or psychological questions, it not only misleads the public but also poses legal risks. This highlights new demands for monitoring and preventing such irresponsible behaviors. Existing efforts attempt to monitor LLMs from multiple aspects, such as lying, jailbreaks, and toxic content, while overlooking out-of-domain behaviors. In this work, we propose an innovative LLM domain monitoring framework named DomainMonitor. By analyzing the internal hidden states in domain-specific LLMs, DomainMonitor can effectively detect out-of-domain behaviors, suggesting potential 'rejection' instructions for follow-up responses. Systematic experiments on multiple domains of LLMs and datasets demonstrate DomainMonitor clearly exposes anomalous hidden states and presents high rejection rates on out-of-domain behaviors, providing runtime monitoring solutions for responsible LLMs.
Institution: Singapore Management University
Language: English
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7202018102
