
This paper proposes and empirically evaluates the Secure Prompt Engineering Framework (SPEF), a four-layer defensive architecture for mitigating prompt injection and sensitive data leakage in Large Language Model (LLM)-based systems. The framework operates entirely at the application layer and requires no access to model weights or training pipelines. A controlled experiment was conducted using Llama-3.3-70B via Groq API with 85 adversarial test cases across six attack categories. Results show that SPEF reduced the Attack Success Rate (ASR) from 17.6% to 2.4%, representing an 86.4% relative reduction. The study also contributes a methodological discussion on scorer validity in adversarial LLM evaluation and provides all artifacts as open-source resources. GitHub Repository:https://github.com/gugacyber/spef_experiment
Cybersecurity, Large Language Models, Groq, Llama, Software Engineering, LLM Security, Secure Prompt Engineering, Adversarial NLP, Prompt Injection, AI Security
Cybersecurity, Large Language Models, Groq, Llama, Software Engineering, LLM Security, Secure Prompt Engineering, Adversarial NLP, Prompt Injection, AI Security
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 0 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Average | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
