For engineers, one of generative AI’s chief selling points is its ability to write code using natural language. It may seem surprising, then, to learn that getting the most out of generative AI increasingly requires them to write code.
Specifically, engineers can benefit from what’s known as prompt markup languages, which provide the ability to control AI model behavior with greater precision, a key advantage for teams tasked with leveraging AI in contexts where reliability, accuracy and quality are vital.
Read on for details on how organizations can benefit from prompt markup languages, including my own business’s experience using this technique to help accelerate enterprise transformation projects.
The what and why of prompt markup languages
A prompt markup language is a programming language designed to structure and manage prompts that users feed into AI models.
For example, engineers could use a prompt markup language to define the specific role and tools that an AI model or agent can use when completing a task, or point it to the data sources it should leverage.
It’s possible, in theory, to give AI systems instructions in natural language that achieve these same ends. The problem with natural language, however, is that it’s ambiguous, and there’s no guarantee that models will interpret natural language prompts in the precise way the user expects. Nor is it possible to ensure that the same input will always yield the same output.
Prompt markup solves these challenges by allowing engineers to take a programmatic approach to feeding instructions into AI models. They can still use natural language to formulate parts of their prompts, but they can rely on markup to define key aspects. By extension, they can elicit more predictable, deterministic behavior from AI systems.
The benefits of prompt markup languages
To put this in more concrete terms, prompt markup languages deliver benefits like the following:
- Component reusability: Markup makes it possible to build modular prompt components that can be reused across different AI workflows and applications.
- Prompt chaining: Engineers can pass the output from one prompt directly into another to create multi-step AI workflows.
- Prompt template support: With markup, teams can create reusable templates and change variables for different deliverables. This is much more efficient than writing a separate prompt for each one.
- Tool control: Markup makes it possible to specify exactly which tools an AI model should use and under what circumstances. This mitigates the risk of having the model use the wrong tools. It can also help to streamline costs by requiring AI systems to use the most cost-effective tooling.
- Conditionals and loops: Markup allows engineers to define structured logic, such as if-then conditions and repeatable loops, that the AI should follow consistently.
Prompt markup in the real world: Examples from the enterprise transformation space
By taking advantage of benefits like these, my organization (which specializes in helping clients transform and modernize enterprise software systems, such as SAP) has significantly accelerated transformation projects.
Many of our clients were already using AI to some degree to help with transformation. For instance, they were leveraging chatbots to help modernize legacy system code.
The problem they faced, however, was that complex enterprise software environments leave little room for error, and the open-ended nature of chatbots controlled using natural language didn’t always yield the necessary level of precision. Teams often had to iterate across multiple variations of prompts to get the results they sought, and even then, they weren’t always perfect.
To address this challenge, we built our own prompt markup language tailored for enterprise transformation. With a focus on capabilities like ontology awareness, audit-friendly evidence generation and repeatable workflows, the language has allowed us to leverage AI as an accelerator for transformation projects with a much higher degree of accuracy and predictability. It also saves a lot of time, thanks to the ability to leverage templates and prompt changes as a way of automating transformation tasks at scale.
Practical approaches to leveraging prompt markup
Admittedly, prompt markup languages are not without their challenges.
One is the need to generate prompt markup code, which generally takes longer than asking a natural language question, and typically requires an ‘engineering mindset’ to properly construct. It’s not for everyone in the enterprise.
Secondly, it’s critical for engineers to review and test markup code. While this might seem like extra work, it is very useful to prove to reviewers (such as auditors) that the right level of results is being generated.
However, without this type of approach, enterprises will constantly feel that AI is great, but not ready for the consistent, high-quality output they demand at scale. By addressing this challenge, prompt markup languages are poised to become a critical capability for all enterprises, especially those dealing with the complexities of large-scale IT-centric transformations.