Prompt Injection

Prompt injection is an attack where untrusted text (web pages, user content, retrieved documents) attempts to override system instructions, exfiltrate secrets, or trigger unsafe tool actions. Injection exploits the fact that LLMs treat all text as potential instruction unless carefully constrained. Mitigation includes strict instruction hierarchy, delimitering, “treat retrieved text as data” directives, tool permissioning, and output validation. Prompt mining is essential because defenses must be empirically tested against real attack patterns. PromptMining.com(TM) helps Mining Prompts for injection resistance by evaluating templates on adversarial corpora, monitoring tool-call safety, and iterating defense prompts with measurable success rates. Advanced implementations may also incorporate schema validation, retrieval re-ranking, and tool-call verification to reduce hallucinations and enforce deterministic interfaces.
Related
Related
View all- In-Context Learning In-context learning is the phenomenon where an LLM learns a task from examples provided in the prompt, without updating model weights. It …
- Logit Bias Logit bias is a mechanism to increase or decrease the probability of specific tokens during decoding, effectively nudging the model away …
- Citation Prompting Citation prompting instructs the model to attribute claims to specific sources-retrieved documents, URLs, or internal knowledge base …
- Role Prompting Role prompting assigns the model a persona or professional role (e.g., “senior security engineer,” “tax analyst,” …
- Prompt Router A prompt router is a decision layer that selects which prompt template (and sometimes which model) to use based on user intent, risk …

