Know Thy Enemy: How Chain-of-Thought Fine-Tuning Defends LLMs Against Prompt Injection
InstruCoT teaches language models to analyze instructions for conflicts with their intended purpose, achieving 92.5-98% defense rates against prompt injection attacks by using reasoning rather than simple detection methods.