Dmitry Lande, Leonard Strashnoy
Semantic AI Framework for Prompt Engineering
// Available at ResearchGate
DOI: http://dx.doi.org/10.13140/RG.2.2.21116.24964 (Mart 9, 2025). - 14 pp.

The article presents a semantic framework for prompt engineering that utilizes natural language for creating and managing artificial intelligence systems. The primary goal is to represent prompts as analogs of programming constructs (conditional statements, loops, functions) through the mathematical formalization of their logic and interactions.

The paper describes key primitives ("building blocks"), such as "Condition," "Loop," and "Function," along with methods for composing these primitives to construct complex systems, including semantic networks. Optimization techniques for prompts are explored, including gradient descent in the instruction space and a "swarm of virtual experts" model to enhance accuracy. Additionally, the concept of a "prompt language" is proposed as a domain-specific language for no-code AI development, lowering the entry barrier for users and facilitating the creation of complex logical structures through textual instructions.
Keywords: prompt engineering, no-code approach, mathematical formalization, semantic network,
primitives, composition, swarm of virtual experts, prompt language