<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>November</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Automated Design of Complex Systems Using Generative Models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Denys Symonov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleksandr Palagin</string-name>
          <email>palagin_a@ukr.net</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yehor Symonov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bohdan Zaika</string-name>
          <email>zaikabohdan5@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>V.M. Glushkov Institute of Cybernetics of the National Academy of Sciences (NAS) of Ukraine</institution>
          ,
          <addr-line>Akademika Glushkova Avenue 40, 03187, Kyiv</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2026</year>
      </pub-date>
      <volume>2</volume>
      <fpage>0</fpage>
      <lpage>21</lpage>
      <abstract>
        <p>The article proposes a formalized model and methods for the automated design of complex multicomponent systems (CMS) using an integrated approach that combines architectural modeling, prompt engineering, and large language models (LLM). The developed model describes the state of the process as a typed tuple that includes a knowledge base, an architectural graph, a mapping of components to specifications, a set of artifacts, and validation reports. Methods for managing the generative orchestrator are proposed, which ensure the achievement of target states with minimal risk for given non-functional requirement budgets and correctness invariants. To increase reliability, mechanisms for reproducibility and artifact auditing are provided. The risk-oriented iterative improvement strategy combines mathematical optimization with adaptive queries to LLM, which allows achieving a balance between the quality of decisions and computational costs. The effectiveness of the approach is demonstrated by the example of a multi-level FMCG supply chain using Monte Carlo simulations, which showed improvements in OTIF performance, a reduction in unfulfilled commitments, and optimization of delivery costs. The results confirm the potential of the developed model for practical application in the engineering of complex systems in dynamic environments.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Complex Systems</kwd>
        <kwd>Generative Models</kwd>
        <kwd>Architectural Modeling</kwd>
        <kwd>Large Language Models</kwd>
        <kwd>Prompt Engineering</kwd>
        <kwd>Iterative Optimization</kwd>
        <kwd>Scenario Modeling 1</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>methods, non-functional requirements budgeting, and simulation approaches allows the creation of
systems that not only meet current constraints but are also capable of iterative self-improvement [2].</p>
      <p>At the same time, there are a number of scientific and practical problems related to ensuring the
reproducibility of results, integrating heterogeneous components and data sources, and verifying the
correctness of decisions made in a dynamic environment. Traditional design methods often prove to
be insufficiently flexible or excessive in terms of resources for solving real-time problems, especially
in conditions of multi-level optimization and high variability of scenarios.</p>
      <p>The goal of this study is to develop a formal model for automated system design that integrates
an architecture-oriented approach, risk-oriented management, budgeting of non-functional
requirements, and the use of LLM as an intelligent orchestrator. The proposed model is focused on
iterative improvement of the system architecture, taking into account changes in the environment
and target performance indicators, ensuring a balance between functional and non-functional
requirements.</p>
      <p>To validate the approach, a multi-level FMCG Supply Chain case was used, which allows assessing
the effectiveness of the model under conditions of stochastic demand fluctuations, variability of
delivery times, and resource constraints. Simulation experiments using Monte Carlo methods
demonstrated that the proposed methodology can improve service levels, reduce unmet demand, and
lower logistics costs compared to baseline and rule-based approaches. In contrast to previous studies
that addressed separate aspects of formal modelling or generative design, this work unifies
architectural modelling, risk-oriented optimisation, and LLM-based orchestration within a single
reproducible framework. Thus, the study contributes to the development of tools for creating
reproducible, adaptive, and effective solutions in the field of automated design of complex systems.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Theoretical foundations of complex systems design</title>
      <p>The design of complex multi-component systems (CMS) is one of the key tasks of modern
engineering and applied computer science. Such systems are distinguished by their multi-level
structure, heterogeneity of components, high degree of interdependence, and significant influence
of external factors, including stochastic ones. Classic approaches to their development are based on
methods of system analysis, architectural modeling, and requirements engineering, which ensure the
formalization of functional and non-functional characteristics. However, in dynamic environments
where system parameters and objectives change during operation, there is a need for adaptive,
iteratively controlled design methods. Analogous adaptative mechanisms have been used in models
of attitude formation [3].</p>
      <p>One of the modern directions in the development of such methods is the integration of formal
architectural models with generative intelligent systems, in particular Large Language Models (LLM).
LLMs are capable of working with unstructured and semi-structured knowledge, identifying hidden
dependencies, synthesizing design alternatives, and forming recommendations based on the history
of previous decisions. This creates the conditions for automating a significant part of the design
process, including requirements analysis, architectural solution generation, and correctness
invariant verification [4].</p>
      <p>The key mechanism for engineers to interact with LLM in design tasks is prompt engineering (the
development of structured input queries that form a clear context for obtaining relevant and
reproducible results). Within the scope of CMS design, prompts may include a description of the
target state, constraints (e.g., budget for non-functional requirements), architectural precedents, and
risk assessment metrics. This allows LLM to act as a generative orchestrator that aligns multistep
changes to the system architecture with specified optimization criteria.</p>
      <p>Prompt engineering, combined with formal architectural models, enables a closed iterative design</p>
      <sec id="sec-2-1">
        <title>5]. This approach combines the rigor of a</title>
        <p>mathematical model with the flexibility of generative tools, which increases the efficiency and speed
of adaptation of complex systems to environmental changes.</p>
        <p>Thus, the modern paradigm of CMS design involves the integration of two complementary
