We propose a meta-language-based approach that enables Large Language Models (LLMs) to generate structured, machine-readable outputs (MLDS) tailored to domain-specific needs. Unlike conventional methods tied to fixed formats like JSON or XML, our approach embeds a freely definable schema, called Meta-Language-defined Structure Instruction (MLDSI), directly into the prompt, guiding LLMs to produce valid outputs. We evaluated the method in two domains: 3D scene generation and automotive security modeling. Across 320 generated MLDS artifacts, we achieved a structural validity rate of 89.1%, with most errors linked to minor parsing issues. Compared to frameworks such as LangChain and Pydantic, our MLDS approach reduced setup complexity by over 80%, while maintaining comparable structural accuracy. The artifacts were readily usable and adaptable, either manually or through further prompting, demonstrating the method’s flexibility. MLDSI-guided prompting thus provides an efficient bridge between natural language and formal tool input, enabling rapid prototyping and easier integration of generative models into domain-specific workflows.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Conveying Natural Language Descriptions Into Meta-Language-Defined Structures

  • Alexander Fischer,
  • Louis Burk,
  • Christoph Scharnagl,
  • Ramin Tavakoli Kolagari,
  • Uwe Wienkop

摘要

We propose a meta-language-based approach that enables Large Language Models (LLMs) to generate structured, machine-readable outputs (MLDS) tailored to domain-specific needs. Unlike conventional methods tied to fixed formats like JSON or XML, our approach embeds a freely definable schema, called Meta-Language-defined Structure Instruction (MLDSI), directly into the prompt, guiding LLMs to produce valid outputs. We evaluated the method in two domains: 3D scene generation and automotive security modeling. Across 320 generated MLDS artifacts, we achieved a structural validity rate of 89.1%, with most errors linked to minor parsing issues. Compared to frameworks such as LangChain and Pydantic, our MLDS approach reduced setup complexity by over 80%, while maintaining comparable structural accuracy. The artifacts were readily usable and adaptable, either manually or through further prompting, demonstrating the method’s flexibility. MLDSI-guided prompting thus provides an efficient bridge between natural language and formal tool input, enabling rapid prototyping and easier integration of generative models into domain-specific workflows.