ARCHIVES
Year 2026 · Volume 7 · Issue 5
A lightweight and explainable framework for prompt injection detection in AI applications
Published Online: September-October 2026
Pages: 102-106
Cite this article
↗ https://www.doi.org/10.59256/ijire.20260705014Abstract
Large language models (LLMs) are increasingly embedded in chatbots, document assistants, retrieval-augmented generation (RAG) pipelines, and tool-using applications. These systems may interpret untrusted user or retrieved text as instructions, creating a prompt-injection risk. A practical detector must identify attempts to redirect model behaviour while allowing harmless security explanations, quotations, and ordinary instructions. This paper proposes a lightweight and explainable text-screening framework based on word- and character-level TF-IDF features, classical machine-learning classifiers, and a transparent rule-based baseline. The study compares Logistic Regression, linear Support Vector Machines, and a combined word-character model under source-separated evaluation. Particular attention is given to hard-benign inputs, controlled obfuscation, duplicate leakage, calibration, and inference cost. Candidate data sources include public prompt-injection examples, NotInject-related resources, and context-rich benchmark materials, subject to access, label, overlap, and licence checks. The framework returns a risk estimate, a concise evidence summary, and a review recommendation for uncertain inputs. It is intended as a screening layer, not a replacement for instruction separation, access control, least privilege, or human approval. Since implementation and testing are proposed work, no accuracy or performance improvement is claimed in advance. The intended contribution is a reproducible low-compute evaluation of when compact detectors are useful, where they over-block benign text, and how reliably their behaviour transfers to unseen sources.
Related Articles
2026
AI-Based Stomach Cancer Detection Using Biomarkers, Medical Images, and Voice Analysis
2026
Hydrogen-Efficient Eco-Driving and Route Planning for Fuel-Cell Electric Vehicles Using Multi-Objective Optimization Under Traffic and Terrain Uncertainty
2026
A Data-Driven Machine Learning Framework for Assessing Patent Commercial Value and Technological Significance
2026
Evaluating Student Academic Performance Through a Benchmark of Fuzzy Reasoning Models
2026
A Hybrid Soft Computing Approach for Managing Uncertainty in Data Analytics
2026