components: formal methods that ensure the verification and reproducibility of solutions, and
prompt engineering as a means of controlled application of the generative capabilities of LLM [6-8].
This creates the foundation for building adaptive and scalable engineering processes capable of
ensuring an optimal balance between development speed, solution quality, and risk level.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Mathematical model and methodology for automated design of complex systems</title>
      <p>3.1.</p>
      <sec id="sec-3-1">
        <title>Formal problem statement of automated CMS design</title>
        <p>Imagine a set of stakeholders who submit an initial request for the design of complex systems  0
with functional and non-functional requirements, environmental constraints, and business
annotated vertices-components and edges-flows, in which vertices correspond to functional services
and edges correspond to interaction contracts.</p>
        <p>Let us assume that all stakeholder requirements can be represented as a finite set of typed
messages, semantically consistent with a predefined domain vocabulary (ontology). Also, calls to the
generative model LLM are deterministic for fixed parameters  = (
,  , system_ctx), where
seed is a number that sets the initial state of the random value generator so that each call to the model
produces the same results; T
be (the smaller the value, the less diverse); system_ctx is a text instruction or setting that provides a
artifacts. The Tools toolset (synthesis of diagrams, OpenAPI/Proto contracts, Docker/Kubernetes
configurations, security and scalability analysis, etc.) can be called as a deterministic function over
its inputs [9-11].</p>
        <p>
          = 〈 ,  ,  , Φ,  ,  〉,
(
          <xref ref-type="bibr" rid="ref1">1</xref>
          )
artifacts: 
templates, 
sev, and 
where
        </p>
        <p>= {(  ,   )} =1 is a knowledge base consisting of m YAML documents; each of the key
  = 〈
version 
area; 
ℎ , 

〉 consists of a hierarchical path in the document tree (
ℎ ) and a semantic
 ∈ ℕ3; each   satisfies the schema  ℎ(  ) and fixes the ontological core of the subject
∈ Σ∗ is a master prompt (the minimum sufficient compression of  and previous decisions
for the LLM call context);  = 〈  ,  ,    ,   〉 is an annotated graph model with sets of components
  and flows  ;    ,   are mappings that store roles, protocols, service-level agreements, and other
non-functional attributes; Φ:   →</p>
        <p>assigns each vertex component one of the specifications
, 
, 
, 
, 
}, where</p>
        <p>formalizes the request-response process,
describes business rules and algorithmic transformations, 
defines data structures and
their validation schemes, 
lists external dependencies with versions, and 
characterizes
the technology stack and execution environment; 
= (
, 
, 
) are machine-readable
are configuration files (YAML/JSON),</p>
        <p>are project frameworks and code
are formal API specifications (OpenAPI/Swagger); 
= (
, 
) is a
validation report, where</p>
        <p>denotes the set of detected problems with importance function
denotes the process of tracking tested scenarios.</p>
        <p>
          The main objective is to find 〈 ,  ( ),  ( ), Φ( ),  ( ),  ( )〉
 =1 (a sequence of N iterations)
that minimizes the aggregated risk:

( , Φ) =   

+  


+   

+   
 ,
(
          <xref ref-type="bibr" rid="ref2">2</xref>
          )
where   ,   ,   ,   &gt; 0 are weighting coefficients, and each of terms   ,   ,
  ,   specifies a penalty for failure to meet the relevant KPIs and NFRs (security,
scalability, performance, operational).
under the conditions of invariant fulfillment and reachability from the initial state. Formally:
min 
 ,Φ
( , Φ),
(
          <xref ref-type="bibr" rid="ref3">3</xref>
          )
under the condition:
 1( , Φ) ∧  2( , Φ) ∧  3( , Φ) ∧  4( , Φ), (
          <xref ref-type="bibr" rid="ref4">4</xref>
          )
        </p>
        <p>
          ( , Φ) ∈  ℎ( 0), (
          <xref ref-type="bibr" rid="ref5">5</xref>
          )
where  1 is an invariant that guarantees the semantic integrity of component specifications;  2 is
an invariant that ensures that the architecture meets functional requirements;  3 is an invariant that
tracks compliance with non-functional constraints through the budget   (
          <xref ref-type="bibr" rid="ref7">7</xref>
          );  4 is an invariant
that defines the termination and reproducibility conditions of the iterative process associated with
the stationarity metric Δ( ) (
          <xref ref-type="bibr" rid="ref8">8</xref>
          )-(
          <xref ref-type="bibr" rid="ref9">9</xref>
          );  0 is the initial state;  ℎ( 0) is the set of reachable
configurations defined by the closure over LLM operations and tools:
        </p>
        <p>
          ℎ( 0) = {  |  =   ∘ … ∘  2 ∘  1( 0),   ∈ {LLM ,  },  = ̅1̅̅,̅,  ≥ 1}, (
          <xref ref-type="bibr" rid="ref6">6</xref>
          )
where   is a valid operation, and the composition of operators specifies the sequence of
transformations from  0 to   .
        </p>
        <p>If at least one invariant   ( = ̅1̅,̅4̅) is violated, the system is considered incorrect and needs to be
corrected before continuing with the design.</p>
        <p>As part of the iterative improvement of the system, a set of non-functional requirements is
introduced as a set of indices of those metrics that are within acceptable limits. Let for each
 = 1, … ,  there be a mapping   : ( , Φ) ⟼ ℝ≥0 that evaluates the j-th non-functional characteristic
