2.2.1. GERT Model of the First Stage of User Request Processing
The first stage of user request processing is focused on structuring the incoming information, verifying the correctness of categorization, and resolving potential ambiguities. The logic of this process is formalized using a probabilistic graphical model, GERT (Graphical Evaluation and Review Technique), which is illustrated in
Figure 4.
In
Figure 4, the process stages are schematically represented as a directed graph, where each node corresponds to a processing step, and the arcs represent probabilistic transitions between them. The model includes nodes and transitions. The list of nodes and their formal descriptions are shown in
Table 2.
After defining the main nodes of the GERT model for the first stage, it is necessary to examine the structure of transitions between them, reflecting the dynamics of request processing. The transitions between the model’s nodes are probabilistic in nature and are governed by the logic of conditions for passing through or returning.
The initial node (node 1) represents the moment the user’s request is received. From this node, the process moves to node 2, which reflects the initial categorization of the request. This transition occurs via arc W12, which is characterized by a nearly certain probability of passage, as categorization is a mandatory step in processing any request.
After the categorization is completed, the process transitions via arc W23 to node 3, where the assigned category is validated. At this stage, the category is checked for consistency with the user’s request, the data structure, and the expected types of information. If validation is successful, the transition proceeds to node 5 via arc W35, corresponding to the next stage—assigning weights for further prioritization of information.
If the validation fails (e.g., if the category is assigned incorrectly or the request turns out to be ambiguous), an alternative path is activated as follows: via arc W34, the system transitions to node 4, where the request is reformulated or corrected. The purpose of this step is to eliminate ambiguities and bring the request structure to a format suitable for repeated categorization. Then, via arc W42, the process returns to node 2, and the categorization is performed again.
In the case of successful categorization and validation, the system reaches node 5, corresponding to the stage of weight assignment, and then proceeds via arc W56 to the final node 6, which completes the first stage of processing and hands control over to the next module of the system.
Thus, the structure of the GERT graph enables multiple returns and iterations, particularly between nodes 2–3–4, providing flexibility in processing unstructured or erroneous requests and increasing the system’s resilience to user errors.
To analyze the temporal characteristics of the process, classical methods of GERT network analysis can be used. For example, the expected total processing time of a request, E[T], is defined as the sum of the weighted average times over all possible paths leading from the initial to the final node, taking into account the probabilities of traversing each path.
Formally, for a system with possible cycles, this can be expressed through a system of equations incorporating Markov logic or by using the shortest path method with probabilities adapted for GERT. This approach not only allows for the estimation of the average time to complete the stage but also enables the identification of the most resource-intensive and sensitive segments (e.g., excessive accumulation of probability on the return arc W42).
However, in modern GERT models (unlike the more approximate “step-by-step” evaluations in the previous example), the calculation is performed through an equivalent transfer function. This function accounts for the following:
- –
transition probability pij;
- –
intensity or delay (time distribution law)—via the Laplace function for time Tij.
The result is an equivalent transfer function of the GERT arc:
where
is the Laplace transform of the execution time along arc
i j.
In this expression, represents the probability of transitioning from node i to node j, while is the Laplace transform of the probability distribution function of the processing time associated with that transition. The function encodes the stochastic duration of the corresponding process step in the frequency domain.
One of the tasks at this stage of modeling is the selection of the distribution function for the random variable representing transition execution time. In a number of studies [
31], the problem formulation used the exponential distribution for transition times between nodes in the GERT graph. This is due to its mathematical simplicity. The Laplace transform for the exponential distribution is
, which significantly simplifies analytical calculations.
Nevertheless, despite the popularity of the exponential distribution in queueing theory, its application in modeling systems for processing user requests is not always justified. The exponential distribution has the memoryless property, meaning the probability of completing an operation in the next moment does not depend on how much time has already passed. This is acceptable for modeling asynchronous events such as request arrivals or trigger activations. However, within the system under consideration, stages such as categorization, validation, and weight assignment typically require a fixed or nearly fixed processing time. To model the execution time of individual stages, the Erlang distribution was chosen—a special case of the gamma distribution, applied when the process consists of k sequential phases, each following an exponential distribution. The advantages of mathematical formalization using the Erlang distribution include the following factors.
- –
Physical realism, as it reflects the step-by-step structure of tasks (e.g., request parsing entity extraction category matching);
- –
Controllable variance, since for a fixed rate , increasing the parameter k makes the distribution closer to deterministic;
- –
Positive start time, as there is no probability of zero-time completion.
The Laplace transform for the Erlang distribution is given by the following:
Taking the presented facts into account, the equivalent time function for the first stage of user request processing is calculated as follows:
The use of the proposed equivalent W-function will, subsequently, enable the derivation of an analytical expression for calculating the time required to implement the first stage of user request processing. In addition, this approach allows for determining the complete distribution function of the request traversal time through the model.
The conducted analysis of the process formalized in
Figure 1 made it possible to establish the characteristics of the branches considered in the GERT model, as well as the distribution parameters. These are presented in more detail in
Table 3.
By substituting the expressions for each arc into expression (3), we obtain the following:
After performing straightforward mathematical transformations, we arrive at the expression for calculating the equivalent
W-function.
The resulting transfer function of the entire network
represents the characteristic function of the request processing time. It is the Laplace transform of the desired probability density function of the processing time
. Formally, the relationship between the transfer function and the time distribution function is expressed as follows:
where
is the characteristic function of the time.
The probability density function
can be obtained from
through the inverse Laplace transform. Theoretically, this transformation is written in the form of the Bromwich integral, as follows:
where the integration is carried out along a vertical line in the complex plane, located to the right of all singularities of the function
.
In practice, analytical computation of the Bromwich integral for complex transfer functions, such as our model, is challenging. Therefore, for the numerical recovery of the time distribution function, it is reasonable to use specialized numerical methods. In this study, the Stehfest method [
32] was used to solve the inversion problem, as recommended in works on the theory of GERT networks [
1,
33].
The Stehfest method allows the function
to be approximated through a finite sum of transfer function values at various arguments. The following approximate formula is used:
where
N is an even number that determines the approximation accuracy (typically
N = 10, 12, and 14), and
is the special Stehfest weighting coefficient. These coefficients are calculated using binomial coefficients according to the following formula:
where
denotes binomial coefficients.
The implementation of the method is as follows: for each fixed time value t, the weights and the values of the function at the points are calculated. These are then used to compute a weighted sum, normalized by a multiplier of . By repeating this procedure for multiple values of t within a specified range, a discrete approximation of the function can be obtained.
The resulting probability density function allows for not only for determining the expected request processing time but also for analyzing the probability of meeting specified deadlines, constructing confidence intervals for processing time, and assessing the risk of critical delays.
The constructed transfer function (5) of the GERT model for the first stage of user request processing takes the form of a fractional-rational expression, as follows:
where
P(s) and
Q(s) are polynomials in the variable
s. To obtain the analytical expression of the probability density function
, it is necessary to perform the inverse Laplace transform of
. However, for fractional-rational functions, direct inversion is difficult. Therefore, a standard solution procedure is applied, as recommended in works [
25].
The process of recovering the function consists of several key steps.
In the first step, a change of variable is made,
as a result of which the transfer function takes the following form:
This substitution is used to facilitate the subsequent analysis of the function’s singularities in the complex plane. After the variable change, the roots of the equation are located in the right half-plane, which simplifies their interpretation and makes the subsequent decomposition of the function into partial fractions easier.
Using expression (5), we obtain the following equality:
The next step is solving the equation .
The roots of this equation may be real numbers (real roots) or form pairs of complex conjugates. Each root can be either simple (multiplicity 1) or multiple (multiplicity > 1).
Finding the roots of the denominator is a key step, as each root determines the behavior of the corresponding component in the result after the inverse transformation.
Once all roots
of the denominator are found, the fraction is decomposed
into a sum of simple elements. According to standard partial fraction theory, any rational expression can be represented as a sum of the following:
where
is the multiplicity of the root
, and
are the decomposition coefficients.
The coefficients are determined using standard methods. This may involve comparing polynomial coefficients after bringing them to a common denominator, or using the method of equivalent residues at the poles (residue method).
If the root is simple ( = 1), the corresponding term of the fraction has the form . If the root is multiple, all degrees from to are taken into account.
In the next stage of the process of recovering the function
, known results of the inverse Laplace transform [
24] can be used for each term of the decomposition.
For a fraction of the form
the inverse transform has the following form:
For a fraction of the form
(multiple root), as follows:
Thus, each pole (root) contributes to the final distribution function in the form of an exponential, possibly multiplied by a power function of time.
At the next stage, by summing the results of the inverse transform for all terms of the decomposition, we obtain the complete expression for the probability density function of request processing time, as follows:
Each term represents an exponential function of time multiplied by a power function , weighted by the coefficient . In the case where the roots of the denominator are complex conjugate numbers, their contribution to the function will be real. This is ensured by the fact that the sums of exponentials of conjugate roots result in cosine and sine functions via Euler’s formulas.
For example, if
and
, then the following occurs:
and the contribution of the function will be expressed through damped oscillations.
Let us conduct experimental studies of the presented mathematical model of the first stage of user request processing.
We will determine the probability density function of the processing time for the first stage of user request handling. In doing so, we will define the following branch parameters of the GERT network as initial data:
,
,
,
,
,
,
,
, and
. Substituting the specified values into Expression 4, we obtain the following form of the equation
:
The real roots of this equation are , , , and . The complex conjugate roots of this equation are , . After finding the roots of the equation , the next step is the numerical determination of the probabilistic characteristics of the request traversal time through the model of the first stage. For this, the inverse Laplace transform method is used, which allows obtaining the probability density function based on the transfer function of the GERT network.
Based on the obtained density function, the key statistical parameters of the first stage were calculated.
- –
Mathematical expectation: ;
- –
Standard deviation: .
These values provide a quantitative estimate of the average duration of user request processing and the degree of time value dispersion. Further research will make it possible to compare these results with the characteristics of the second and third stages, as well as to build an aggregated model of the total execution time.
2.2.2. GERT Model of the Stage for Assigning Quantitative Weights to Identified Categories
After completing the stage of initial categorization of the user request, the system proceeds to assign quantitative weights to each of the identified categories.
This process is essential for determining the prioritization of various aspects of the request during the subsequent response generation.
The second stage includes a sequence of operations organized according to the logic presented in
Figure 5 as a GERT scheme.
The list of nodes and their formal descriptions is presented in
Table 4.
In the scheme presented in
Figure 2, the arcs between nodes formalize the following state-to-state transitions.
The arc characterizes the start of the weight assignment process, the transition from the initial state to category analysis. The arc illustrates the transition to verifying the correctness of the assigned weights. The arc characterizes the transition to the weight correction procedure in case of an error. Accordingly, arc illustrates the return to weight reassignment in case of an error.
The transition and arc characterize successful validation, after which two outcomes are possible. The first is the completion of the stage, the second is the clarification-based reassignment of weights. The second option is characterized by arc . Introducing the additional loop increases the model’s accuracy, bringing it closer to real-world scenarios, where even after the formal completion of a stage, returning to previous steps may occur due to changes in the request context, new requirements from the system or user, and inconsistencies between the assigned weights and current processing policies. This is especially relevant in adaptive or learning systems, where weight coefficients may be sensitive to the dynamics of input data.
Taking into account the presented characteristics of the transitions in the GERT network for the stage of establishing quantitative importance weights for each identified category, the equivalent transfer function of the scheme (
Figure 2) takes the following form:
The conducted analysis of the process formalized in
Figure 5 made it possible to establish the characteristics of the branches considered in the GERT model and the distribution parameters. These are presented in more detail in
Table 5.
For each branch of the GERT network of the second stage, types of time distributions were selected that reflect the specifics of the corresponding operations. The basis for this selection is the structure of the algorithm itself, the type of transition, and the nature of processing inherent to each stage.
In particular, the most complex and logically intensive processes—weight assignment and its validation —are modeled using an Erlang distribution of order , reflecting the two-phase nature of these steps. This makes it possible to account for delays caused by the need to go through a series of logical checks or calculations.
Other arcs correspond to actions typically performed in one step or within the framework of simple administrative logic (for example, revalidation, error return, and processing completion). For them, the exponential distribution was selected, reflecting the memoryless (Markovian) nature of processing [
33].
Thus, the model accounts for the varying temporal complexity of different stages, ensuring more realistic behavior of the processing time function at this stage.
The process of restoring the probability density function of processing time from the transfer function of the GERT network begins with a transition to the complex frequency domain by substituting the variable .
The transfer function then takes the following form:
where each component function
is calculated taking into account the variable substitution and the corresponding form of the Laplace transform.
In this GERT model, the denominator has the following structure:
where
is the resulting expression, as follows:
Thus, the poles
are defined as the solutions to the following equation:
The roots found (real or complex conjugate) determine the behavior of the function , its shape, symmetry, and the “tail” of the distribution, as well as the position of the expected value and the nature of the exceedance probability.
The procedure for computing the roots is similar to the first example (model 12–16) and consists of the following steps.
The function is formed using all parameters , with specific values substituted.
For each time value , an approximate value of is calculated.
Based on the array of , the following are constructed:
- –
the density function;
- –
the distribution function ;
- –
the exceedance probability ;
- –
the mathematical expectation and variance:
After substituting the specified model parameters and performing the change
, the characteristic equation of the GERT network for the second stage takes the following form:
The following parameters were used in the calculations: , , , , , , , , , , and . For numerical analysis of the dynamics of time characteristics, it is necessary to determine the roots of the equation . The results of solving this polynomial are presented below. Real roots: , , , . Complex conjugate roots: , , , and .
The obtained root values define the structure of the exponential components of the probability density function for the stage traversal time. They are further used in the numerical Laplace inversion process and in calculating model characteristics.
Based on the resulting density function, the key statistical parameters of the second stage of establishing quantitative importance weights for each identified category were calculated.
- –
Mathematical expectation: ;
- –
Standard deviation: .
2.2.3. GERT Model of the Final Result Generation Stage
After the assignment and validation of user data weights, the system proceeds to the third stage of request processing—the generation of the final result. The purpose of this stage is to combine the previously obtained formalized data and weighting coefficients into a unified, consistent result, suitable for presentation to the user or for transfer to subsequent processing stages.
The logic of the stage is shown in
Figure 6 as a GERT scheme, which reflects the sequence of operations and possible return cycles characteristic of this process.
The GERT network consists of five nodes and six arcs, each corresponding to a separate processing stage. The arc characterizes the transition from data acquisition to system analysis of weights. Transition characterizes the computation of the preliminary result. The arc illustrates the transition to finalizing the result upon successful verification. The arc indicates the possibility of sending data for correctness checking. Branch formally represents a return to weight reassessment in case a logical error is detected. The arc characterizes a return to result recalculation if a technical or formal error in computations is identified.
This approach allows for consideration of various failure scenarios, for example, logical failures due to incorrect interpretation of weights, or computational failures due to issues at the result generation level.
The list of nodes and their formal descriptions is presented in
Table 6.
The transfer function of the model takes the following form:
The conducted analysis of the process formalized in
Figure 6 made it possible to establish the characteristics of the branches considered in the GERT model and the distribution parameters. These are presented in more detail in
Table 7.
By performing mathematical transformations similar to the examples from stages 1 and 2, we obtain the following data. As input values, we take the following probability parameters: , , , , and . We also select intensities corresponding to the final result generation process, as follows: , , , , , , and .
Substituting the variable
and constructing the characteristic equation of the form
leads to obtaining a sixth-degree characteristic equation, as follows:
The solution to this equation includes real roots , , and and complex conjugate roots and .
Reconstructing the probability density function using the inverse Laplace transform method (e.g., Stehfest’s algorithm), we obtain the following:
- –
Mathematical expectation: ;
- –
Standard deviation: .
These results indicate high stability of this stage, with moderate internal cycle complexity and localized potential for result refinement.
The step-by-step analysis carried out above made it possible to describe in detail the logical structure, probabilistic characteristics, and temporal dependencies of each of the three stages of user request processing.
To construct the complete system model, it is necessary to combine these three components into a unified GERT model. It is assumed that each stage is performed sequentially, without overlap, and the output of one stage serves as the input for the next. Thus, the entire model is interpreted as a sequential connection of three stochastic subnetworks, each of which has its own transfer function.
The overall transfer function of the combined model is defined as the product of the transfer functions of the individual stages, as follows:
where
is the transfer function of the GERT model for the first stage of user request processing,
is the transfer function of the GERT model for the second stage of establishing quantitative importance weights for each identified category, and
is the transfer function of the GERT model for the third stage of final result generation.
Forming the complete model allows transitioning from the analysis of local algorithm fragments to the evaluation of the integrated response time of the entire system to a user request, including all possible iterations, returns, and variations within each stage.
To parameterize the GERT models for each stage of data processing, we introduced transition probabilities and processing intensities that reflect the typical uncertainty and feedback mechanisms observed in personalized recommendation systems. The values of key parameters were selected based on a combination of domain knowledge, structural features of recommendation workflows, and observations collected during preliminary experimental deployments in Polish cultural heritage institutions. These observations included time delays in user interaction, frequency of semantic query reformulations, and branching behavior in user navigation patterns.
For example, higher transition probabilities (e.g., 0.9–0.95) were assigned to primary processing paths, while lower probabilities (0.3–0.6) reflected occasional backward transitions or alternate paths associated with query refinement or user context updates. Processing intensities (λ) ranged from 0.1 to 1.4, modeling various delay profiles such as metadata enrichment or real-time user personalization.
To evaluate the robustness of the models under parameter variability, we conducted a sensitivity analysis by varying probabilities and intensities by ±10%, ±20%, and ±30%. Statistical outputs including mean processing time, standard deviation, and tail quantiles were recalculated at each step. While absolute values shifted moderately, the overall behavioral profile of the system remained stable, confirming the reliability and interpretability of the chosen parameterization approach. As illustrated in
Figure 7, the core distribution profile remained consistent across variations, confirming the model’s stability and interpretability.
To perform the numerical inversion of Laplace transforms and simulate the probability density functions of execution time, custom Python scripts were developed using libraries such as SymPy 1.12, NumPy 1.25.0, and mpmath 1.3.0. The inversion was implemented using Talbot’s method for stability across a wide domain, while comparative tests were also run using Stehfest’s approximation.
All experiments were conducted on a local workstation running Windows 11 with an Intel Core i7 processor (2.6 GHz), 32 GB of RAM, and Python 3.11 environment. No GPU acceleration was used. The average execution time for processing each model ranged from 12 to 24 s depending on time discretization.