If your app feeds customer emails, tickets, web pages or files to an LLM and then does something with the output, you have a prompt-injection problem whether or not you've seen an attack yet.
OWASP lists prompt injection as LLM01 in its 2025 Top 10 for LLM applications and says it is "unclear if there are fool-proof methods of prevention." The UK NCSC argued in December 2025 that it isn't analogous to SQL injection: there's no parameterised-query equivalent, because inside the model "there is only ever 'next token'."
So this tutorial doesn't try to detect injections. It assumes the model will sometimes be fooled and makes sure that doesn't matter much. The principle comes from Beurer-Kellner et al.…