llm security
3 articles
LLM security is the work of protecting applications built on large language models from being manipulated, misused or made to leak data.
Language models create a kind of weakness older software did not have. A traditional program keeps instructions and data apart. A language model receives everything as one stream of text: the developer's rules, the user's message, and any document, email or web page it is asked to read. It has no dependable way to tell which words are commands and which are merely content.
The main attacks follow from this. In prompt injection, text supplied by a user overrides the developer's instructions. In the indirect form, the attacker never talks to the model at all. They plant instructions in a web page or file, and the model obeys them when it later reads that content on someone else's behalf. Jailbreaks coax a model past its safety training. Other risks include leaking the system prompt or private data, poisoned training data, and trusting model output too readily, for example by running generated code or passing it into a database unchecked. No single fix exists, so defences are layered. Untrusted content is marked off and treated as data. The model is given the fewest permissions it needs. Inputs and outputs are filtered. Sensitive actions require human approval. Systems are tested with known attacks before release.
This matters more as models are wired into email, files, payments and company systems. A chatbot that can only talk can only say something wrong. An assistant that can act can send, delete or buy, and one hidden sentence may be enough to redirect it.
- red teamingWhat Is Red Teaming an AI Model? Methods and LimitsRed teaming an AI model means attacking it on purpose to find harmful replies before users do. Where the idea came from, how it works and where it stops.
- ai jailbreakWhat Is a Jailbreak in an AI Chatbot? Methods and DefensesA jailbreak is a prompt written to get a chatbot past its safety training. Why it works, the main families of attack, and the layers that limit the damage.
- prompt injectionHow to Stop an LLM App From Following Hidden InstructionsHidden instructions in emails, web pages and files can steer an LLM app. Four layers limit the damage: separation, least privilege, filtering and attack cases.