This paper proposes a three-layer query control pipeline for stateless LLM deployments. The system combines a word-level filter, semantic intent classifier using fastText and GloVe, and an LLM guardrail prompt to enforce domain constraints. The approach reduces API cost, prevents domain drift, and improves system reliability in production environments.
CHINTAKINDI et al. (Tue,) studied this question.