---
title: "LLMON: a markup language for language models in Granite 4.1 3B and 8B, aimed at indirect prompt injection attacks"
url: https://aibenchmark.gr/en/news/llmon-markup-language-granite-4-1-3b-8b-indirect-prompt-injection/
language: en
published: 2026-11-16T16:19:25.354Z
updated: 2026-11-16T17:19:30.010Z
site: "AI Benchmark"
section: "Technical Reports"
---

# LLMON: a markup language for language models in Granite 4.1 3B and 8B, aimed at indirect prompt injection attacks

Two experimental versions of Granite 4.1, with 3B and 8B parameters, learn a markup that separates instructions from data. The results provided show near-zero attack success in one test.

> Written with AI from the sources listed below. Editorial responsibility: Konstantinos Perros. How we write: https://aibenchmark.gr/en/how-we-write/

## Key facts

- LLMON is an XML-style markup language in which the boundaries of context sections are declared with reserved special tokens rather than plain characters. [1]
- Two experimental models were released, granite-4.1-3b-LLMON-preview and granite-4.1-8b-LLMON-preview, based on the Granite 4.1 base models. [1]
- On the OPI benchmark, robustness is defined as 1 − attack success rate, and the authors report that LLMON avoids 47% more attacks than the best frontier model they tested and 95% more than the best open-source one. [1]
- General capability, according to the authors, remains at the level of Granite 4.1 Instruct on typical benchmark categories. [1]
- Training includes five successive GRPO stages and a final DPO stage with a thousand preference pairs, and the releases are described as unsuitable for production. [1]

## What LLMON is and what it tries to solve

The team behind Granite 4.1 presented LLMON (LLM Object Notation) in a Hugging Face post dated 12 November 2026. It is a markup language that explicitly conveys to the model the structure and meaning of the sections of the context: system prompt, previous conversation turns, retrieved documents, tool responses, output constraints and reasoning chains.

According to the authors, this structure usually remains implicit or is encoded in formats such as JSON, which were not designed to be read by language models. This, they write, is partly responsible for the fragility of smaller models and gives attackers room for prompt injection.

In LLMON, each coherent section carries a semantic tag, wrapped in reserved tokens. Unique identifiers make it possible to bind an instruction to the data it applies to, just as an argument is bound to a function. In comparing with JSON, the post notes that there structural characters may also appear in ordinary text, while nesting depth is tracked by counting braces, something transformers are weak at over long distances. Lossless converters from JSON to LLMON and back are provided.

The markup does not replace chat templates but enriches them. The models have their own template: the user names the parts of a turn (instruction, data, requirement) and marks which ones will be bound to the final execution block. Block identifiers are two characters and cost two tokens.

## Robustness and general capability measurements

The comparison was made against many open and closed models. The main test was the OPI benchmark, which places the malicious instruction inside the data of classic NLP tasks and applies various attack strategies. Robustness is defined as 1 − attack success rate, that is, the share of attacks in which the model does not execute the embedded instruction.

The authors report that all models other than LLMON execute the malicious instructions with high probability. LLMON, according to the same report, avoids 47% more attacks than the best frontier model they tested and 95% more than the best open-source model. Similar trends are said to appear on ASB and StruQ. These are measurements by the creators themselves and not an independent evaluation. The post does not give per-model numerical tables here.

As for general capability, the authors report that on typical benchmark categories the LLMON models perform at the same level as Granite 4.1 Instruct. They suggest that those already testing Granite 4.1 3B or 8B replace the model with the LLMON version, with no additional conversion process.

## Training, limits and next steps

The models start from Granite 4.1 base checkpoints and not from the ready-made instruct ones, so that LLMON behavior is learned in post-training. Six delimiters were installed as reserved single tokens in the tokenizer. A conventional instruction-tuning corpus (chat, multi-turn, RAG, tool calling) was rewritten in LLMON, and instructions and decoy data were added that are present in the context but are not bound to any execution block, with the desired output unchanged.

Five successive GRPO stages followed, covering multi-domain reasoning, RLHF, knowledge calibration and mathematics. The last stage was DPO on a thousand preference pairs from the model's own responses to instruction-injection attempts.

The authors set explicit limits. The tests concern static indirect attacks, for which the separation of instructions and data is designed. For adaptive attacks that evolve over many turns, work continues. The rule that only the instruction arriving through an execution block is authorized is, as they stress, learned behavior and not an enforced guarantee. The releases are experimental, suitable for testing but not for production.

LLMON is not tied to a fixed schema. As an example, the authors defined their own vocabulary for ScienceWorld, a benchmark in which an agent performs elementary scientific tasks one command at a time, and trained a LoRA on top of an LLMON model. An accompanying notebook compares the adapter with the untrained base model. A GitHub repository, an attention visualization demo and two arXiv papers were also published.

## Questions and answers

**Can the LLMON models be used in production systems?**

Not yet. The authors describe the releases as an experimental preview, suitable for exploration and evaluation but not for production.

**Does anyone with JSON pipelines need to rewrite them?**

No. Tools and notebooks are provided that convert JSON to LLMON and back without loss.

**Does LLMON cover all prompt injection attacks?**

No. The measurements concern static indirect attacks, while work continues on adaptive multi-turn attacks, and the protection is learned behavior, not a guarantee.

## Sources

1. Hugging Face: [LLMON: An LLM-Native Markup Language, now in Granite 4.1 3B and 8B](https://huggingface.co/blog/ibm-granite/llmon-an-llm-native-markup-language-now-in-granite)
