The integration of large language models with external content has enabled applications such as Microsoft Copilot but also introduced vulnerabilities to indirect prompt injection attacks. In these attacks, malicious instructions embedded within external content can manipulate LLM outputs, causing deviations from user expectations. To address this critical yet under-explored issue, we introduce the first benchmark for indirect prompt injection attacks, named BIPIA, to assess the risk of such vulnerabilities. Using BIPIA, we evaluate existing LLMs and find them universally vulnerable. Our analysis identifies two key factors contributing to their success: LLMs' inability to distinguish between informational context and actionable instructions, and their lack of awareness in avoiding the execution of instructions within external content. Based on these findings, we propose two novel defense mechanisms-boundary awareness and explicit reminder-to address these vulnerabilities in both black-box and white-box settings. Extensive experiments demonstrate that our black-box defense provides substantial mitigation, while our white-box defense reduces the attack success rate to near-zero levels, all while preserving the output quality of LLMs. We hope this work inspires further research into securing LLM applications and fostering their safe and reliable use.
Defending against Indirect Prompt Injection by Instruction Detection
Renmin University of China(中国人民大学);Peking University Shenzhen Graduate School(北京大学深圳研究生院);Wuhan University(武汉大学);University of Science and Technology of China(中国科学技术大学);Hong Kong University of Science and Technology(香港科技大学);Sony AI(索尼人工智能);Microsoft Research Asia(微软亚洲研究院)
You Really Didn't Get That? Benchmarking Social Pragmatic Inference for Indirect and Playful Chinese Online Comments
George Mason University(乔治梅森大学);Virginia Tech(弗吉尼亚理工大学);University of Toronto(多伦多大学);City University of Hong Kong(香港城市大学);Duke Kunshan University(昆山杜克大学)
Interdisciplinary Program in Artificial Intelligence, Seoul National University(人工智能交叉学科项目,首尔国立大学);Electronics and Telecommunications Research Institute(电子与电信研究所)
Imaging-101: Benchmarking LLM Coding Agents on Scientific Computational Imaging
College of Future Technology and the National Biomedical Imaging Center, Peking University(北京大学未来技术学院和国家生物医学成像中心);AI for Science Institute (AISI)(科学人工智能研究所);University of Michigan(密歇根大学);State Key Laboratory of Acoustics and Marine Information, Institute of Acoustics, Chinese Academy of Sciences(中国科学院声学研究所声场声信息国家重点实验室);University of Chinese Academy of Sciences(中国科学院大学);School of Astronautics, Beihang University(北京航空航天大学宇航学院);Key Laboratory of Spacecraft Design Optimization and Dynamic Simulation Technologies, Ministry of Education(教育部航天器设计优化与动态仿真技术重点实验室)