(delay, throughput, resource consumption, etc.) and a scalar threshold   &gt; 0. Then the set of
nonfunctional requirements is denoted as:</p>
        <p>= { |  ( , Φ) ≤   }.</p>
        <p>
          The state ( , Φ) is considered acceptable if all J metrics satisfy the requirements, i.e., | 
To control the convergence of iterations, a stationarity metric is introduced:
(
          <xref ref-type="bibr" rid="ref7">7</xref>
          )
| =  .
Δ( ) = max{  ( ( ),  ( − 1)),  Φ(Φ( ), Φ( − 1)),   ( ( ),  ( − 1))}, (
          <xref ref-type="bibr" rid="ref8">8</xref>
          )
Δ( ) ≤   , (
          <xref ref-type="bibr" rid="ref9">9</xref>
          )
where   ,  Φ,   are the corresponding distance metrics on the spaces of architectures  ,
mappings Φ, and master prompts  ;   is the stop threshold, which is a priori selected depending
on the desired accuracy and sensitivity of the system (in practice, it is determined based on the
analysis of the stability of the model outputs or expert requirements for minimum changes between
iterations).
        </p>
        <p>
          Conditions (
          <xref ref-type="bibr" rid="ref7">7</xref>
          ) and (
          <xref ref-type="bibr" rid="ref9">9</xref>
          ) can be represented as a process that ends when the changes between
iterations become insignificant and all non-functional constraints are met. This approach prevents
excessive calculations and stabilizes the project at an acceptable level of quality.
        </p>
        <p>
          The task of automated design of complex multidimensional systems boils down to finding such
an architecture and corresponding mapping of specifications that minimize the risk function while
preserving four invariants and ensuring reachability from the initial state through a sequence of calls
to the generative model and auxiliary tools (
          <xref ref-type="bibr" rid="ref2">2</xref>
          )-(
          <xref ref-type="bibr" rid="ref9">9</xref>
          ). At the same time, non-functional constraints are
introduced in the form of a budget of   metrics, which must remain within acceptable thresholds
  , and the convergence criterion of iterations is determined by the stationarity value Δ( ), which
tracks changes in architecture, specifications, and master prompts between adjacent iterations. This
formalization provides a single, consistent model of the system state and mechanisms for its gradual
improvement.
3.2.
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Typed knowledge base and correctness invariants</title>
        <p>As defined in subsection 3.1, the knowledge base K is defined as an ordered set of pairs {(  ,   )} =1.
Let  be a finite algebra of domain types consistent with the ontology of the subject area, and let the
typing operator  :  ℎ →  assign a static domain type to each document, while the mapping
 ℎ:  →   ℎ associates the type with a verification schema. The tuple (  ,   ) is valid
if:</p>
        <p>⊨  ℎ( ( ℎ )).</p>
        <p>
          At this stage, the system of correctness invariants is formulated:
(
          <xref ref-type="bibr" rid="ref10">10</xref>
          )
•
•
•
•
 1: ∀(  ,   ) ∈  :   ⊨  ℎ( ( ℎ ));
 2: all references between documents (  ,   ) are totally defined and type-compatible; in
particular, if the field   [ref] =   , then  ( ℎ ) ⇝  ( ℎ ) belongs to the allowed set of
relations ℝ  ;
 3: for each vertex   ∈   of graph A, there exists a unique document (  ,   ) ∈  and
version   such that  ℎ =   and  ( ℎ ) =   ; at the same time, Φ(  ) refers
specifically to   a guarantee of the semantic integrity of specifications;
 4: repetitions of calls to LLM and deterministic Tools over fixed ( ,  ( )) produce identical
artifacts, that is ∀ 1,  2 ∈ ℕ;   1,   2 ∈ {LLM ,  } ∶   1( ,  ( )) =   2( ,  ( )),
where   1,   2 are two independent replicas of the same operator O over fixed inputs K and
M(n), which ensures the same result for each repeated call of the generative model or
auxiliary tool with identical arguments.
        </p>
        <p>
          Thus, the typed knowledge base K serves as the sole source of truth, while invariants   ( = ̅1̅,̅4̅)
guarantee structural and semantic integrity, full compliance with architectural elements, and
reproducibility of all subsequent transformations of the system state, which are necessary
prerequisites for solving optimization problems (
          <xref ref-type="bibr" rid="ref3">3</xref>
          )-(
          <xref ref-type="bibr" rid="ref6">6</xref>
          ).
3.3.
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>Architecture-oriented control of a generative orchestrator</title>
        <p>
          The iterative design process is managed by a generative orchestrator, which at each step n analyzes
the current state   ( ) = 〈 ,  ( ),  ( ), Φ( ),  ( ),  ( )〉 and selects the next deterministic
operation   ∈ {LLM ,  }. Formally, the orchestrator is defined by the policy:
 ∗: ( , Φ,  ) → {LLM ,  },
which minimizes the expected increase in aggregated risk (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ):
        </p>
        <p>
          ∆ ( ) =  ( ( + 1), Φ( + 1)) −  ( ( ), Φ( )), (
          <xref ref-type="bibr" rid="ref12">12</xref>
          )
while preserving invariants   ( = ̅1̅,̅4̅) and the next state belonging to the set  ℎ( 0) (
          <xref ref-type="bibr" rid="ref6">6</xref>
          ).
To make the choice of   architecturally sensitive, we introduce an impact assessment function:
( ,   ( )) = −∇( ,Φ)
[ (  ( ))],
which is approximated by difference gradients on graph  ( ) and projections Φ( ). Policy  ∗ is
implemented by the rule:
(
          <xref ref-type="bibr" rid="ref11">11</xref>
          )
