Loading article...
Loading article...
Stream/Area:
-
Subject:
-
Paper ID:
IJSREM65186
Volume:
10 |
6 |
Jun 2026
Pages:
1-7
Publication Frequency:
Monthly (12 issues per year)
License:International Journal of Scientific Research in Engineering and Management follows the Creative Commons Attribution 4.0 (CC BY 4.0) License, allowing free use and distribution with proper attribution.
MASTER OF COMPUTER APPLICATION
NEHRU INSTITUTE OF INFORMATION TECHNOLOGY AND MANAGEMENT

MASTER OF COMPUTER APPLICATION
NEHRU INSTITUTE OF INFORMATION TECHNOLOGY AND MANAGEMENT
The rapid adoption of Large Language Models (LLMs) in enterprise, healthcare, education, and digital services has introduced new security challenges, among which prompt injection attacks have emerged as a critical threat. Prompt injection occurs when malicious or manipulated inputs override system instructions, causing an AI model to produce unintended, unsafe, or unauthorized responses. This project presents the design and development of a hybrid prompt injection detection system that combines rule-based pattern matching with AI-powered classification using Gemini 2.5 Flash to improve the accuracy and reliability of threat detection.The proposed system analyzes user prompts through multiple detection layers. The rule-based component identifies known attack patterns, suspicious keywords, and common jailbreak techniques, while the Gemini-based classifier evaluates contextual and semantic characteristics that may indicate sophisticated prompt injection attempts. By integrating both approaches, the system leverages the speed and transparency of rule-based methods together with the adaptability and contextual understanding of advanced language models. The project aims to enhance the security of LLM-powered applications by detecting and classifying malicious prompts before they reach the target model. The architecture is designed to be modular, scalable, and capable of graceful degradation, ensuring continuous operation even when one detection component becomes unavailable. Experimental evaluation demonstrates the effectiveness of the hybrid approach in identifying prompt injection attacks while reducing false positives and improving overall detection performance. This system contributes to the growing field of AI security by providing a practical and efficient solution for safeguarding LLM applications against prompt injection threats, thereby improving trust, reliability, and safe deployment of artificial intelligence systems in real-world environments.
KEYWORDS
This paper presented the design and implementation of an Adversarial Prompt Injection Detection System, a security solution developed to protect Large Language Models (LLMs) from malicious prompt injection attacks. The proposed system integrates rule-based pattern matching with Google Gemini AI to identify and classify potentially harmful prompts before they are processed by the language model. The implementation results demonstrate that the hybrid detection approach effectively identifies a wide range of prompt injection attacks, including instruction override, jailbreak attempts, role manipulation, prompt leakage, and hidden command injection. By combining regular expression-based detection with semantic analysis, the system provides improved detection accuracy while maintaining efficient real-time performance. The proposed solution demonstrates the practical application of artificial intelligence in enhancing the security and reliability of LLM-based applications. The lightweight Streamlit interface and modular architecture make the system easy to deploy, maintain, and extend. Overall, the developed framework provides an effective security layer that helps reduce the risk of adversarial prompt manipulation and supports the safe adoption of AI-powered systems across various application domains.
[1] S. Russell and P. Norvig, Artificial Intelligence: A Modern Approach, 4th ed., Pearson, 2021. [2] T. Brown et al., "Language Models are Few-Shot Learners," Advances in Neural Information Processing Systems (NeurIPS), vol. 33, pp. 1877–1901, 2020. [3] J. Wei et al., "Finetuned Language Models Are Zero-Shot Learners," International Conference on Learning Representations (ICLR), 2022. [4] Google DeepMind, "Gemini API Documentation," Google AI for Developers, 2025. Available: https://ai.google.dev [5] Streamlit Inc., "Streamlit Documentation," 2025. Available: https://docs.streamlit.io [6] Python Software Foundation, "Python 3.11 Documentation," 2025. Available: https://docs.python.org/3 [7] OWASP Foundation, "OWASP Top 10 for Large Language Model Applications," 2025. Available: https://owasp.org/www-project-top-10-for-large-language-model-applications/ [8] N. Carlini, F. Tramer, E. Wallace, M. Jagielski, A. Herbert-Voss, K. Lee, A. Roberts, T. Brown, D. Song, U. Erlingsson, A. Oprea, and C. Raffel, "Extracting Training Data from Large Language Models," USENIX Security Symposium, pp. 2633–2650, 2021. [9] Hugging Face Inc., "Transformers Documentation," 2025. Available: https://huggingface.co/docs/transformers [10] A. Greshake, M. Abdelnabi, S. Mishra, and others, "More than You've Asked For: A Comprehensive Analysis of Novel Prompt Injection Threats to Application-Integrated Large Language Models," arXiv:2302.12173, 2023.
Publication Date
6/19/2026
Peer Review Type
Double-Blind Peer Review
Review Rounds: 2
Documents
Article Views
0
Total views since publication
PDF Downloads
3
Total downloads since publication
Geographic Reach
5
Digital Preservation: This article is permanently archived on Zenodo and complies with all data preservation standards across major indexing platforms.
Plagiarism Screening
This manuscript has been checked for plagiarism using TurnitinPlagiarismChecker software.
Conflict of Interest
The authors declare no conflict of interest related to this research work.
Funding Information
No funding information available for this research.
Related research in the same subject area
Loading similar articles...