LLMs are now an integral part of information retrieval. As such, their role as question-answering chatbots raises significant concerns due to their demonstrated vulnerability to adversarial man-in-the-middle (MitM) attacks. Here, we propose our fundamental attack evaluation on LLM factual memory under prompt injection via Xmera, our factual MitM framework. By perturbing the input to "victim" LLMs across three closed-book, fact-based QA settings, we undermine the correctness of their responses and assess the uncertainty in their generation process. We show how trivial instruction-based attacks achieve the highest success rate (up to ~85.3%) while simultaneously exhibiting high uncertainty in incorrectly answered questions. To provide a simple defense mechanism against Xmera, we train Random Forest classifiers on the response uncertainty levels to distinguish between unattacked queries and queries attacked by a specific Xmera attack (average AUC of up to ~95%), while detecting attacks in general remains challenging. We believe that signaling users to be cautious about the answers they receive from black-box and potentially corrupt LLMs is a first checkpoint toward user cyberspace safety.
翻译:暂无翻译