(
          <xref ref-type="bibr" rid="ref13">13</xref>
          )
  = arg
 ∈{LLM ,
max
}
which leads to the action of the generative model when the expected benefit of semantic
expansion or refactoring of components exceeds the benefit of materializing artifacts, and vice versa.
        </p>
        <p>The resulting rule can
available tools and LLM calls, the one that promises the greatest gain in achieving the target
architecture is selected. This simplifies the optimization process, but at the same time allows
adaptation to the current state of the system.</p>
        <p>
          An additional control parameter is the budget of non-functional requirements  
(
          <xref ref-type="bibr" rid="ref7">7</xref>
          ): if
|
        </p>
        <p>
          | =  , the policy refocuses on those graph vertices for which the thresholds   are violated and
defines   as the target optimization tool for the corresponding metric. Convergence is controlled
by the stationarity value Δ( ) (
          <xref ref-type="bibr" rid="ref8">8</xref>
          )-(
          <xref ref-type="bibr" rid="ref9">9</xref>
          ); the orchestrator stops iterations when Δ( ) ≤  
and at the
same time
        </p>
        <p>is completely filled.</p>
        <p>Thus, the architecture-oriented orchestrator integrates the structural context of the graph, risk
indicators, and non-functional budgets into a single policy  ∗, which determines the sequence of
calls to LLM and specialized tools and guarantees a monotonic reduction in risk while maintaining
correctness invariants.
3.4.</p>
      </sec>
      <sec id="sec-3-4">
        <title>Risk-oriented iterative improvement strategy</title>
        <p>
          The strategy is based on local minimization of aggregate risk, taking into account invariants,
reachability, and the budget of non-functional requirements, with the utility gain estimate consistent
with the  ∗ orchestrator policy (
          <xref ref-type="bibr" rid="ref11">11</xref>
          ) and the   operation selection rule (14). At step n, we construct
a local
Lagrangianaround the current state:
confidence neighborhood
(15)
(16)
(17)
+  ( ) Φ ( Φ̃, Φ( )),
where [∙]+ = max{∙ ,0};   ,   are NFR metrics and thresholds;   ,  Φ are agreed distances that
are also included in the stationarity criterion Δ( ) (
          <xref ref-type="bibr" rid="ref8">8</xref>
          );  ̃ is a candidate (locally restructured)
architecture in the confidence neighborhood relative to  ( ); Φ̃ is a candidate mapping of
specifications in the confidence neighborhood relative to Φ( );   are binary multipliers;  ( ),  ( )
are confidence neighborhood parameters.
        </p>
        <p>In equation (15), the first term reflects the direct risk assessment, and the second term reflects
penalties for exceeding non-functional limits. Thus, optimization balances between risk reduction
and compliance with operational characteristics.</p>
        <p>The next state is defined as:
( ( + 1), Φ( + 1)) = arg
( ̃, Φ̃)∈</p>
        <p>
          max
 1∧ 2∧ 3,∧ 4
ℎ( 0), ℒ( )( ̃, Φ̃,  ),
:
that is, only among configurations that preserve invariants (
          <xref ref-type="bibr" rid="ref4">4</xref>
          ) and achievable by compositions
  ∈ {LLM ,
        </p>
        <p>
          } (
          <xref ref-type="bibr" rid="ref6">6</xref>
          ).
  ( + 1) = [  ( ) +  ( )(  ( ( + 1), Φ( + 1)) −   )] ,  = 1, … ,  ,
+
which focuses subsequent iterations on metrics that exceed the  
budget (
          <xref ref-type="bibr" rid="ref7">7</xref>
          ).
        </p>
        <p>Coordination with the orchestrator is achieved by selecting operation   (14) through the
evaluation of 
risk and no depletion of the budget:</p>
        <p>
          ( ,   ( )) (
          <xref ref-type="bibr" rid="ref13">13</xref>
          ), while accepting the step requires both a monotonic decrease in
 ( ( + 1), Φ( + 1)) ≤  ( ( ), Φ( )), |  ( + 1)| ≥ |  ( )|, (18)
where |  (∙)| =  corresponds to full compliance with NFR (
          <xref ref-type="bibr" rid="ref7">7</xref>
          ).
        </p>
        <p>Condition (18) ensures that each subsequent step of the algorithm does not worsen the overall
risk assessment. Even if individual metrics may fluctuate temporarily, the overall trend remains
upward.</p>
        <p>
          The parameters of the confidence neighborhood  ( ),  ( ) are adapted according to Δ( ) (
          <xref ref-type="bibr" rid="ref8">8</xref>
          ):
dynamics are stable, they decrease, allowing for an increase in the state distances between iterations
  ,  Φ. The stopping criterion is set as Δ( ) ≤   (
          <xref ref-type="bibr" rid="ref9">9</xref>
          ) together with the filled budget   (
          <xref ref-type="bibr" rid="ref7">7</xref>
          ).
This scheme combines the global goal of risk minimization (
          <xref ref-type="bibr" rid="ref3">3</xref>
          )-(
          <xref ref-type="bibr" rid="ref5">5</xref>
          ) with locally controlled orchestrator
steps (
          <xref ref-type="bibr" rid="ref11">11</xref>
          )-(14), ensuring monotonic convergence to an acceptable solution while maintaining
invariants and attainability.
3.5.
        </p>
      </sec>
      <sec id="sec-3-5">
        <title>Reproducibility and auditability of artifacts</title>
        <p>
          The reproducibility of artifacts is guaranteed by setting the deterministic parameters of the
