Litcius/Paper detail

Model-Driven Prompt Engineering

Robert Clarisó, Jordi Cabot

202327 citationsDOI

Abstract

Generative artificial intelligence (AI) systems are capable of synthesizing complex content such as text, source code or images according to the instructions described in a natural language prompt. The quality of the output depends on crafting a suitable prompt. This has given rise to prompt engineering, the process of designing natural language prompts to best take advantage of the capabilities of generative AI systems.Through experimentation, the creative and research communities have created guidelines and strategies for creating good prompts. However, even for the same task, these best practices vary depending on the particular system receiving the prompt. Moreover, some systems offer additional features using a custom platform-specific syntax, e.g., assigning a degree of relevance to specific concepts within the prompt.In this paper, we propose applying model-driven engineering to support the prompt engineering process. Using a domain-specific language (DSL), we define platform-independent prompts that can later be adapted to provide good quality outputs in a target AI system. The DSL also facilitates managing prompts by providing mechanisms for prompt versioning and prompt chaining. Tool support is available thanks to a Langium-based Visual Studio Code plugin.

Topics & Concepts

Computer scienceDomain-specific languageSoftware engineeringModel-driven architectureProcess (computing)Plug-inDomain (mathematical analysis)Natural languageSyntaxDigital subscriber lineCode generationQuality (philosophy)Programming languageUnified Modeling LanguageChainingRelevance (law)Artificial intelligenceSoftwarePsychologyMathematical analysisMathematicsPsychotherapistPhilosophyKey (lock)Computer securityTelecommunicationsEpistemologyPolitical scienceLawSoftware Engineering ResearchModel-Driven Software Engineering TechniquesNatural Language Processing Techniques