IBM Granite LLMON: Prompt Injection Defense, How It Works
IBM released LLMON on November 12, 2026, together with two preview models, granite-4.1-3b-LLMON-preview and granite-4.1-8b-LLMON-preview. LLMON, short for LLM Object Notation and pronounced lemon, is a markup language built for models rather than parsers. It marks each instruction, data payload and requirement as its own block, wrapped in reserved special tokens and named with a unique ID, then states in a separate execution block which instruction runs on which data.
On the OPI indirect prompt injection benchmark, IBM reports that the previews avoided 47 percentage points more attacks than the best frontier model tested and 95 points more than the best open source model, while holding general capability on par with the Granite 4.1 Instruct models. Every figure in that sentence is an IBM measurement, and the rest of this article keeps that boundary visible, because the idea is strong enough to deserve a careful read rather than a headline repeat.
The Problem With JSON Structure for Models
The starting point is a tokenizer observation. JSON was designed for parsers, not for causal language models. Its structural characters, braces, quotes and colons, are ordinary text tokens, so a quote that closes a field and a quote inside a retrieved document are the same token to the model. Escaping rules that are exact for a parser are only statistical patterns for a model, and nesting depth has to be tracked by counting brackets over long spans, a known weak point for transformers.
That weakness is where indirect prompt injection lives. An agent reads a document, a tool result or user supplied data, and somewhere inside that text sits an instruction written by an attacker. In a flat context the model has to infer which text is a command and which text is material. Defenses have mostly sat outside the model so far, as input filters, privilege separation in the harness, or limits on what an agent can touch. LLMON moves the distinction into the format itself, and then into training, so the model reads structure and content through different parts of its vocabulary.
How LLMON Marks a Turn
LLMON is XML-like in shape, but its delimiters are reserved special tokens rather than characters. Each span opens with its tag stated up front, boundaries are explicit, and nested structure is stated locally instead of being reconstructed from bracket depth. A block ID costs two tokens regardless of which ID is drawn, because the IDs come from a fixed set the tokenizer encodes as single tokens.
The practical shape is easiest to see in the example IBM ships. One user turn names its parts, an instruction to write a short paragraph, a data value, and two requirements on length and punctuation. Each part carries an exec flag. The chat template, which ships with the preview models, renders those parts as five addressable blocks and adds a sixth execution block that binds them: run this instruction, on this data, under these requirements, and write the answer into the named assistant block. A conventional template would flatten all of that into one string and leave the model to guess which part was the task.
messages = [{
"role": "user",
"instruction": [{"value": "Write a short paragraph about", "exec": True}],
"data": [{"value": "IBM Company", "exec": True}],
"requirement": [
{"value": "Use less than 10 words", "exec": True},
{"value": "Do not use commas", "exec": True}
]
}]
LLMON does not replace chat templates. It enriches them. A chat template says which role produced a turn. LLMON says what each component inside and across turns means, and how the components relate. That distinction also explains the second benefit IBM claims: unrelated passages, old turns and tool outputs stop leaking into an answer, because an instruction is bound to the exact data it applies to and to nothing else.
OPI Results and What They Measure
OPI places the injection inside the data of classic NLP tasks and tries several attack strategies. IBM defines robustness as 1 minus the attack success rate, the share of attacks where the model does not carry out the injected instruction. On that measure the chart is stark. Both LLMON previews sit near the top of the scale, GPT-6-astra sits near 0.53, and the remaining open models, including Granite 4.1 8B itself, Gemma variants, Qwen3.8-27B and Qwen3.5-9B, fall close to zero. IBM says similar trends appeared on the ASB and StruQ benchmarks.
Two limits belong next to those numbers. First, OPI tests static indirect injections, the kind planted in a document before the conversation starts. IBM states plainly that adaptive attacks, which unfold over many turns and widen their foothold step by step, are still being worked on. Second, the comparison models were run by IBM, under IBM conditions. A near total score on a static benchmark is a real signal about the mechanism, and it is also exactly the kind of result that needs a third party run before anyone budgets security around it.
Training From Base Checkpoints
The previews do not start from the released Granite 4.1 instruct models. They start from Granite 4.1 base checkpoints, so LLMON behavior is learned during post-training instead of being layered over an existing chat format. IBM re-serialized a conventional instruction tuning corpus into LLMON, turning every prompt component into an addressable block with an execution block per turn. The task mix is the normal instruct mix of chat, multi turn dialogue, RAG and tool calling, which is why general scores stay close to the conventionally tuned models.
The injection resistance comes from one specific addition to that corpus. Training data includes decoy instruction and data blocks that sit in context but are deliberately left unbound, while the target output stays unchanged. The model therefore learns to follow the dependencies the execution block dictates and ignore the rest. Reinforcement learning follows in five sequential GRPO stages across reasoning, RLHF, knowledge calibration and math, and a final DPO stage uses 1,000 preference pairs built from the model responses to injection attempts.
IBM is explicit about the status of the resulting privilege rule. An instruction reached through an execution block is authoritative, and anything reached as input is material to read, not a command to follow. That rule is learned behavior, not a guarantee enforced by code, and IBM does not present LLMON as a sole defense for an agent.
Use in Existing Pipelines
Adoption friction is lower than the format change suggests. Teams name the parts of a turn and call apply_chat_template as usual, and the shipped template renders the LLMON form. For structured payloads, the LLMON toolkit on GitHub converts JSON to LLMON and back without loss, with example notebooks and workflow templates. The Mellea library has native support and converts its model calls automatically. An attention visualization demo on Hugging Face Spaces shows how the separation appears inside the model layers.
The format is also not a fixed schema. Teams can define their own tag names and structure for a domain, then tune a LoRA adapter on top of a LLMON model to read and write that vocabulary. IBM demonstrates this on ScienceWorld, a text based science task benchmark, with tags for task goals, planning rules, room state and inventory, plus a separate notebook for tool calling agents. That path matters for the small model case in particular. A 3B or 8B model running on device cannot lean on a frontier model filter in the cloud, so a structural defense trained into the model itself is one of the few options that travels with the weights.
My read is that LLMON is best understood as a claim about where prompt injection defense belongs. Filter based defenses ask a second system to catch bad text. LLMON asks the model to stop treating all text as the same kind of thing in the first place. The OPI gap is large enough that the claim deserves independent testing, and the honest limits, static attacks only, learned rather than enforced, preview rather than production, are stated by IBM itself rather than discovered by critics. That combination is rarer than it should be, and it makes the follow up results worth watching.
Limits and Unconfirmed Points
- IBM figures only: OPI, ASB and StruQ results and the general capability comparison are IBM evaluations. No third party replication under the same conditions was confirmed at publication.
- Static attacks only: the reported gains cover static indirect injections. Adaptive, multi turn attacks are still in progress, by IBM account.
- Learned, not enforced: the privilege rule is trained behavior. It is not a code level guarantee and should not be an agent only defense.
- Preview status: both models are experimental previews, not production releases. Use requires moving to Granite 4.1 base derived models, and domain vocabulary needs LoRA tuning.
FAQ
What is LLMON?
LLMON, short for LLM Object Notation and pronounced lemon, is an LLM native markup language from IBM. It marks instructions, data and requirements as separate tagged blocks, using reserved special tokens as delimiters and a unique ID for each block.
Which LLMON models did IBM release?
IBM released two experimental previews, granite-4.1-3b-LLMON-preview and granite-4.1-8b-LLMON-preview, under Apache 2.0. They start from Granite 4.1 base checkpoints and are not production models.
How much better is LLMON against prompt injection?
On the OPI benchmark of 9,000 attacks, IBM reports that the LLMON previews avoided 47 percentage points more attacks than the best frontier model tested and 95 points more than the best open source model. The figures are IBM measurements without independent replication yet.
Is the LLMON privilege rule a guarantee?
No. IBM states that the rule is learned behavior from training, not a guarantee enforced by code. IBM does not present LLMON as the only defense an agent should rely on.
Can existing JSON pipelines use LLMON?
Yes. IBM provides conversion tools and notebooks that translate JSON to LLMON and back without loss. The Mellea library also converts model calls to LLMON automatically.
Related Reading
- GPT-6 Cyber Release: ExploitGym 48.5% and Critical Rating, a security rated model release with a different defense posture
- OpenAI Bug Bounty: Critical Payouts Rise to $172,000, the incentive side of AI security reporting