generative model  = ( ,  , system_ctx) and using deterministic tools that return identical
outputs for identical inputs. The formal state carrier is still the tuple   (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ), so these components are
subject to audit. For each iteration n, the control state  ( ) is fixed, which includes the control hashes
of all components of the tuple   (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) and the environment identifiers id , id :
 ( ) = (ℎ( ), ℎ( ( )), ℎ( ( )), ℎ(Φ( )), ℎ( ( )), id , id ).
        </p>
        <p>Next, an audit log is constructed as a chain of hashes. Starting with  0 = ℎ( (0)), define:
(19)
  +1 = ℎ(  ⊕   ⊕  ( ) ⊕  ( + 1) ⊕ ts +1), (20)
where   ∈ {LLM ,  } is the executed operation; ts +1 is the timestamp.</p>
        <p>
          The log is stored as a hash chain, so any change or forgery is detected as a violation of integrity.
To verify reproducibility, repeat step n under the fixed id , id , and input  ( ); invariant  4
requires that the result   ( ,  ( )) exactly matches  ( + 1) in the log. Each record additionally
contains the current budget   and the stationarity metric Δ( ) for post-step compliance and
stability checks according to (
          <xref ref-type="bibr" rid="ref7">7</xref>
          )-(
          <xref ref-type="bibr" rid="ref9">9</xref>
          ). If necessary, the origin of changes ( ( ), Φ( )) is tracked
through references to operations {  } that define reachable states  ℎ( 0), allowing the complete
causal sequence to be reconstructed and its correctness verified. In combination, manifests, hash
chains, and environment fixes provide a transparent, verifiable, and reproducible trajectory of
artifact synthesis at all stages of iterative design.
3.6.
        </p>
      </sec>
      <sec id="sec-3-6">
        <title>Algorithm for using the proposed model</title>
        <p>
          The pseudocode of the algorithm for using the proposed model is shown in Table 1. It implements
the (
          <xref ref-type="bibr" rid="ref11">11</xref>
          )  ∗ policy of architecture-aware orchestration and iterative risk minimization for invariants
 1 −  4 with control of the non-functional requirements budget   and stationarity Δ( ). The
initial query  0 is converted into a typed knowledge base  and prompt  (0); then cycles of
decomposition, formalization of specifications, validation, and local improvement are performed. The
action selection   ( ,  ( )) is performed according to rule (14), as well as taking into account  ,
which ensures architecturally sensitive action selection. Updating the binary factors   directs
iterations to metrics that exceed the thresholds   .
σ(0) ← (ℎ( ),ℎ( (0)),ℎ( (0)),ℎ(Φ(0)),ℎ(ℛ(0)), ,
); 0 ← ℎ(σ(0))
 ↓ ∈ (
          <xref ref-type="bibr" rid="ref1">0,1</xref>
          )
        </p>
        <p>Ensure: ( (⋆),Φ(⋆))
