#4557 Domain Specific Language for Prompting
#4557 Domain Specific Language for Prompting https://www.jetbrains.com/mps/ #4557 Define a domain specific language for LLM prompting Designing a Domain-Specific Language (DSL) for LLM prompting—let’s call it PromptScript —is an excellent way to move away from messy, unstructured text and toward predictable, reproducible, and structured AI interactions. A great prompting DSL needs to handle variable injection , role definition , few-shot examples , and output constraints cleanly. Here is a blueprint for a declarative, human-readable DSL designed for LLM workflows. The Core Blueprint: PromptScript 1. Keywords and Syntax @agent : Defines the persona, system instructions, and temperature. @context : Injects background data, documents, or variables. @examples : Groups few-shot input/output pairs. @execute : The main prompt instruction or user query. @schema : Enforces a structured output format (e.g., JSON, YAML). {{variable}} : Standard syntax for dynamic data binding. Example 1: Cu...