Key Security Risks in Prompt Engineering
摘要
This chapter explores the critical security risks inherent in prompt engineering for AI-driven systems. Key vulnerabilities include prompt injection, where malicious inputs can alter system behaviour, and prompt leaking, where sensitive or proprietary information is unintentionally revealed. The chapter addresses advanced threats such as jailbreaking, adversarial prompts, and model manipulation, which exploit model weaknesses to bypass safeguards. Risks like model poisoning and contextual drift highlight how interactions can subtly corrupt AI outputs or lead to unintended behaviours. Emphasis is placed on the challenges of balancing openness with protection in role-based prompting, mitigating social engineering exploits, and preventing input validation attacks. The chapter also examines the risks posed by output manipulation, bias amplification, and resource exhaustion, underscoring the necessity for robust safeguards to maintain system integrity. Solutions discussed include prompt isolation, input sanitisation, session resets, and ethical constraints, providing a comprehensive framework to address these evolving threats. The chapter concludes with actionable strategies for building secure and resilient AI systems, ensuring they operate reliably and ethically across diverse applications.