1: λ(0) ← 0; ← 0; ← { 1 ∧  2 ∧  3 ∧  4}
2:  (0) ← { ∣   ( (0),Φ(0)) ≤   ;Δ(0) ← +∞
4: repeat</p>
        <p>←  (
  ←  
{
 
,
, ( )), 
,
,
= 
, ℎ
&gt; 
&gt; 
←  (
,
,
∧ | ( )| &lt;  ,
( ̂, Φ̂, ̂ ) ←   ( 
( )); ( ̂, Φ̂) ← Π ( 0)∩ ( ̂, Φ̂)
 1 ∧ ⋯∧  4
, ( ))
( )</p>
        <p>[  −   ]+ +  ( )  +  ( ) Φ]
( ( +1),Φ( +1)); λ</p>
        <p>( +1) ← [λ( ) + η( )(  ( ( +1),Φ( +1))−   )]+ ;
( ( +1),Φ( +1)) ←
ℛ( +1) ← ℛ( ) ⊎
 ( +1) ←
 ( +1) ←
 ( +1) ← { ∣   ≤   }
( ̃,Φ̃)∈</p>
        <p>( 0), 
arg min</p>
        <p>[
( ( +1),Φ( +1));
( ( +1),Φ( +1),ℛ( +1))</p>
        <p>∑ 
 =1
Δ( +1) ← max{  ( ( +1), ( )),  Φ(Φ( +1),Φ( )),   ( ( +1), ( ))}
if  ( +1) &gt;  ( )  ∨  | ( +1)| &lt; | ( )| then
 ( +1) ←  ↑ ( );</p>
        <p>( +1) ←  ↑ ( );
( ( +1),Φ( +1),ℛ( +1), ( +1)) ← ( ( ),Φ( ),ℛ( ), ( )); continue
else
μ( +1) ← γ↓μ( );</p>
        <p>ν( +1) ← γ↓ν( )
  +1 ← ℎ(  ∥   ∥ σ( ) ∥ σ( +1) ∥
 ←  + 1;  ←  + 1</p>
        <p>)
σ( +1) ← (ℎ( ),ℎ( ( +1)),ℎ( ( +1)),ℎ(Φ( +1)),ℎ(ℛ( +1)), , );
3:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18: until Δ( ) ≤ ε   ∧  | ( )| =    ∨   ≥  0
19: return ( ( ),Φ( ),ℛ( ), ( ))</p>
        <p>
          The step is accepted if the monotonicity of risk and non-exhaustion of the NFR budget are
fulfilled; the stopping criterion uses the condition Δ( ) ≤  
(
          <xref ref-type="bibr" rid="ref9">9</xref>
          ) and full execution of the NFR
budget |
        </p>
        <p>(∙)| =  (18). Manifests and hash chains provide a reproducible audit of the process.</p>
        <p>This algorithmic workflow ensures that each iteration not only satisfies structural invariants but
also maintains semantic coherence across all system components. The orchestration loop
dynamically adjusts the balance between exploration of alternative configurations and exploitation
of verified architectures, enabling convergence toward an optimal, risk-minimized design. As a
result, the process achieves stable evolution of the system state while preserving full traceability and
reproducibility of all generated artifacts.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Testing of the model</title>
      <p>The proposed model was validated using a case study of a multi-level supply chain [12-13] in the
FMCG sector, which includes suppliers, production facilities, distribution centers, and retail outlets.
This example allows us to test the model's ability to coherently synthesize architecture, optimize
replenishment and resource allocation policies, and ensure that functional and non-functional
requirements are met in realistic conditions.</p>
      <p>The modeling of a multi-level FMCG supply chain was implemented in Python 3.11 using the
NumPy, pandas, and Matplotlib libraries for data generation, processing, and visualization, as well
as SciPy for statistical analysis. Algorithmic modules were implemented using object-oriented and
structural approaches, which ensured flexibility in configuring simulation parameters.</p>
      <p>To implement adaptive decision-making logic, the OpenAI GPT-4o API was used, which was
integrated through the official Python SDK and performed the functions of a generative orchestrator,
in particular, forming a strategy for responding to stochastic changes in demand and delivery times.
This made it possible to combine classical mathematical modeling with intelligent components,
which significantly increased the realism of the simulations and brought them closer to the
conditions of a real business environment.</p>
      <p>Consider a network consisting of two raw material suppliers, one factory, two regional centers
(DC1, DC2), and five retail stores ( ∈ { ,  ,  }); customer orders are stochastic with seasonality,
delivery lead times vary, computing resource budget and SLA for plan updates are limited. The initial
request  0 is formalized as a typed knowledge base K (YAML description of the domain, nodes, and
flows), master prompt  (0), architecture  (0), and mapping Φ(0) with specifications { ,  ,
 ,  ,  }  (0) contain simulator
configurations, pipeline templates, and OpenAPI for integration with ERP. State   evolves in the set
of reachable configurations  ℎ( 0) by compositions of calls {LLM ,  }. The goal is to reduce
the aggregated risk  ( , Φ) (with weights on security/scalability/performance/operability) under
invariants  1 −  4 and budget NFR; NFR metrics   include service level (% On-Time/In-Full), average
backlog, delivery costs, plan update time; acceptability: |  (∙)| =  . Test procedure:
1. initialization of  0 with sales history and lead time matrices;
2. orchestrator iterations: synthesis/refactoring of replenishment ( ,  ), allocation, and
transport policies, API and config generation/update, simulator validation;
3. acceptance of a step based on a monotonic decrease in Risk and no decrease in |  (∙)|;
4. stop based on stationarity Δ( ) ≤   .</p>
      <p>Reproducibility and audit are ensured by state manifests together with a hash chain of actions
  +1 = ℎ(  ||  || ( )|| ( + 1)||ts +1) and the fixation of environment identifiers id , id .
The expected result of applying the method is a reproducible set of artifacts (architecture,
replenishment and allocation policies, integration contracts, pipeline configurations) with improved
key metrics (OTIF growth, backlog and cost reduction) while adhering to NFR and transparent
auditing.</p>
      <p>Figure 1 demonstrates that the proposed method shows consistently higher OTIF (On Time In
Full) performance compared to baseline approaches for a multi-level FMCG supply chain. Based on
the results of 200 stochastic simulations, the average OTIF for the proposed model remains within
the range of 0.921 0.926, exceeding the rule-based strategy by 2 4 percentage points and the baseline
by 5 7 percentage points during most weeks. The 95% CI ranges do not intersect, indicating a
statistically significant advantage even in the presence of random fluctuations in demand and
variability in lead times. This result demonstrates the method's ability to ensure higher order
fulfillment reliability in the complex conditions of multi-level supply networks.</p>
      <p>The results of 200 stochastic simulations for a multi-level FMCG supply chain demonstrate that
the proposed model significantly reduces the average backlog level compared to other approaches
(see Figure 2). The average values for the proposed model are in the range of 70 80 units, which is
approximately 35 40% less than the rule-based strategy (100 116 units) and approximately 45 50%
less than the baseline (135 150 units). Narrow 95% CI confidence intervals indicate the stability of
the results even under conditions of demand fluctuations and delivery time variability. This confirms
the effectiveness of the method in reducing shortages and increasing order fulfillment rates in
complex supply networks.</p>
      <p>Figure 3 shows the dynamics of average delivery costs (in thousands of US dollars) for a 12-week
period for three approaches: the proposed model, the rule-based algorithm, and the baseline scenario,
taking into account 95% confidence intervals based on the results of 200 Monte Carlo simulations.
The proposed method consistently provides the lowest costs, reducing them from $15.8 thousand at
the beginning to $14.6 thousand at the end of the period, which is about a 7.6% savings from the
starting level. The rule-based approach starts at $18.6 thousand and decreases to $17.8 thousand,
while the baseline scenario fluctuates between $21.3 22.4 thousand, remaining 25 30% more
47
expensive than the proposed one. These results indicate that optimizing management decisions in a
multi-level FMCG supply chain can significantly reduce transportation costs without compromising
service performance.</p>
      <p>The simulation results for a multi-level FMCG supply chain confirmed the effectiveness of the
proposed model compared to the baseline and rule-based approaches. Over 12 weeks of simulations,
the average OTIF remained consistently higher (0.92 vs. 0.88 for rule-based and 0.85 for baseline),
indicating an increase in the level of timely and complete deliveries. The average level of unmet
demand (backlog) decreased by 32% compared to the baseline and by 30% compared to the rule-based
approach. At the same time, average delivery costs decreased by 15% compared to the baseline and
by 12% compared to rule-based, maintaining stable dynamics even with increasing stochastic
fluctuations in demand and delivery times. This demonstrates the model's ability to provide balanced
optimization of key KPIs (service level, inventory, and costs) under realistic supply chain conditions.</p>
      <p>To sum up, the experimental validation on a multi-level FMCG supply chain confirmed that the
LLM-based orchestrator effectively generated and refined replenishment and allocation policies
under stochastic demand and delivery conditions. The results demonstrated consistent
improvements in service level (OTIF), reduction of backlog, and lower delivery costs compared to
baseline and
rule</p>
    </sec>
    <sec id="sec-5">
      <title>5. Possibilities and limitations of the proposed model</title>
      <p>The proposed model demonstrates significant capabilities in the field of automated design and
optimization of complex systems, in particular multi-level supply chains, combining formal modeling
methods with intelligent data processing using LLM. Its architecture-oriented approach allows
integrating heterogeneous knowledge sources, supporting flexible scenario management, and taking
into account non-functional requirements through the introduction of constraint budgets. Key
advantages include scalability, resistance to stochastic parameter fluctuations, and the possibility of
multi-stage iterative optimization based on risk assessment. At the same time, the model has certain
limitations: its effectiveness depends on the quality and completeness of the initial knowledge base,
the accuracy of the evaluation function settings, and the computational resources for performing
simulations in large configuration spaces. Defining the initial knowledge base  in a new or weakly
formalised domain remains a non-trivial task, requiring domain expertise to ensure consistency,
adequate coverage, and balanced abstraction. Insufficient structuring at this stage can limit the
accuracy of subsequent synthesis and adaptation processes.</p>
      <p>In addition, the integration of LLM-oriented components requires careful control of the
reproducibility of results and protection against potential errors in generative models, which imposes
additional requirements on audit and validation procedures. Although GPT-4o was used in the
experimental implementation due to its stability and reasoning performance, the framework itself is
model-agnostic; outcomes may vary with alternative LLMs depending on their prompt determinism,
fine-tuning scope, and inference variability.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusions</title>
      <p>The model proposed in this paper provides a formalized, architecture-oriented approach to
automated design and optimization of complex systems, integrating risk-oriented management,
formal modeling methods, and intelligent components based on LLM. Validation conducted on a
multi-level FMCG supply chain demonstrated a significant improvement in key performance
indicators (service level, reduction in unmet demand, and reduction in logistics costs) compared to
rule-based and baseline approaches. The introduction of a budget for non-functional requirements
allowed the system to remain stable even under stochastic fluctuations, while the use of iterative
improvement ensured a balanced optimization between cost and service quality. The presented
integration of formalised architectural modelling with intelligent generative orchestration represents
a step beyond existing design frameworks, offering a verifiable pathway from conceptual
specification to adaptive optimisation. This synthesis highlights the contribution of the study
compared with prior work on automated design methods.</p>
      <p>The results obtained indicate the high suitability of the model for practical application in
industries characterized by complex network structures and high uncertainty, in particular in
logistics, manufacturing, and service systems. At the same time, further research can be directed
toward scaling the approach for even larger data volumes, integration with real IoT and ERP data
flows, and adaptation of validation methods to improve the reliability of generative components.
Thus, the proposed methodology creates the prerequisites for building new generations of automated
intelligent orchestrators capable of dynamically adapting to changes in the environment and
ensuring increased management efficiency.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgements</title>
      <sec id="sec-7-1">
        <title>This study processes of targeted management of complex multi-component information systems for various ute of Cybernetics of the National Academy of Sciences (NAS) of Ukraine.</title>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>Declaration on Generative AI</title>
      <p>During the preparation of this work, the authors used DeepL in order to translate research notes and
results from Ukrainian to English. After using this tool, the authors reviewed and edited the content
as needed and take full responsibility for the content of the publication.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P. J.</given-names>
            <surname>Kulkarni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Tissen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bernijazov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Dumitrescu</surname>
          </string-name>
          , Towards automated design:
          <article-title>Automatically generating modeling elements with prompt engineering and generative artificial intelligence</article-title>
          ,
          <source>in: Proceedings of NordDesign</source>
          <year>2024</year>
          ,
          <string-name>
            <given-names>Design</given-names>
            <surname>Society</surname>
          </string-name>
          , Reykjavík,
          <year>2024</year>
          . doi:
          <volume>10</volume>
          .35199/norddesign2024.
          <fpage>66</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>I. H.</given-names>
            <surname>Sarker</surname>
          </string-name>
          ,
          <article-title>AI-based modeling: Techniques, applications and research issues towards automation, intelligent and smart systems</article-title>
          ,
          <source>SN Comput. Sci. 3</source>
          (
          <issue>2</issue>
          ) (
          <year>2022</year>
          )
          <article-title>158</article-title>
          . doi:
          <volume>10</volume>
          .1007/s42979- 022-01043-x.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>O. V.</given-names>
            <surname>Palagin</surname>
          </string-name>
          ,
          <string-name>
            <surname>D. I. Symonov</surname>
          </string-name>
          ,
          <article-title>Formalized model of attitude formation as a tool for analyzing behavioral patterns</article-title>
          ,
          <source>Cybern. Syst. Anal</source>
          .
          <volume>61</volume>
          (
          <year>2025</year>
          )
          <fpage>705</fpage>
          713. doi:
          <volume>10</volume>
          .1007/s10559-025-00804-9.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. P.</given-names>
            <surname>Bhatt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Ingebrand</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Ward</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Carr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wang</surname>
          </string-name>
          , U. Topcu,
          <article-title>Fine-tuning language models using formal methods feedback</article-title>
          ,
          <source>arXiv:2310.18239</source>
          (
          <year>2023</year>
          ). doi:
          <volume>10</volume>
          .48550/arXiv.2310.18239.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S.</given-names>
            <surname>Jha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. K.</given-names>
            <surname>Jha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Velasquez</surname>
          </string-name>
          ,
          <article-title>Neuro-symbolic generative AI assistant for system design</article-title>
          ,
          <source>in: Proceedings of the 22nd ACM-IEEE International Symposium on Formal Methods</source>
          and
          <article-title>Models for System Design (MEMOCODE), IEEE</article-title>
          , Raleigh,
          <year>2024</year>
          , pp.
          <fpage>75</fpage>
          <lpage>76</lpage>
          . doi:
          <volume>10</volume>
          .1109/MEMOCODE63347.
          <year>2024</year>
          .
          <volume>00023</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Cao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Tan</surname>
          </string-name>
          ,
          <article-title>Generative artificial intelligence: A historical perspective</article-title>
          ,
          <source>Natl. Sci. Rev</source>
          .
          <volume>12</volume>
          (
          <issue>5</issue>
          ) (
          <year>2025</year>
          ). doi:
          <volume>10</volume>
          .1093/nsr/nwaf050.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Cimatti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Griggio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mover</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Tonetta</surname>
          </string-name>
          , Verification modulo theories,
          <source>Form. Methods Syst. Des</source>
          .
          <volume>60</volume>
          (
          <year>2022</year>
          )
          <fpage>452</fpage>
          481. doi:
          <volume>10</volume>
          .1007/s10703-023-00434-x.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>F.</given-names>
            <surname>Trad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Chehab</surname>
          </string-name>
          ,
          <article-title>Prompt engineering or fine-tuning? A case study on phishing detection with large language models</article-title>
          ,
          <source>Mach. Learn. Knowl. Extr</source>
          .
          <volume>6</volume>
          (
          <year>2024</year>
          )
          <fpage>367</fpage>
          384. doi:
          <volume>10</volume>
          .3390/make6010018.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Selvaraj</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Ahrendt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Fabian</surname>
          </string-name>
          ,
          <article-title>Formal development of safe automated driving using differential dynamic logic</article-title>
          ,
          <source>IEEE Trans. Intell. Veh</source>
          .
          <volume>8</volume>
          (
          <year>2022</year>
          )
          <fpage>988</fpage>
          1000. doi:
          <volume>10</volume>
          .1109/TIV.
          <year>2022</year>
          .
          <volume>3204574</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>R.</given-names>
            <surname>Sinha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Patil</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Gomes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Vyatkin</surname>
          </string-name>
          ,
          <article-title>A survey of static formal methods for building dependable industrial automation systems</article-title>
          ,
          <source>IEEE Trans. Ind. Inf</source>
          .
          <volume>15</volume>
          (
          <year>2019</year>
          )
          <fpage>3772</fpage>
          3783. doi:
          <volume>10</volume>
          .1109/TII.
          <year>2019</year>
          .
          <volume>2908665</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>R.</given-names>
            <surname>Eramo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Said</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Oriol</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Bruneliere</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Morales</surname>
          </string-name>
          ,
          <article-title>An architecture for model-based and intelligent automation in DevOps</article-title>
          ,
          <source>J. Syst. Softw</source>
          .
          <volume>217</volume>
          (
          <year>2024</year>
          )
          <article-title>112180</article-title>
          . doi:
          <volume>10</volume>
          .1016/j.jss.
          <year>2024</year>
          .
          <volume>112180</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>D. I.</given-names>
            <surname>Symonov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. M.</given-names>
            <surname>Gorbachuk</surname>
          </string-name>
          ,
          <article-title>A method of finding solutions in a dynamic model of inventory management under uncertainty</article-title>
          ,
          <source>Bull. Taras Shevchenko Natl. Univ. Kyiv. Phys. Math. Sci. 4</source>
          (
          <year>2023</year>
          )
          <fpage>31</fpage>
          39. doi:
          <volume>10</volume>
          .17721/1812-
          <fpage>5409</fpage>
          .
          <year>2022</year>
          /4.4.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>D. I. Symonov</surname>
          </string-name>
          ,
          <article-title>Algorithm for determining the optimal flow in supply chains, considering multicriteria conditions and stochastic processes</article-title>
          ,
          <source>Bull. Taras Shevchenko Natl. Univ. Kyiv. Phys. Math. Sci. 2</source>
          (
          <year>2021</year>
          )
          <fpage>109</fpage>
          116. doi:
          <volume>10</volume>
          .17721/1812-
          <fpage>5409</fpage>
          .
          <year>2021</year>
          /2.15.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>