Table of Contents
Fetching ...

LLMON: An LLM-native Markup Language to Leverage Structure and Semantics at the LLM Interface

Michael Hind, Basel Shbita, Bo Wu, Farhan Ahmed, Chad DeLuca, Nathan Fulton, David Cox, Dan Gutfreund

Abstract

Textual Large Language Models (LLMs) provide a simple and familiar interface: a string of text is used for both input and output. However, the information conveyed to an LLM often has a richer structure and semantics, which is not conveyed in a string. For example, most prompts contain both instructions ("Summarize this paper into a paragraph") and data (the paper to summarize), but these are usually not distinguished when passed to the model. This can lead to model confusion and security risks, such as prompt injection attacks. This work addresses this shortcoming by introducing an LLM-native mark-up language, LLMON (LLM Object Notation, pronounced "Lemon"), that enables the structure and semantic metadata of the text to be communicated in a natural way to an LLM. This information can then be used during model training, model prompting, and inference implementation, leading to improvements in model accuracy, safety, and security. This is analogous to how programming language types can be used for many purposes, such as static checking, code generation, dynamic checking, and IDE highlighting. We discuss the general design requirements of an LLM-native markup language, introduce the LLMON markup language and show how it meets these design requirements, describe how the information contained in a LLMON artifact can benefit model training and inference implementation, and provide some preliminary empirical evidence of its value for both of these use cases. We also discuss broader issues and research opportunities that are enabled with an LLM-native approach.

LLMON: An LLM-native Markup Language to Leverage Structure and Semantics at the LLM Interface

Abstract

Textual Large Language Models (LLMs) provide a simple and familiar interface: a string of text is used for both input and output. However, the information conveyed to an LLM often has a richer structure and semantics, which is not conveyed in a string. For example, most prompts contain both instructions ("Summarize this paper into a paragraph") and data (the paper to summarize), but these are usually not distinguished when passed to the model. This can lead to model confusion and security risks, such as prompt injection attacks. This work addresses this shortcoming by introducing an LLM-native mark-up language, LLMON (LLM Object Notation, pronounced "Lemon"), that enables the structure and semantic metadata of the text to be communicated in a natural way to an LLM. This information can then be used during model training, model prompting, and inference implementation, leading to improvements in model accuracy, safety, and security. This is analogous to how programming language types can be used for many purposes, such as static checking, code generation, dynamic checking, and IDE highlighting. We discuss the general design requirements of an LLM-native markup language, introduce the LLMON markup language and show how it meets these design requirements, describe how the information contained in a LLMON artifact can benefit model training and inference implementation, and provide some preliminary empirical evidence of its value for both of these use cases. We also discuss broader issues and research opportunities that are enabled with an LLM-native approach.
Paper Structure (52 sections, 14 figures, 5 tables)

This paper contains 52 sections, 14 figures, 5 tables.

Figures (14)

  • Figure 1: (A) Example Prompt, (B) Prompt in LLMON Notation
  • Figure 2: Example of executing a particular instruction in LLMON
  • Figure 3: Example of executing a particular instruction with a parameter in LLMON
  • Figure 4: Example illustrating defense against prompt injection attacks in LLMON
  • Figure 5: LLMON Grammar. terms in UPPER_CASE are nonterminals. terms in single quotes or lowercase are terminals. The table provides current values for the nonquoted terminals. "user_tag_text" represents a typical identifier extended to include ":" and "." as illustrated in examples in Section \ref{['sec-examples']}. "object", "item", and "list" are exactly those strings.
  • ...and 9 more figures