LLMON: An LLM-native Markup Language to Leverage Structure and Semantics at the LLM Interface
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: Today's paper: "LLMON: An LLM-native Markup Language to Leverage Structure and Semantics at the LLM Interface".
Jane: The gist The work introduces an LLM-native markup language, LLMON, to provide structure and semantic metadata for text to improve model training, prompting, and inference implementation.
Tom: First, who's behind it and why it matters.
Paper summary: Tom: So we're looking at this paper titled "LLMON: An LLM-native Markup Language to Leverage Structure and Semantics at the LLM Interface." Basically, it's addressing a big problem where prompts have instructions mixed up with the actual data.
Jane: Right, so the core idea here is that text is just a string of characters, but for an AI, that text has structure and meaning behind it that's lost in plain text. This paper introduces LLMON to give those structures—like separating an instruction from the data—a natural way to communicate them to the model.
Lu: The authors say this is important because without this separation of control and payload, you get these security risks, like prompt injection attacks where someone can sneak instructions into your input and confuse the AI.
Meng: I'm thinking about deployment here; if we don't have a clear way to tell the model what it should do versus what it should look at, managing that at scale gets really messy.
Lalam: Lalam sees this as a way to make sure the model doesn't just blindly follow every piece of text it reads. It adds explicit structural signals so the AI learns which parts are commands and which parts are context, like "instr" or "data" spans <ref:2603.22519#pg3>.
Tom: Exactly. The paper claims that this richer metadata information helps in model training, prompting, and actually running the models later on to improve accuracy and safety <ref:2603.22519#pg3>.
Jane: It's like giving the AI a kind of native markup language so it doesn't have to learn some weird syntax; if you can communicate naturally, you should be able to talk to the model better with this structure.
Lu: They lay out several design requirements for this LLM-native markup language, starting with needing user-defined tags so you can express semantic concepts like "email," "poem," or "instruction" <ref:2603.22519#pg3>.
Meng: And they also stress the need for named instances, which means you can name parts of the text so you can refer back to them later, kind of like anchors in HTML <ref:2603.22519#pg3>.
Tom: Then there's this point about explicit nesting names, where they suggest capturing hierarchy clearly with tags like "email.header.from" instead of just nesting the text three levels deep <ref:2603.22519#pg3>.
Jane: And they also mention that the annotation should come before the text, which is a prefix rather than a postfix, so it's easier for the model to learn while it's processing things <ref:2603.22519#pg3>.
Paper summary: Lu: There’s also this idea of convertibility, meaning you can easily move between existing structured formats like JSON and this new markup language in both directions <ref:2603.22519#pg3>.
Meng: And they don't need worrying about escaping sequences, which is nice because it keeps the system simpler and less prone to errors <ref:2603.22519#pg3>.
Tom: Moving on to how LLMON actually looks, they describe Machine LLMON as being verbose and interacting with the model directly, using a small set of special tokens instead of complex markup delimiters <ref:2603.22519#pg4>.
Jane: So the syntax itself is designed to be human-friendly, using something like "tagname" for the instruction and then "/tagname/" to close it off, which is a common approach in markup languages <ref:2603.22519#pg4>.
Lu: This Machine LLMON representation converts into special tokens that make the structural boundaries totally explicit in the token stream so both the model and inference systems can reliably see spans like instructions or data artifacts <ref:2603.22519#pg4>.
Meng: That's useful for production because it means we can deterministically identify those spans at inference time, which is a huge win for reliability <ref:2603.22519#pg4>.
Tom: The paper then talks about what this information does during model training. It introduces three key signals: role separation where tokens inside "instr" spans are control and tokens inside "data" spans are the payload <ref:2603.22519#pg5>.
Jane: And boundary clarity, meaning those dedicated open and close delimiters make the boundaries of a span very clear, even in really long or complicated prompts <ref:2603.22519#pg5>.
Lu: The third signal is referential binding where instance identifiers let execution reference specific objects instead of relying on vague positional cues like "the above text" <ref:2603.22519#pg5>.
Tom: These signals encourage the model to condition its behavior on explicitly selected instructions while treating non-selected spans as just context <ref:2603.22519#pg5>.
Jane: Now for inference, they show how you can use this information by applying boundary-constrained masking, which parses the LLMON annotations to identify those boundaries and uses structured masking strategies <ref:2603.22519#pg6>.
Meng: That structured masking lets us do deterministic instruction selection at inference time; you can mask out the distracting instructions so only the tokens related to the command are attended to during generation <ref:2603.22519#pg6>.
Tom: And for prompt rejection, untrusted content or policy violations can be systematically excluded from the response's attention, ensuring it doesn't influence what gets generated <ref:2603.22519#pg6>.
Paper summary: Jane: The preliminary empirical evidence shows pretty solid results. They found that LLMON-structured post-training improved execution control for both backbones substantially, with execution accuracy going above eighty-three percent across token scales <ref:2603.22519#pg7>.
Lu: And at inference time, applying constrained masking with LLMON boundaries consistently improved robustness to those distractor instructions across all models <ref:2603.22519#pg7>.
Meng: The training-time results were an average improvement of seventy-four point two percentage points, and the inference time results were an average improvement of twenty-nine point three percentage points <ref:2603.22519#pg7>.
Tom: Those are some big numbers for structure alone, especially that seventy-four point two point jump in training control <ref:2603.22519#pg7>.
Jane: It really shows that this isn't just a theoretical idea; it translates into tangible improvements when you look at how the model is trained and how it actually performs its job during inference <ref:2603.22519#pg7>.
Lu: What this paper suggests is that having an LLM-native markup language lets us communicate concepts and structures with LLMs in a way plain text prompts just can't do reliably <ref:2603.22519#pg3>.
Meng: So, for me, the implication is that we can build systems where we know precisely what the model is supposed to execute, which makes deployment much more predictable and less prone to failure <ref:2603.22519#pg4>.
Tom: And it opens up research directions about how LLMON interacts with tokenization strategies and inference-time techniques like constrained decoding or tool orchestration <ref:2603.22519#pg8>.
Jane: Overall, this work introduces LLMON to give the AI a way to understand structure and semantics beyond just what's in the raw text, which is really useful for making these models safer and more accurate <ref:2603.22519#pg1>.
Lu: The paper concludes that the potential value of an LLM-native markup language is shown through those preliminary experiments, demonstrating average improvements of seventy-four point two and twenty-nine point three percentage points for model training and inference implementation <ref:2603.22519#pg8>.
Meng: It's a solid technical contribution because it shows how adding explicit metadata can yield measurable gains in control during both the learning phase and when we actually run the models <ref:2603.22519#pg7>.
Tom: We see that while plain text is familiar, it lacks the necessary separation for robust instruction and data handling, which this LLMON language solves by making structure native to the interaction <ref:2603.22519#pg1>.
Jane: So what this means for us is that future work should really look at how these LLMON-style annotations fit into the whole training pipeline and how they interact with other techniques like constrained decoding <ref:2603.22519#pg8>.
Conclusion: Tom: So we're wrapping up this look at LLMON, an LLM-native markup language designed to give text a structure that goes beyond just a string of characters for the AI.
Jane: Right, so before we wrap up, let's quickly recap what this paper is actually about. It’s introducing LLMON to help communicate instructions and data more naturally to the model during training and when we run it later.
Lu: Exactly. The authors lay out these design requirements first—things like user-defined tags, named instances for referring back to text, and explicit nesting names so the hierarchy is clear.
Meng: I see that structure is key because it helps us manage things at scale, you know? It makes the input much more predictable when we're deploying models in production.
Lalam: And what this structure does during training is really about making role separation clearer, where tokens inside an "instr" span are control and tokens inside a "data" span are the payload.
Tom: That distinction between control and payload is what I’m looking for because it directly addresses how models learn to behave correctly under different prompts.
Jane: It seems like they also show this structure benefits inference too, where you can use boundary-constrained masking to isolate instructions or reject untrusted content from the response.
Lu: The empirical evidence they present is pretty solid on that front—they saw improvements in execution control and robustness after applying these LLMON annotations.
Meng: Seventy-four point two percentage points improvement in training control sounds like a real win if you're looking at how much effort goes into getting the model to follow instructions reliably.
Tom: And for inference, that twenty-nine point three percentage points improvement shows it translates directly into more stable behavior when we’re actually using the model in a live system.
Jane: So what this means for us is that we have a way to give the AI explicit structural signals instead of just hoping it understands context from plain text alone.
Lu: It opens up new avenues for research on how these annotations interact with different tokenization strategies and how they influence inference-time system techniques like constrained decoding.
Tom: That’s where things get interesting, because we need to figure out the best way to feed this rich metadata into the actual model pipeline.
Jane: Next time we talk about LLMON, we'll look at those specific research directions and how they might shape the future of instruction following in AI.
IBM Research
cs.SE, cs.AI, cs.PL
Submitted: 2026-03-23
Updated: 2026-10-15
Comments: 28 pages
Code: https://github.com/guidance-ai/guidance
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 91/100
The gist: The gist The work introduces an LLM-native markup language, LLMON, to provide structure and semantic metadata for text to improve model training, prompting, and inference implementation.
Key concepts
- LLM-native markup language
- A structured language specifically designed for communicating the internal structure and meaning of text directly to a Large Language Model (LLM). It uses special tags and syntax that the model can natively understand, moving beyond simple strings to convey complex context.
- Machine LLMON
- The standardized version of LLMON that preserves its structure while using a small set of special tokens. This conversion makes structural boundaries explicit in the model's token stream, allowing both training and inference systems to reliably identify distinct segments like instructions or data artifacts.
- Role Separation
- A signal introduced by LLMON training data where tokens inside specific spans (like 'instr') represent control signals, while tokens in other spans ('data') represent the contextual payload. This teaches the model to distinguish between what it needs to execute and what is just context.
- Boundary-Constrained Masking
- An inference technique that parses LLMON annotations to identify explicit boundaries around text segments. This allows systems to apply structured masking, ensuring that only the intended instruction tokens are attended to during generation, improving robustness against distractions.
Terminology
Summary
The gist The work introduces an LLM-native markup language, LLMON, to provide structure and semantic metadata for text to improve model training, prompting, and inference implementation.
Design Requirements for an LLM-Native Markup Language
The design of an LLM-native markup language focuses on facilitating the communication of metadata information to the LLM in a native way The next two subsections enumerate important design requirements and considerations for an LLM-native markup language.
1 User-defined tag The markup language needs to allow the expression of semantic concepts as user-defined tags. This will allow the communication of meta information about a text passage, such as whether it is an instruction, data, email, or poem.
2 Named Instances The markup language needs to have a mechanism to name text segments with a unique identifier. It is useful to be able to refer to other entities within the data, similar to links and anchors in HTML.
3 Explicit Nesting Names Use nesting structures with tags that capture the nesting information explicitly, such as “email.header.from”, rather than a nesting structure with three levels: “email”, “header”, “from”. Nesting structures are natural for a hierarchical technology, such as a language parser, but are not as natural to the sequential nature of LLMs.
4 Prefix The annotation for a text segment should appear before the text segment (prefix) rather than after it (postfix). This will enable the LLM to learn the annotation while processing the text.
5 Convertibility We should be able to easily convert between existing structured representations, such as JSON, and the markup language in both directions. Given the large amount of data that exists in structured formats, it is crucial that an LLM-native markup can represent this data.
6 No escaping There is no need for “escaping” sequences. As the markup language can use special tokens (discussed in Section 5) to signify meta information, there is no need for “escaping” sequences.
Introducing LLMON and Syntax
Two key orthogonal properties for understanding the LLMON language are its expressive capability (what concepts can it express) and its syntax (how the capability is written). The paper defines LLMON to be a human-friendly syntax to express the languages key concepts. Machine LLMON is described as the more verbose markup language that interacts with an LLM and satisfies the design requirements from Section 2.2. Conceptually, the goal of the LLMON markup language is to provide the capability to highlight various segments (or spans) of text with a special “color” or tag that signifies meta information about that text segment. To express this kind of meta information, we need to identify two quantities: the segment of text and the “color” tag that should be associated with that text. We address these needs by enclosing the text segment inside phrases that indicate the tag (or “color”) of the segment, which is a popular approach for markup languages. In our case we use the sequence “textbackslash tagname” to indicate 5 page 6, and “/tagname/” to indicate the end of the segment of type “tagname”.
Machine LLMON and Tokenization
Machine LLMON preserves the structure and semantics of LLMON while expressing them using a small set of special tokens. These special tokens are designed to make structural boundaries explicit in the token stream so that both the model and inference-time systems can reliably identify spans such as instructions, data artifacts, and execution bindings. A structured input may be authored in the human-friendly LLMON syntax. Second, this representation is deterministically converted to Machine LLMON, replacing markup delimiters and connectors with the corresponding special tokens. Finally, the tokenizer maps the resulting string into token identifiers, ensuring that the structural markers appear as stable, identifiable tokens in the model input. This process ensures that structural boundaries (such as the start and end of an instruction span or an execution binding) are visible in the token stream.
Leveraging LLMON Information During Model Training
LLMON introduces explicit structural signals into the training data that are difficult to encode reliably using plain text prompts alone. What training learns from LLMON LLMON-annotated examples provide three key signals. First, role separation, where tokens inside “instr” spans represent control, while tokens inside “data” spans represent contextual payload. Second, boundary clarity, where dedicated open/close delimiters make span extents explicit even in long or composite prompts. Third, referential binding, where instance identifiers allow execution to reference specific instruction or data objects rather than relying on positional cues such as “the above text”. These signals encourage the model to condition behavior on explicitly selected instructions while treating non-selected spans as non-authoritative context.
Leveraging LLMON Information During Model Inference
LLMON can be leveraged during inference by applying boundary-constrained masking (described in Section 5.3) which parses LLMON annotations to identify boundaries and applies structured masking strategies that regulate generative computation according to explicit delimiters. This enables deterministic instruction selection and data isolation at inference time. For instruction selection, multiple candidate instructions can coexist in the same input sequence. By masking the distracting instructions, we can guarantee that during generation, the only tokens which are attended to are from the instruction to be invoked, ensuring the correct behavior. Similarly, for prompt rejection, untrusted or policy-violating content can be systematically excluded from the response’s attention, guaranteeing that it does not influence the forward generation.
Empirical Evidence of Value
Preliminary empirical evidence shows significant improvements in model training and inference implementation. Specifically, LLMON-structured post-training improved execution control for both backbones substantially, with execution accuracy rising dramatically to above 83% across token scales. Furthermore, applying constrained masking with LLMON boundaries at inference time consistently improves robustness to distractor instructions across all models. Training-time results improved by an average of 74.2 percentage points, and inference time results improved by an average of 29.3 percentage points.
Future Research Directions
Future work should explore the role of LLMON-style annotations at different stages of the model training pipeline. Another potential research direction involves the interaction between LLMON and tokenization strategies. Finally, further work is needed to understand how LLMON interacts with inference-time system techniques such as constrained decoding and tool orchestration.
The paper concludes that the potential value of an LLM-native markup language is demonstrated through preliminary experiments showing average improvements of 74.2 and 29.3 percentage points for model training and inference implementation, respectively. The work enumerates design requirements, introduces LLMON to satisfy them, and describes how this additional metadata can benefit two important use cases: model training and inference implementation.
Acknowledgments We would like to thank David Grove, Kush Varshney, Martin Hirzel, and Danish Contractor for feedback on earlier versions of this work.
Improvements for AI systems
- Bold Header: Model Training with Instruction-Data Separation
This enables models to learn to treat non-selected spans as non-authoritative context
by embedding structural boundaries directly into the token stream (via Machine LLMON), enabling the model to learn which spans represent control, which should be treated as data.
- Bold Header: Inference Robustness via Boundary-Constrained Masking
The improved system can improve robustness to distractor instructions during inference by applying boundary-constrained masking,
allowing for deterministic instruction selection and data isolation at inference time
by parsing LLMON annotations to identify boundaries.
- Bold Header: Identifier-Based Execution Control
The AI system can reliably execute specific instructions using identifier-based execution calls
because LLMON introduces a mechanism where the model can condition behavior on explicitly selected instructions rather than relying on positional cues such as 'the above text'.
Sources
- Training Verifiers to Solve Math Word Problems
- Activated LoRA: Fine-tuned LLMs for Intrinsics
- Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection
- Measuring Mathematical Problem Solving With the MATH Dataset
- LLMs Get Lost In Multi-Turn Conversation
- Grammar-based Neural Text-to-SQL Generation
- Attack Atlas: A Practitioner's Perspective on Challenges and Pitfalls in Red Teaming GenAI
- Efficient Guided Generation for Large Language Models
- Qwen2.5 Technical Report
- Prompt Orchestration Markup Language
- Instruction-Following Evaluation for Large Language Models
Related papers
- Falsification-Based Verification of LLM-Generated Optimization Models: Sound Test Batteries and Their Detection Limits
- GitSkills: A Dataset of Agent Skills on GitHub
- SABER: Benchmarking Operational Safety of LLM Coding Agents in Stateful Project Workspaces
- PackMonitor: Enabling Zero Package Hallucinations Through Decoding-Time Monitoring
- IntentCoding: Amplifying User Intent in Code Generation
- Incentives and Outcomes in Bug Bounties