Intelligent Framework to Support Technology and Business Specialists in the Public Sector

The development of intelligent routines to support complex decision-making is not always straight-forward. In the public service the difficulties may be related to the abundance of available data sources and the number of legal standards to be met, in addition to the need for the incorporation of transparency, auditability, standardization, and desirable reuse in the IT systems. This article presents the Domain Engineering process carried out to obtain a feature model for the implementation of a Framework that uses Artificial Intelligence for dealing with the governmental rules to support public decision-making. One highlight of the put forward framework is that it supports both, end users and IT people (i.e., experts in business and in technology), that are not experienced with intelligent techniques as well as it focuses on Compliance. For this research, the Design Science Research Methodology method was used, sorting the work into the steps of the problem identification and motivation, the definition of goals, the design and development, the verification and validation of the experiments, and the communication of the results. A systematic review identifying the lack of an AI Framework in the Public Sector was carried out beforehand. The research produced a Whitebox Framework aiming to supply recommendations for both groups of users based on solutions that have already been tested and applied to know problems in their respective areas, e.g., anomaly detection, fraud identification, rule extraction, and risk management, among others focused on Compliance. Moreover, the framework was built so that it can be evolved by experts with due use.


I. INTRODUCTION
Currently, the development of complex and interactive systems is a reality in society, with a high presence in the daily lives of people and companies. According to Prencipe et al. [1], the quality integration of these systems becomes necessary, being a challenge for computing. This is a fertile field for applying Artificial Intelligence.
According to a study by Kuhl et al. [2], Artificial Intelligence algorithms are the main technological facilitators due to the inherent complex problem-solving ability of these technologies. Thus, studies in this area are often welcomed and insightful.
The associate editor coordinating the review of this manuscript and approving it for publication was Bo Pu .
Based on the study by Saltz et al. [3], Artificial Intelligence is becoming a critical strategic asset, as it allows organizations to offer new products and services based on data, achieving greater agility in decision making.
Borges et al. [4] highlighted the attractiveness of organizations using Artificial Intelligence in the last decade. As organizations increasingly use AI, they need new theories, methodologies, and frameworks. Therefore, organizations begin to need processes for capturing and managing critical meta information, which allows for showing policies and a culture designed to ensure adherence to the highest management standards and deployment of predictive models [5].
According to Figueiredo and Cabral [6], the challenge of using Artificial Intelligence in activities developed in the Public Sector is the observance of the principles of VOLUME 11, 2023 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ good administration and the realization of fundamental rights through legal frameworks. This makes research and applications of these mechanisms in the public administration even more relevant.
In this context, this study aims to conceive a Framework with Artificial Intelligence and Computational Intelligence to support public service activities focused on Compliance.

A. MOTIVATION
Due to nowadays competitive economy, there is greater demand for increasingly efficient, reliable, and adaptive systems that can be developed under cost and time constraints. Such premises have involved new structures, processes, and technologies, increasing the complexity of development (i.e., using intelligent technologies) [2].
In this sense, public organizations absorb applications for process automation in their structures, aiming to remove public servants from repetitive work and leave them with more cognitive activities.
As for the need of rapid development of engines in Artificial and Computational Intelligence, we found that there are still no tools to simultaneously support end users or Information Technology teams. Together, users and developers involved in decision-making can benefit, notably by being supported in complex decisions, which are increasing in volume and analysis difficulty [3].
It is essential to point out that despite reuse prominence in Software Engineering, AI applications are not built primarily with the concern for reuse in different scenarios, in addition to those initially considered [6].
Thus, it is also important that new developments incorporate reuse and flexibility in systems that use Artificial Intelligence and Computational Intelligence in the Public Sector, especially for Compliance (given the volume of legislation in force). This as they can be reused in varied scenarios, reducing the time and cost of developing new applications [1].

B. PROBLEMS
Public servants in the role of managers have the verify and validate documents produced in their area of competence as one of their attributions for checking Compliance with the rules. Public servants cannot claim not to know the legislation, as Compliance with legal norms is one of their attributions, and lack of knowledge is a severe fault [7].
The existence of intelligent applications that use machine learning to support the verification and validation of Compliance in public management is an asset, as excessive legislation may generate conflicts in legal provisions [8].
In this way, it is understood that providing a general definition at the conceptual level, an AI framework for the Public Sector that aims to solve complex problems and that deals with excessive data is a deed of major relevance.

C. OBJECTIVES
This research aims to provide obtained results of a produced framework that utilizes the concepts of Artificial and Computational Intelligence for the Public Sector, with a focus on supporting Compliance activities. Such Framework aims at the applications and services layer in the technology implementations dimension.
Derived from this general goal, the targets listed below investigate in more detail how the framework can meet the specific context of this study. They are: (1) Study the main Artificial and Computational Intelligence techniques that can support Public Sector activities, especially Compliance; (2) Use of Domain Engineering in three applications which produce conceptual models that reflect the similarities of aimed applications; (3) Design of a Framework and defining its variant and invariant aspects; (4) Building a Kernel for the Framework which is able to recommend techniques and actions for technology and business specialists in solving Public Sector problems, especially Compliance; (5) The instantiation of the framework itself to fill in the variant aspects to obtain the prototyping; and, (6) Validation of the Framework instance prototype to verify its viability.

D. CONTRIBUTIONS
To accomplish these objectives, we used Domain Engineering phases [9]. Thus, it was possible to identify objects and operations of a system class like those that use the concepts of Artificial and Computational Intelligence to support government activities with an emphasis on Compliance.
As pillars of the framework, three projects developed using Artificial and Computational Intelligence were used to support deemed main Compliance activities such as process mining, anomaly detection, and rule extraction.
With the help of Domain Engineering, this study elicited the features that were designed in the shape of frozen spots (i.e., invariant points) as mandatory features for all instances of the proposed framework, in addition to the hotspots (i.e., variant points).
As a thought contribution, this research proposes documenting, implementing, and prototyping a framework to contribute to technology specialists (e.g., developers) and business specialists (e.g., public managers) in government activities with an emphasis on Compliance.
The analysis of Compliance is useful for very different categories of activities, for example as filing and protesting state debts, and identifying evaders and debtors. This, in addition to applying intelligence in the analysis of various categories of artifacts produced, such as terms of reference, contracts, agreements, decrees, and bills. All of which need to be verified and validated by internal controls, together with existing regulations, both in the executive, legislative, and judicial branches at the federal, state, and municipal levels.
In addition to the contributions already highlighted, this research provides a Kernel in the Framework that can learn based on Machine Learning formalism by Secure Reinforcement so that with the inferences of technology experts, it can recommend more appropriate techniques in solving Compliance problems.
To better contextualize the contributions to academia and industry, figure 1 shows the two ranges of contributions delivered in this framework: the red range (left) for technology experts and the yellow content (right) for business experts. Another aspect of this work's contribution is to make available material for subsequent discussions regarding advanced machine learning techniques. This because the framework aims to be a whitebox, thus providing variant points (hotspots) that can be used for architectural evolution. Furthermore, as it was also thought to be instantiated on mobile devices, aspects such as data security are paramount. Therefore, features with high recognition accuracy can added by federated learning systems that is innovative [10].
In addition, as the framework was conceived in the MVC layer architecture with a central server and mobile clients, in which different users can perform different tasks to solve different classes of problems, it offers points of flexibility in the architecture (hotspots) that can aggregate advanced techniques for knowledge transfer with the use of machine learning. This enabling greater accuracy that brings valuable contribution [11].
Overall, this work is one more contribution to the digital transformation for governments, providing in a standardized and controllable way in which innovative resources, necessary for the public sector, adequately meet the needs of a 4.0 society.

II. SEARCH METHOD
To conduct this research, we used the Design Science Research Methodology (DSRM) to guide the research task. This method was applied due to its capability of orderly lead axioms into their validation/refutation, which is a growing challenge in applied research [12], [13], [14].
Technological research cannot be considered simply as applying scientific methods, as many of its results do not come from classical science. Scientific knowledge differs from technological knowledge since the former proposes a broad application while the latter proposes a restricted application. That is, it focuses on solving specific problems [13].
Based on Gregório et al. [15], we found several works and studies have shown that the DSRM has been successfully applied to create and evaluate technology-based artifacts, such as systems, services, models, methodologies, and frameworks.
According to Freitas [12], technological research must use scientific methods to provide necessary security. DSRM's considers the differentiation between natural environments, proposed by Meng et al. [16], as for the author, natural science should be concerned with describing how natural phenomena work, while technological science should be concerned with studying what is considered unnatural.
In addition to the DSRM method, Domain Engineering was used along with the analysis, design, and implementation phases [9] to discover features and help implement them in the framework.
This association of the DSRM method with Domain Engineering aims to methodologically structure the discovery of features in the analysis phase of the integrated domain and the definition and development stages of the DSRM.
To model the framework in the domain design phase, we conducted the DSRM development and demonstration stages. Finally, an instance in the implementation phase associated with the DSRM demonstration and evaluation steps. Figure 2 illustrates all phases of the combined approach, where each of the actors, inputs, and products of the research phases are shown in an orderly manner.

III. RELATED WORKS
This section presents the approaches found in a Systematic Review of the Literature carried out which broad scope was aimed to support the specification of a framework that implemented an Artificial and Computational Intelligence for the applications and services layers using compliance arguments in the Brazilian Public Sector.
This systematic review aimed to increase the understanding of the challenges in the architecture proposal and the research gaps that could be adequately explored, expanding the potential of the sought contribution.
The research began with the aforementioned systematic literature review, complemented by two quasi-systematic literature reviews that collected studies versing at answering research-related questions.
The first systematic review had the following research question: ''How can Artificial and Computational Intelligence be applied in Compliance programs?''. The protocol is available through the link <https://bit.ly/3xdwL48>.
The second quasi-systematic review had the research question, ''How do Frameworks use the concepts of Artificial Intelligence to support Compliance activities, in particular, in the Public Sector?''. The protocol is available at <https://bit.ly/3NWElG7>.  The third quasi-systematic review had as a research question, ''How do Frameworks use the concepts of Artificial Intelligence to support Compliance activities, in particular, in the Public Sector using Engineering Domain?''. The protocol is available at <https://bit.ly/35Rk1EW>.

A. LITERATURE REVIEW
To better understand the objectives of the three revisions, figure 3 shows the process of obtaining the knowledge necessary for constructing the framework.
The readings identified the breadth of the topics, contributions, and application areas, resulting in 85 pre-selected articles from the 931 articles found and evaluated according to the inclusion and exclusion criteria.
Among the 85 selected articles, the following categorization was observed: 27 of them were related to the risk area, 12 to the finance area, 10 to auditing, 9 to Law and legislation, 9 to business processes, 8 to accounting and taxes, 6 for contracts, 4 for internal control. In the selected articles, especially in risk, finance, audits, and legislation, the most used intelligent techniques were Neural and Bayesian Networks.
To meet the complementary needs of this research, two quasi-systematic reviews of the literature were conducted to obtain relevant studies that considered Domain Engineering associated with Artificial and Computational Intelligence in the Public Sector. The second review resulted in a total of 142 publications. A relevance analysis was performed for each selected study (with previously established inclusion and exclusion criteria), with 61 pre-selected studies.
A total of 89 publications were found after the application of the third review. After analyzing the metadata, 53 publications were left for detailed analysis, resulting in a classification of 4 adherents, 10 partially adherent, and 39 non-adherents. To better visualize the process carried out, a summary of the revisions and the resulting values are shown in table 1. Based on the studies carried out in the three reviews, seven studies proved related and adhered to the research questions specified in the defined protocols. Works that, after detailed analysis, resulted in the understanding of gaps and challenges for building an intelligent Framework to support technology  and business specialists in Public Sector Compliance, shown in table 2, which is classified by year of publication.

B. IDENTIFICATION OF GAPS
The gaps identified in the studies were partly due to the low correlation among Artificial Intelligence, government, framework, and Compliance. Thus, we highlighted the need to better target successful AI systems that protects the public from incorrect processing by re-using already tested and validated techniques.
The studies also revealed out three main aspects: (1) operation, (2)   In the analyzed studies, the authors observed that building a framework for the scope of Artificial Intelligence, especially for the Public Sector, is an arduous task.
In the studies, it was observed that there is a concern regarding the rules that generated difficulty in their interpretation due to the need for more mature governments for several factors. One of the factors most relevant observed was the need for more expertise in AI on the part of public VOLUME 11, 2023 managers, which can generate insecurity and confusion in its applicability.
One especial requirement of the studies investigated was the identification that the architectures were designed with objectives in the legal, ethical, and social areas in a black-box (i.e., opaque) perspective. Thus, emphasizing the important need for a white-box architecture for processes, methods, techniques, and algorithms to support technology and business experts in building intelligent solutions.

IV. CONTRIBUTIONS
The process of analysis and construction of the conceptual level features was conducted through a requirements survey. Additionally, reengineering of Artificial and Computational Intelligence projects, and application of Domain Engineering associated with the DSRM method upon these requirements, contributed with sought Frameworks' capability to support decision-making (DM) related to public activities, especially with Compliance.
The selected functionalities for the DM were anomaly detection, rule extraction, process mining, fraud detection, and risk management.
To this end, concepts from Domain Engineering and DSRM were used to devise a framework to support technology specialists and business specialists from the Brazilian Public Sector in the tasks of verification and validation of conformity, among others of public management.
The authors emphasize that an integrative architecture for the aggregation of processes, methods, techniques, and algorithms, which aims to simultaneously support technology specialists (e.g., developers) and business specialists (e.g., public managers), can be a relevant contribution to the sector.
To obtain requirements with Domain Engineering, we analyzed the work carried out in three selected projects of the application of Artificial Intelligence and Computational Intelligence in decision-making problems in the Government of the State of Pernambuco, Brazil.
The following identified elements were fully considered for the construction of a structural set that allowed experts to extend the features, thus characterizing a white-box framework.

A. DOMAIN ANALYSIS (IDENTIFICATION/DEFINITION)
The domain analysis was carried out in three previous studies, which were used as a basis (pillars) for the task identification/definition of the framework.
The first work selected, with the title ''Selection of characteristics of process models using Artificial Intelligence techniques'' [17], dealt with the modeling of processes that can be used in organizations to guide and perfect business processes.
Here, we used it to evaluate factors that would affect the search for Compliance, finding which processes would need correction before they could generate negative impacts. The work helped to solve the problem related to the difficult task of analyzing a large dataset for some normative or descriptive model.
The second work selected, with the title ''Detecting anomalies of multiple classes'' [18], dealt with the discovery of contours that could be used to find patterns of deviation. The author of that work suggested that the definition of rules for auditing has always been important but defining them in advance and considering patterns of events relevant to the topic, especially in critical applications, would be an important step.
The third work selected, with the title ''A model for selecting relevant themes in documents applied to Compliance'' [19], dealt with natural language processing. This was deemed important, as the approach was applied to characterize the information for Compliance analysis. It held a combination of two topic modeling techniques, Latent Semantic Analysis and Latent Topic Allocation. Together they yielded effective useful characterizations for common public service demands, which is central for the Framework to be produced.

1) IDENTIFICATION OF FRAMEWORK FEATURES
In this subsection, the elicited requirements for the framework were based on the reengineering process applied on the three previously described works. They were added to the requirements collected from the surveys and the interviews with stakeholders that were carried out. This made possible a comprehensive Domain Engineering associated with the DSRM research method to reveal the relevant features.
Applying Domain Analysis allowed one to discover generic classes for the development of models for the construction of Compliance policies, which were of three sorts: (1) user, (2) object, and (3) technique. All three are the base of structures that can contribute to the development of new applications in the same area.
Initially, it was necessary to verify the differences between the class diagram of the process mining project and that of the anomaly detection and rule extraction projects. This, to produce the Domain Analysis class diagram with the similarities, leaving the differences out of the conceptual representation, as the aim was to find the commonalities.
Similar features were applied to the feature model presented in the evolution of this study. It can be reported that the three studies presented relevant common features are: (i) Users, the types of users that define the problem; (ii) Objects, the problems to be solved; (iii) Technique, the approaches to solve the problem.
The general Class User features deals with those involved in the subject to be explored or resolved, recording their information for managing the objects to be treated. As far as it is concerned, the object feature is what one wants to work effectively in Compliance analysis, whether to perfect, detect, extract, etc., through applying a technique. The technical aspect is a particular way to solve the problem (object). In the three studies, based on the collected data, domain analyses were performed for the composition of an Artificial Intelligence and Computational Intelligence structure. The aim was to collect, analyze and define features at a conceptual level, focusing on the needs of those involved and finding their reasons.
It should be noted that the framework will not only solve problems related to the areas of process mining, anomaly detection, and rule extraction, but will later be complemented with other areas, such as fraud detection and risk management. This because, the problems in the Public Sector are very diversified, e.g., the collection of active debt, generation of policies for the economy, analysis of Compliance in the generation of documents, among others, all of which require support from specialists in technology and business.

2) REPRESENTATION OF FRAMEWORK FEATURES
Nineteen features/sub-features were elicited with the application of domain analysis in the selected projects and with the information collected through interviews with stakeholders. A more detailed description is available at <https://bit.ly/3eB4LQB>. It includes the high-level features and benefits to be provided for the framework. These requirements are described by applying the Feature-Oriented Domain Analysis method [20], for generating a Features Model, and then represented using the Unified Modeling Language [21], [22], [23].
The aim was to model the framework so that it could structure the specification of features, because requirements capture what the system must do, while the project shows how to build the system [24]. The elicitation process was based on domain analysis that focused on the reuse of system models from the same domain, this process does not assess requirements only with a focus on what must be developed and also on the domain to which it belongs. There one can their characteristics, these expressed in the Features Model, standing for the features through the representation of optionality or alternative selection [23], [25].
According to Czarnecki et al. [25], the Feature Model can also be called a feature diagram. Although there are some approaches to specify an FM, we chose to use the approach presented by Czarnecki et al. [26], which defines hierarchies and types of features. Relationships between features can be: (1) Optional relationships; (2) Mutually exclusive optional relationships; (3) Mandatory relationships; (4) Mutually exclusive mandatory relationships; and, (5) Dependency relationships. Figure 4 shows the feature diagram that represents the requirements of the survey carried out, with the application of domain analysis after reengineering the three selected projects, with the increment of the requirements obtained through the interviews carried out with users and IT personnel.

B. DOMAIN PROJECT (DEVELOPMENT/DEMO)
The process of building the framework model consisted of defining the conceptual structure and then developing an instance of the model to carry out Step 4 of the DSRM, which is a demonstration instantiation (i.e., proof-of-concept).
Based on the gaps revealed by previous review studies carried out before this work, the definition of the model for the use of Artificial Intelligence and Computational Intelligence for the services segment in the Public Sector with a focus on Compliance follows, being represented as a constellation of adaptive and interrelated technologies.
The conceptual model of the proposed framework, although being dully developed, was not initially aimed at being exhaustive. None the less, it is thought to be adequate for the initially selected features. Moreover, with the technologies made available by the 4 th Industrial Revolution, the possibility to incorporate Artificial Intelligence and Computational Intelligence in the various devices with which we interact daily is almost mandatory to enrich public management. That is why, learning is a central feature in our framework.
Whether in the search for a more optimized process to analyze inconsistencies in documents, in the improvement of a collection process, or in service to the taxpayer, among many other needs, the framework is deemed to be quite useful.
A repository with more details on the selected features for the framework is available at <https://bit.ly/3eB4LQB>. It also contains the areas that proved to be deficient in the studies carried out for the application of Artificial VOLUME 11, 2023 Intelligence and Computational Intelligence for the Public Sector.
Overall, we aim to improve the planning of actions using process optimization, perform classifications and predictions to solve current problems more adequately, avoid preventable situations, and group/associate data to better understand the modelling and problem resolution. Ultimately, the goal is to automate sensitive processes so that specialists stop performing repetitive mental tasks and focus on adding value to problem solving.

1) FRAMEWORK MODELING
The proposition of a framework that uses a conceptual model follows the architectural model definition. In figure 5, all the features defined in the resource model are depicted.
The architecture adopted is the Model-View-Controller (MVC), a software architecture pattern focused on code reuse and on the separation of concepts into three interconnected layers [27], [28], [29], [30]. This is useful, given the characteristics of the technological public environment.
The front-end (i.e., interaction with users and data presentation) is separated from the backend (i.e., methods that interact with the database), dividing the framework into interconnected parts (layers or components) to separate representations. That is, the internal data of the presentation forms for the users [30], becoming a recommended architecture for designing web, mobile, and desktop applications [29].
The Model layer (i.e., application logic) is the bridge between the View and Controller layers, managing the behavior of data by business rules, waiting for the call of methods, allowing access to data entered, persisted, and displayed, being the main computational structure of the architecture, as it models the problem being solved [30].
The View layer (i.e., presentation or visualization) is where the data requested from the model are displayed, allowing several views of the same data, but having as one of the main functions of the interaction with the user, who interacts with the control, for example, when an action is performed on a visual object that triggers an action on the control [30].
The Controller layer (i.e., control or controller) is the final component of the triad, mediating between input and output, commanding the view and model to be changed as required by input devices, focusing on the manipulation of the data that the user enters or updates, and sending these actions to the model and the view [30].
According to Sanchez and Althmann [27] and Krasner and Pope [30], the MVC model gains in its applicability in the construction of a framework for the following reasons: (1) management of multiple views using the same model; (2) ease of code reuse; (3) ease of maintenance, testing, and updating; (4) possibility of better scalability; (5) possibility of implementing parallelism owing to independence; (6) simplicity in interface transformation; and (7) improved performance and productivity owing to the modular structure.
Therefore, with the increase in applications developed for object-oriented programming, the separation between data and presentation is shown to be applicable, thus allowing changes in the layout to not affect the manipulation of the data, and these can be reorganized without changing the layout.
As the Framework proposed connectors, the facade pattern was used to supply a single point of access. For the connection between the layers of view, model, and control, the Bridge pattern was applied. Due to the aim of the construction of the Whitebox Framework, the Template Method, Factory Method, and Abstract Factory patterns are being applied, as they are recommended for this type of structure [31].
Mediate and Command patterns were applied between the model and control layers. The Chain of Responsibility pattern [31], [32], [33] was applied to the transversal components of the architecture.
The use of the facade pattern aimed to create a single point of access to framework components, unifying the interface in the view layer, thus defining an interface with a higher level of abstraction.
The use of the bridge pattern aimed to decouple the framework layers from their implementation so that they could vary independently.
The Template Method pattern was used to implement subclasses of the algorithm class of the framework's model layer so that they can be redefined.
The Factory Method pattern was used to define an interface for creating objects so that subclasses could decide which class to instantiate, delegating the instantiation to their subclasses.
The Abstract Factory pattern was used to define an interface for creating families of related objects so that they did not need to specify their concrete classes.
The mediator pattern aimed to define an object to encapsulate the way objects interact and promote loose coupling between objects.
The use of the command pattern aims to encapsulate the object's request, allowing parameterization for different requests.
The Chain of Responsibility pattern aimed to avoid coupling between requesters and attendants, allowing more than one object to handle the request.
The View layer handles accessing and reading external data to the framework that can be performed by different types of connectors for accessing text files, comma-separated texts, DBMS-Rs, and NoSQL databases. And NewSQLs by drivers (i.e., connection connectors) or REST (web service), and by using Application Programming Interfaces (API) to access and use resources developed externally to the Framework.
The Model layer is responsible for using Software as a Service (SaaS) to increase the potential of the Framework with additional resources, and this layer also includes approaches, algorithms, and hyperparameters, as well as training, testing, evaluation, and integration methods., allowing the addition of new components that will provide greater potential to the framework, such as editing and execution components with the Colab tool and the publication of algorithms on Github, and the Artificial and Computational Intelligence component, the Framework Kernel.
The Control layer has the purpose of storing the results obtained with the executions performed by the Framework and the data and all auxiliary resources to be able to use the learning solutions.
Transversal to all layers includes security resources, government information (e.g., intelligence obtained with the kernel), and administration resources.

2) KERNEL MODELING
The added value of using Artificial Intelligence and Computational Intelligence in a Framework for the Public Sector with emphasis on Compliance is the availability of a kernel that performs learning, being from the interaction with the environment in which it is inserted.
Learning occurs when data or tacit knowledge is provided and augment/changes the intelligent agent knowledge base. For example, the agent change as a result of its actions during its interactions with the environment (state) when a given functionality of the Framework are utilized.
The Reinforcement Learning (RL) technique is recommended when one wants to obtain a better policy for governing agent behavior. So, an expert in technology and business, uses the Environment (Framework Instance) to achieve an aim through a function that will model the policy (towards its improvement) [34].
The agent is set to interact with its environment directly, obtaining information that will be processed through an algorithm to perform actions that lead to achieving its aims. That is, using the best technique known by the Framework (i.e., stored inside the Framework at that moment) instance to solve a Public Sector problem.
In this manner, the agent learns using the interaction with the environment through a set of sensors (data input and action monitoring devices). This by using its ability to read the Environment's state and the actions performed and thus modify it, aiming to learn a control strategy, that is, a policy, that allows choosing the best action that achieves its objective.
This interaction of the agent with the environment through actions modulated by rewards and state changes makes it understand the effect of its own actions on the environment. In this way, it will store the actions that were successful, teaching the Framework instance what to do to achieve its goal.
In summary, Reinforcement Learning can be seen as knowledge of cause and effect, learning what to do, and mapping the actions taken to maximize rewards.
The Framework Kernel will make use of Safe Reinforcement Learning, which creates a safe learning process during testing and training [34], [35], [36].
With Safe Reinforcement Learning, we aimed to obtain a policy learning process that maximizes the expected return on problems in which it is important to guarantee safe performance and that respects security constraints during the learning process [37].
Constraints can include, for example, the budget cap set by the agency's expenditure planner, where procurement needs and government prioritization must always be kept below the respective caps. VOLUME 11, 2023 Thus, an Agent in the framework must not exceed the limits defined by the legislation or internal regulations of the institution while respecting the restrictions of competence. This problem can be approached in two ways: (1) By changing the optimization criteria; and, (2) By altering the exploration process.
To use this approach in the Framework Kernel, the restricted criteria method is applied, in which the return expectation is subject to one or more restrictions. For the exploration process, the exploratory behavior was applied to Machine Learning by Safe Reinforcement, which assumes that the Agent must explore and learn to weigh different actions and act optimally, avoiding the risk of potentially dangerous actions [35].
Conducting random exploration policies based on criteria that limit exploration and avoid wasted time exploring regions of the state and action spaces where an ideal policy will never be found.
To avoid undesirable situations in risky environments, we used an external knowledge base. Without it, the Agent would need to visit dangerous states at least once before labeling it as ''dangerous'' in this way, to minimize these risks. For the exploration process, Framework Kernel used the mechanism called Learning with Demonstrations [34].
Learning with Demonstrations incorporates external knowledge to supply initial knowledge as an initialization procedure, deriving a policy through a finite set of examples.
Thus, we can record a finite set of statements from a technology and business expert and provide them to the algorithm to construct a partial function, which can be used to further guide exploration, whose initialization weights are obtained using a reference of knowledge [35].
For example, an expert shows an action to derive a policy from a set of statements, and the trajectories of the state's actions are recorded. All these actions are used to derive a model of the Framework instance dynamics, and a Safe Reinforcement Learning algorithm finds the best policy in this model, so the performance is limited by the experts' demonstrations.
With the application of Safe Reinforcement Learning to generate online learning with real-time self-correction capability, the Artificial Intelligence and Computational Intelligence Framework for the Public Sector with an emphasis on Compliance will behave like a Recommender System; thus, it will become personalized for each technology or business specialist who makes use of the framework's instantiation.
The Recommender System is a form of personalized data presentation to its users, which, in the case of this research, will allow connecting technology specialists with business specialists to achieve the effectiveness of the framework's instantiation objectives (so that there is an interest in the knowledge made available). Obviously, with all the logic behind the recommendation algorithms being controlled by Artificial Intelligence.
The items to be recommended are ranked according to their relevance, and the most relevant items are displayed to the user. The Recommender System must decide on relevance and rely primarily on historical data. If an expert accesses the Machine Learning section of the Architecture about a particular problem, the Kernel will begin displaying solutions to Public Sector problems with similar themes.
A Recommender System is divided into two main categories: collaborative filtering and content-based systems. The framework Kernel will combine both approaches, as can be seen in more detail in the artifact repository at <https://bit.ly/3eB4LQB>.
The content-based approach works with the data that experts provide, either explicitly (ranking) or implicitly (by selecting a link in the framework instance).
Based on this data, a profile of the expert will be generated, which will be used to make suggestions. As the expert makes more information available or performs more actions, the engine will become more adapted [36].
The collaborative filtering approach makes use of two modes: restricted and general. In the strict sense, collaborative filtering will use the method to make automatic predictions, filter the user's interests, collect their preferences or information from other users, and collaborate.
In the narrow sense, in the collaborative filtering approach, if expert ''A'' has the same opinion as an expert ''B'' about a problem, it is likely that ''A'' will have the same opinion as ''B'' about another problem that is different from the initial problem.
For example, in collaborative filtering, the Recommender System (for Compliance problem solution with preferences) may make predictions about a problem solution that the expert can approve, given a partial list of that expert's preferences.
It is important to point out that the forecasts are specific to each expert, but they use information collected from many experts. However, in the general sense, collaborative filtering follows the process of filtering information or patterns using techniques that involve collaboration between multiple experts across data sources.
The central applied idea behind narrow and general approaches is that the historical data from experts should be sufficient to make a prediction.
Thus, based on historical data, the preferences and nonpreferences of each item in the framework instance will be processed by the kernel, which will attempt to predict how the expert would classify a new item that has not yet been analyzed.
This method is divided into two types: memory-and template-based methods. The memory-based method will use expert rank data to calculate the similarity between experts [38], [39].
In the model-based method, models are developed using supervised machine-learning algorithms for prediction.
Using these mechanisms, the recommendation process was based on the model presented in figure 6.

3) FRAMEWORK DIAGRAMS
With the presentation of the features and sub-features elicited for the framework, this section follows the diagramming of the mapped elements. The collaboration diagram presented in figure 7 aims to display the elements and their collaborations, which are: Learning, performing the learning of the action policy from the iteration of the algorithm with the prototype, making the search for the optimal policy that maximizes the reward received by the agent; Adjustment, choosing hyperparameters (reward function, learning rate, etc.) used to evaluate the learning performance of the algorithm; and, Inference, in which the agent already knows what action to take, and no longer learns from its actions, a final mode in which the instance provides a ''like'' or ''dislike'' for the actions proposed by the technology experts and/ or in business.

C. DOMAIN IMPLEMENTATION (EVALUATION/REPORT)
For an effective demonstration of the framework, its instantiation was carried out. In this section, the process of building the instantiation through its prototyping is shown so that the proposed simulations were carried out with the application of Safe Reinforcement Learning.

1) FRAMEWORK PROTOTYPING
With the diagrams built, the flow design of the Reinforcement Learning process is represented in figure 8, which depicts the learning process based on the data entered by the technology specialists in the area of Artificial Intelligence and computational intelligence, and with the data input by business experts about problems that need to have their solutions recommended by Artificial Intelligence and computational intelligence. The process begins with data entry by technology experts using various approaches, techniques, algorithms, and hyperparameters. Based on the reward matrix shown in figure 9, which is composed of the lines that are the states (classes of problems) and the columns that are the actions (families of algorithms), the reward -1 is defined for inappropriate choices and +1 for the correct choices. This is so that in the Reinforcement Learning process, Learning with Demonstrations is used, which restricts access to risk areas in the training process. Considering the knowledge of technology experts.
Thus, preventing the learning process when exploration does not enter risk areas, which can lead to inappropriate recommendations, thus allowing for the generation of a safe learning model. The recommendation matrix, shown in figure 9, is parameterized and will evolve with the insertion of new families of algorithms for solving classes of problems that are also parameterized in the framework, thus allowing its evolution with maturity.
Q-Learning is a Reinforcement Learning algorithm that does not have a model to learn the value of an action in a specific state, does not require a model for the environment, can deal with problems with transitions, and can work with rewards [34], [35]. After initializing the Q-learning table with zero values, the Machine Learning process by reinforcement was started based on the reward table created, as shown in figure 9.
With the learning of the appropriate algorithms to solve the specified classes of problems, the policy table is generated; thus, we can proceed to the training process with the data of the problems of the business experts, using these to learn which class of problem and what is the best policy; in this case, the best algorithm to solve it.
As an example of such learning, the Q-Deep Learning process was used with a 2-layer Multilayer Perceptron neural network with 64 neurons in each layer. A learning rate of 0.06 to perform the predictability of the best action is recommended for solving the problem [38], [39].
Based on the policy defined in the process, an action is recommended, generating the record in the structure shown in figure 8. This process follows the content-based model, as it uses the actions informed by the expert.
Subsequently, the Framework Kernel will verify the best policies determined for the other business experts that have similar problems and will make recommendations with the application of greater weight to this policy, thus adding to the model with the collaborative filtering process.

2) INSTANCE OF FRAMEWORK
With the three selected areas covered, namely process mining, anomaly detection, and rule extraction, the construction of the framework can now support decision-making through its instantiation.
To meet the need for a Framework with Artificial and Computational Intelligence for Compliance in the Brazilian Public Sector, we implemented in the Framework a Kernel based on the Machine Learning formalism by Safe Reinforcement Learning, aiming to show the feasibility and effectiveness of the model, which is the process guided by the DSRM research method associated with Domain Engineering.
Following up the last steps of the DSRM were carried out: evaluation and communication, we also performed statistical analysis to examine the structure of the artifact and dynamic analysis to study the artifact during its use. This enabled us to carry out a descriptive assessment by scenario.
To show the framework's operational abilities, two experimental cases were designed to cover the proposition and construction requirements: (1) Portability for users and (2) Scalability of use.
These cases show that the framework can offer recommendations for techniques (i.e., algorithms) with different characteristics for different classes of problems and for different types of users.

3) RECOMMENDATIONS
For prototyping, the tensor data structure (i.e., matrix of matrices) of recommendation was built for use in the initialization of the Q-learning algorithm of Safe Reinforcement Learning, resulting from the knowledge of the technology experts, as shown in table 4. The tensor (i.e., vector of vectors) generated by the technology experts to be the recommendation matrix is one of the elements of the prototyping building block, composed of three dimensions (state, action, and technique), with the ''state'' dimension being the classes of problems, the ''action'' the families of algorithms, and the dimension ''technical'' the algorithms.
Based on the Tensor and with the application of the Q-learning algorithm, we used Safe Reinforcement Learning with 2000 iterations. A tensor called ''TableQ'' was generated, with the recommended algorithms in bold and with weight ''+ 10''. The result of the 2000 iterations of the Q-Learning algorithm used by the Framework Kernel, which assigned the ''+10'' reward to the most recommended algorithm among the adherent algorithms for solving the problem class.

V. EXPERIMENTAL CASES
Seeking each case to meet an area of different nature, we seek to show the portability to users and scalability of use of the framework, with each case having a simulation with three scenarios to perform checks to evaluate assertiveness, regularity, predictability, probability, and executability. of the Framework.

A. CASE-1 (USER PORTABILITY)
The experimental case portability of users demonstrated the ability of the framework to serve users with different backgrounds and aims, allowing the flexibility of entries of the instantiation of the framework.
To prove the framework's ability for the case, we propose the possibility of solving the problem related to the dynamics of Pernambuco state's active debt data to find the best way of collection.
To achieve this aim, we propose a prediction of the best way of collecting the active debt of the state, whether protest or electronic filing, thus aiming to obtain greater credit recovery. In figure 10, there is a diagram that exemplifies the idea.

1) BEST FORM OF DEBT COLLECTION SIMULATION
The first simulation consisted of classifying the state's active debt data using Supervised Machine Learning formalism so that the machine learns the best form of collection, whether judicialized or protested (via a notary office).
The need to use this formalism lies in the large amount of debt data and its dynamics, making today a debt that may have protest characteristics. In the future, it can be showed for filing and vice-versa.
This simulation used 2000 episodes to evaluate the recommendation of the technique, that is, if the algorithm recommended by the kernel compared to two others chosen randomly but properly to solve the same class of problem, obtained better indicators in relation to the metrics specified in this research.

2) SCENARIO-1: ''RF''
The recommendation made by the prototype for this compliance problem in the Brazilian Public Sector was the use of the Random Forest (RF) algorithm, an algorithm used to solve the classification problem class in supervised machine-learning formalism.
RF is a learning method used for classification and regression. The algorithm scans and selects the features at random and then builds a collection of variance-controlled decision trees [40].

3) SCENARIO-2: ''KNN''
The first random choice for verification and validation of the kernel choice was the K-Nearest Neighbors (KNN) algorithm, which is a non-parametric classification method used for classification and regression. In both cases, the input consists of the K training examples closest to a dataset, with the output depending on whether KNN is being used for classification or regression [41].

4) SCENARIO-3: ''SVM''
The second random choice for verification and validation of the kernel choice was the Support Vector Machine (SVM) algorithm, which allows the generation of a representation of examples as points in space, mapped so that the examples in each category were clearly and precisely divided. Thus, new input cases are then properly mapped as belonging to one of the categories of the output space [42].

5) DATA MINIG
For the application of data mining, the cross-industry standard process for data mining (CRISP/DM) technique was used, performing the activities described by Chapman et al. [43]: (1) understanding of the business, (2) understanding of the data, (3) data elaboration, (4) data modeling, (5) data evaluation, and (6) implantation. Repeating the process until the extracted data were satisfactory [43], aiming to extract the proper dataset to solve the problem, and then standardize and balance them, and thus avoid bias in the learning process.
For this simulation, the following data were selected: (1) debt identifier, anonymized field corresponding to CDA; (2) debt value, total in reais of government debt; (3) type of person, whether natural or legal; (4) type of debt, debt constitution, whether tax or not; (5) debt status, whether subpoenaed or not; and (6) type of charge, whether protested or filed.
After the selection, cleaning, balancing, and normalization of the data, standardization was carried out to leave them on the same scale, using the method of obtaining the (y of x) by the rule y=(x-minimum)/(maximum-minimum) using the Orange Canvas Data Mining tool [44]. After the selection, cleaning, balancing, and normalization of the data, the standardization was carried out to leave them on the same scale, using the method of obtaining the (y of x) by the rule y=(x-minimum)/(maximum-minimum) using the Orange Canvas Data Mining tool [44].

6) CONFIGURATION OF HYPERPARAMETERS
To apply the evaluation factors, in addition to preparing the data, it is necessary to define the hyperparameters used by the models in the simulation to obtain the maximum proportion between them. To apply the evaluation factors, in addition to preparing the data, it was necessary to define the hyperparameters used by the models in the simulation to obtain the maximum proportion between them (see table 5). For example, the dataset used 3,990 records from the Register of Active Debt of the State of Pernambuco with six fields, in which one field was the identifier used as a goal, and four fields were used to extract characteristics: one was a numeric field, three categorical types, and one aim field. For this simulation, the dataset used 3,990 records from the Register of Active Debt of the State of Pernambuco with 6 fields, in which 1 field is the identifier used as a goal, 4 fields used to extract characteristics, 1 is a numeric field, 3 categorical types, and 1 aim field.
For this dataset, 70% were used for training and testing, resulting in 2,793 records, and 30% for validation, resulting in 1,197 records, using a cross-validation technique with 5 folds. For this dataset, 70% were used for training and testing, resulting in 2,793 records, and 30% for validation, resulting in 1,197 records, using the cross-validation technique with 5 folds.
Cross-validation is a technique used to evaluate the generalization capacity of a model from a set of data, seeking to estimate the accuracy of the model, that is, how its performance is related to a new set of data. data [45]. Cross-validation is one of the techniques to evaluate the generalization capacity of a model from a set of data, seeking to estimate how correct the model is, that is, how its performance is in relation to a new set of data. data [45].

7) EVALUATION FACTORS
The evaluation factors are the learning quality indicators, aimed at carrying out an analysis of the recommendations made by the kernel for the proposed simulations [46]. The evaluation factors are the learning quality indicators, aiming to carry out the analysis of the recommendations made by the Kernel for the proposed simulations [46]. The factors applied are as follows: The assertiveness Factor (AF) is the level of success of the model recommended by the kernel compared to randomly chosen models that can solve the same class of problem, using the same number of iterations through the metrics of accuracy (A), precision (P), recall (R), and F1 (F) [46]. As seen in table 6, Assertiveness Factor (AF), the level of success of the model recommended by the Kernel compared to randomly chosen models that can solve the same class of problem, using the same number of iterations through the metrics of Accuracy (A), Precision (P), Recall (R) and F1 (F) [46]. As seen in table 7, Regularity Factor (RF): This evaluation verifies the percentage of success of the models based on a new dataset. Regularity Factor (RF), this evaluation verifies the percentage of success of the models based on a new data set. That is, it verifies how the model behaves with data that were never used in the training and testing phases. Predictability Factor (PF) allows the visualization of the two dimensions, ''current'' and ''forecast,'' through the combination of dimensions and thus verifies the performance of the model for the classes. As seen in table 8, Predictability Factor (PF) allows the visualization of the two dimensions, ''current'' and ''forecast'', through the combination of dimensions and thus verifies the performance of the model for the classes.
The probability Factor (OF) compares the area under the ROC curve with the score of the model in the row when it is greater than the model's score in the column. As seen in table 9, Probability Factor (OF) displays the model comparing the area under the ROC curve with the model's score in the row when it is greater than the model's score in the column.
Finally, as seen in table 10, Executable Factor (EF), execution time in seconds of training and testing performed  by the kernel-recommended model compared to randomly chosen models that can solve the same class of problems. Executable Factor (EF), execution time in seconds of training and testing performed by the Kernel-recommended model compared to randomly chosen models that can solve the same class of problem.

B. CASE-2 (USE SCALABILITY)
The scalability of the experimental use case was deemed to demonstrate the ability of the framework to use intelligent computing, offering scalability for the use of the generated instance. The use scalability of the experimental use case was deemed at demonstrating the ability of the Framework to use intelligent computing, offering scalability for the use of the generated instance. This, even if when data inputs increase, and the processing time will not increase exponentially.
To prove the ability of the framework for the case, we offset the framework for solving the problem that deals with the difference in the application of penalties in the fund collection modalities, differentiating debtors from evaders. To prove the ability of the Framework for the case, we offset the Framework for solving the problem that deals with the difference in the application of penalties in the funds collection modalities, differentiating debtors from evaders.
To achieve this, we grouped the data of individuals and legal entities that make up the state's active debt registry into two groups: debtors and evaders. To achieve the is, we sought to group the data of individuals and legal entities that make up the state's active debt registry into two groups, debtors and evaders. Aiming, as a result, the correct application of legal penalties. Below is a diagram that exemplifies the idea in figure 11.

1) DEBTOR PROFILE DISCOVERY SIMULATION
The second simulation consisted of grouping the data of individuals and legal entities that comprise the state's active debt registry to use Unsupervised Machine Learning formalism. The second simulation consisted of grouping the data of individuals and legal entities that make up the state's active debt registry to use the Unsupervised Machine Learning formalism. This is so that the machine can group the data that have common characteristics, and then, with the support of business specialists, groups of evaders or debtors can be found and labeled. This is so that the machine can group the data that have common characteristics, and then, with the support of business specialists, the groups of evaders or debtors can be found and labeling them. This identification is important to take proper legal action for each identified group of taxpayers.
In addition, because of the large amount of data in the debt registry and the change in data behavior in relation to the characterization of debtors and evaders resulting from changes in the country's economy and politics, it is difficult to create a rule that separates these two profiles, requiring the algorithm itself to be found. In addition, due to a large amount of data in the debt registry and the change in data behavior in relation to the characterization of debtors and evaders resulting from changes in the country's economy and politics, it is difficult to create a rule that separates these two profiles, requiring that this rule be found the algorithm itself.
This simulation used 2000 samples with random initialization to evaluate the recommendation of the technique; that is, if the algorithm recommended by the kernel, compared to two others chosen randomly but proper to solve the same class of problem, obtained better indicators in relation to the metrics used in this simulation.

2) SCENARIO-1: ''KM''
The recommendation made by Kernel for this Compliance problem in the Brazilian Public Sector was the use of the K-means (KM) algorithm, an algorithm used to solve the clustering problem class in Unsupervised Machine Learning formalism [47].The recommendation made by Kernel for this Compliance problem in the Brazilian Public Sector was the use of the K-Means (KM) algorithm, an algorithm used VOLUME 11, 2023 to solve the clustering problem class in the Unsupervised Machine Learning formalism [47].
KM starts the clustering process by randomly selecting the first center, but subsequent ones are chosen from the remaining points with a probability proportional to the squared distance from the nearest center, updated with other iterations, re-running the algorithm from random starting positions, and when the result is the smallest sum of squares in the cluster, considering the number of iterations, the execution ends [47].

3) SCENARIO-2: ''HCA''
The first random choice for verifying and validating the kernel choice is the Hierarchical Clustering (HCA) algorithm. The first random choice for verification and validation of the Kernel choice was the Hierarchical Clustering (HCA) algorithm. The hierarchical clustering algorithm or hierarchical cluster analysis is used in data mining and statistics and is usually presented in a dendrogram [48].
HCA is a cluster analysis method that seeks to build a hierarchy of clusters, which can be divided into two strategies, the agglomerative one, which is a ''bottom-up'' approach in which each observation starts in its own cluster, and the cluster pairs are merged as you go up the hierarchy, and the divisive, being a ''top-down'' approach where all observations start in a cluster and divisions are performed as you go down the hierarchy [48].

4) SCENARIO-3: ''SOM''
The second random choice for verification and validation of the kernel choice is the Self-Organizing Map (SOM) algorithm. The second random choice for verification and validation of the Kernel choice was the Self-Organizing Map (SOM) algorithm. An algorithm was used to solve the clustering problem class in the Unsupervised Machine Learning formalism.
SOM is a technique that produces a low-dimensional representation of a high-dimensional dataset while preserving the topological structure of the data. SOM is a technique that looks to produce a low-dimensional representation of a higher-dimensional dataset, preserving the topological structure of the data. These clusters can then be visualized as a two-dimensional map so that observations in proximal clusters have more similar values than observations in distant clusters [49].

5) DATA MINING
For the application of data mining, the Cross Industry Standard Process for Data Mining (CRISP/DM) technique was used, repeating the process until the extracted data were satisfactory [43].
To extract the proper dataset to solve the problem, we standardize and balance them, and thus avoid bias in the learning process. Aiming to extract the proper data set to solve the problem, to then standardize and balance them, and thus avoid bias in the learning process. For this simulation, the following data were selected: (1) Debt identifier, anonymized field corresponding to CDA; (2) Name of the debtor, anonymized field; (3) Type of person, whether natural or legal; (4) FU, federal unit of the debtor; (5) Modality, form of debt collection; (6) Type, type of debt; (7) Situation, debt situation; and, (8) Cause, debt value.
After the selection, cleaning, balancing, and normalization of the data, the standardization was carried out to leave them on the same scale, using the method of obtaining the (y of x) by the rule y=(x-minimum)/(maximum-minimum) using the Orange Canvas Data Mining tool [44] performing the Extract Transform Load (ETL).

6) CONFIGURATION OF HYPERPARAMETERS
To apply the evaluation factors, in addition to preparing the data, it is necessary to define the hyperparameters used by the models in the simulation to obtain the maximum proportion between them. For this simulation, the dataset used 4,130 records from the Register of Active Debt of the State of Pernambuco with eight fields, in which two fields, the identifier, and the name were used as a goal, six fields were used for characteristics extraction, one field of numeric type and 5 of categorical type.
For this dataset, 70% were used for training and testing, resulting in 2,891 records, and 30% for validation, resulting in 1,239 records.
For Scenario-1, the KM model recommended by the kernel was applied, which generated 1,436 records for Cluster-1 and 1,455 records for Cluster-2. For Scenario-2, the randomly chosen HCA model was applied, which generated 2,886 records for Cluster-1 and 5 records for Cluster-2. For Scenario-3, the randomly chosen SOM model was applied, which generated 712 records for Cluster-1 and 548 records for Cluster-2.
As the aim of Unsupervised Machine Learning is to group the data by similarities, for the application of the Evaluation Factors, the data of the three scenarios were labeled based on the knowledge of the business specialists, leaving the cluster data with the debtor label. 1, and with evaders, we label the data from Cluster-2.
After labeling the clusters, a comparison was made with the known data of debtors and evaders to obtain the five evaluation factors for each of the three scenarios and to obtain a general picture.
For this simulation, the known dataset used 1,239 records from the Register of Active Debt of the State of Pernambuco with six fields, in which two fields are the goal, the identifier, and the anonymized name; three fields for extracting categorical characteristics; and one aim field, the cluster.
For this dataset, 70% were used for training and testing, resulting in 869 records, and 30% for validation, resulting in 371 records, using a cross-validation technique with 5 folds.

7) EVALUATION FACTORS
The evaluation factors are the learning quality indicators, aimed at carrying out an analysis of the recommendations made by the kernel for the proposed simulations [46]. In this comparison, the Q-Deep Learning algorithm was used, consisting of a neural network with 2 layers of 64 neurons each using ReLU and Descending Gradient as activation functions with a learning rate of 0.0001 performing 2000 iterations.
As seen in table 12, Assertiveness Factor (AF): the level of success of the model recommended by the kernel compared to the models chosen randomly using the same number of iterations through the metrics of accuracy (A), precision (P), recall (R), and F1 (F). As seen in table 13, Regularity Factor (RF): This evaluation verifies the percentage of success of the models based on a new dataset. That is, it verifies how the model behaves with data that were never used in the training and testing phases. As seen in table 14, Predictability Factor (PF) allows the visualization of the two dimensions, the ''current'' and ''forecast,'' through the combination of dimensions and thus verify the performance of the model for the classes.
As seen in table 15, the Probability Factor (OF) compares the area under the ROC curve with the score of the model in the row when it is greater than the model's score in the column.

8) PRODUCTIVITY ANALYSIS SIMULATION
The simulation identified the optimal point between the two distinct objectives (efficiency and efficacy) in the  productivity of procedural analysis tasks performed by prosecutors.
Thus, allowing a fairer assessment of the productivity of prosecutors because the objectives that guide this analysis are efficiency (in the speed of analysis and delivery of processes) and effectiveness (in the rightness of this analysis).
Using a multimodal and multi-objective optimization technique, the optimum point was obtained between the objectives, allowing a fairer evaluation.
This simulation used 2000 episodes with random initialization to evaluate the recommendation of the technique. That is, if the algorithm recommended by the kernel is compared with two others randomly recommended but appropriate to solve the same problem class, better indicators are obtained.

9) SCENARIO-1: ''NSGA2''
The objective of Scenario 1 was to observe the evolution of the states for each initialization and evaluate the performance of the actions. Thus, it was possible to evaluate the convergence and characteristics of the recommended action.
The recommendation made by the prototype for this compliance problem in the Brazilian Public Sector was the Non-dominated Sorting Genetic Algorithm (NSGA). Kernel recommendation was used after the ETL to perform its learning, generating predictability for which process should be analyzed first.
The NSGA2 or Non-Dominated Classification Genetic Algorithm is a multi-objective optimization metaheuristic that can be termed ''multi-objective programming,'' ''vector optimization,'' ''multi-criteria optimization'' or ''multiattribute optimization,'' or ''Pareto optimization,'' being a multi-objective decision-making area to be optimized simultaneously for two or more conflicting objectives [50]. The objective of Scenario 2 was to compare the evolution of observable states for each of the initializations, as well VOLUME 11, 2023 as to evaluate the performance of the actions. Thus, it is possible to evaluate the convergence and character of the recommendation action concerning other scenarios.
The first random choice for the verification and validation of kernel choice was the AGEMODEA algorithm, an algorithm used to solve the optimization problem class in Swarm Intelligence formalism.
Adaptive geometry estimation is a metaheuristic method for multi-objective optimization [51].

11) SCENARIO-3: ''CTAEA''
The objective of Scenario 3 was to compare the evolution of observable states for each of the initializations, as well as to evaluate the performance of the actions. Thus, it is possible to evaluate the convergence and character of the recommendation action concerning the other scenarios.
The second random choice for the verification and validation of kernel choice was the CTAEA algorithm, which is an algorithm used to solve the optimization problem class in Swarm Intelligence formalism.
The Two-Archive evolutionary algorithm for constrained multi-objective optimization is a metaheuristic for multipurpose optimization [52].

12) DATA MINING
For the application of data mining, the Cross Industry Standard Process for Data Mining (CRISP/DM) technique was used, repeating the process until the extracted data were satisfactory [43].
For this simulation, the following data were selected: (1) attorney, identification of the anonymized prosecutor; (2) process, identifier of the anonymized process; (3) complexity, level of complexity of the process; (4) page, number of process pages; (4) deadline, maximum period to carry out the analysis of the process; (5) review, number of revisions already carried out in the process; (6) delivery, number of days already elapsed in the analysis; and (7) value, the value of the cause.

13) CONFIGURATION OF HYPERPARAMETERS
To apply the evaluation factors, in addition to preparing the data, it is necessary to define the hyperparameters used by the models in the simulation to obtain the maximum proportion between them.

14) EVALUATION FACTORS
The evaluation factors are learning quality indicators, aiming to analyze Kernel's recommendations for the proposed simulations.
Assertiveness Factor (AF), the level of accuracy of the model recommended by the Kernel compared with the models randomly recommended using the same number of iterations through the Accuracy (A), Precision (P), Revocation (R1), and F1 (F) metrics.  The convergence factor (CF) was used to analyze the convergence curve of the model between time and interactions.

C. DISCUSSIONS
The experimental study was based on the process proposed by Wohlin et al. [8] and was divided into the main defining activities. The experiment was defined in terms of the problems, objectives, and goals. Then, in the planning, where the design of the experiment was determined, the instrumentation and threats to the experiment were considered.
The objective of this experiment was to prove the ability of the framework to meet different types of users and demonstrate its ability to serve users for different purposes, thus enabling the framework's flexibility to be used.
The experiment was carried out online by prosecutors and a team of software engineers of the Coordination of Systems, Digital Automation, and Innovation of the Attorney General of the Republic of Pernambuco, as well as by Management Analysts of the State Agency of Information Technology and Communication of the State of Pernambuco, and executed in a distributed manner; that is, the experimenters were free to choose the time and place for the experiment.
The convenience sampling technique selected the experimenters for the experiment, and the resources were more appropriate for the attorney general selection because the simulations were based on the data made available by the agency, which was the main motivator of its choice.
After the design and planning of the experiment, it was applied so that data collection could be analyzed, that is, the operationalization of the experiment. The operation of this experiment was divided into three phases: (1) preparation, where the chosen experimenters were informed, and the prepared material was made available; (2) execution, where the experimenters performed the activities according to the treatment, with data collection; and, (3) validation, where the collected data were validated.
With these simulations, we could assess whether the framework can support different types of users (i.e., user portability) and solve different classes of problems (i.e., use scalability).
The artifacts used are available at the link <https:// bit.ly/3OFZViP> for more details about the experiments and their results. We continue with the discussions resulting from the analysis with the results obtained.
Case 1, called User Portability, aimed to verify the ability of the framework to serve different types of specialists simultaneously. For its validation, a simulation was used to propose better ways to collect the outstanding debt, based on the Supervised Machine Learning formalism, solving a problem of the prediction class using statistical algorithms, which were: Random Forest (RF), K-Nearest Neighbors (KNN), Support Vector Machine (SVM).
The problem sought to solve was the dynamics of the state's active debt data, generating the need to find the best form of collection, aiming to predict the best way of redeeming the state's active debt, whether protest or electronic filing, and thus obtain a greater credit recovery.
Using three scenarios with the application of evaluation factors, we can see from the results obtained and presented in the general evaluation table (table 19) that the algorithm recommended by the Kernel, the RF, obtained the best general evaluation based on the evaluated values. Factors, followed by KNN and SVM.
After the application of learning with the technique recommended for technology specialists, these data were used by the kernel, which used them to learn their characteristics with the Q-Deep Learning technique and thus recommend the best way of collecting active debts, which showed more assertive recommendations for business specialists.
Thus, we argue that the kernel recommendation process, even without having a knowledge base with a volume of thousands of collaborations, relying more on learning by demonstration, which was the initialization base provided by the specialists, has already presented satisfactory results, but with greater collaboration from experts, the knowledge base and confidence in the recommendations will be further enriched. With this simulation, it was possible to prove that the framework can serve users of different types, in which case, technology specialists and business specialists, users who have different needs, know which technique to use to learn from the data and with the same data to predict the actions, thus using the same data to meet the needs of different users.
Case 2, called Use Scalability, aimed to verify the ability of the framework to solve problems of different classes. For its validation, a simulation was used to select documents with a variability of characteristics, based on the Unsupervised Machine Learning formalism, to solve a grouping class problem using neural and statistical algorithms, which were: K-Means (KM), Self-Organizing Map (SOM) and Hierarchical Clustering (HCA).
We aimed to discover the profile of debtors and correctly group them into debtors and evaders for a more assertive application of the collection process.
Using three scenarios with the application of evaluation factors, we observed the results obtained and presented them in the general evaluation table (table 20), and the algorithm recommended by Kernel (KM) obtained the second-best general evaluation based on the evaluated factors, followed by SOM, with the best evaluation being HCA.
We emphasize that the kernel recommendation process, because it still does not have a reasonable knowledge base, relies more on learning-by-demonstration. This was the initialization base provided by the technology experts, needs more collaboration on the part of the experts to enrich the knowledge base for generating more assertive recommendations.
Even though the Kernel recommendation for the technology specialist was not the most convergent, those randomly recommended that solve the same class of problems served to indicate the best technique for this type of problem. This learning for the Kernel after using the data using the Q-Deep Learning technique, also revealed that the recommendation of the profiles was more assertive for business specialists. The last simulation aimed to verify the ability of the framework to solve problems with numerous conflicting objectives. For validation, the simulation of productivity evaluation of prosecutors based on the formalism of Swarm Intelligence was used to solve the problem of the optimization class using evolutionary algorithms, which were: (1) Non-dominated Genetic Algorithm (NSGA), (2) Adaptive Geometry Estimation for Objective (AGEMOEA), and (3) Two-Application Evolutionary Archive Algorithm (CTAEA).
The problem was solved with to two distinct objectives that characterize productivity, so it was necessary to determine how to evaluate it, aiming to seek the optimal point between the objectives of efficiency and effectiveness, making the evaluation process fairer.
By using three scenarios with application of the evaluation factors, it was possible to observe through the results obtained and displayed in the general table of evaluations (table 21) that the NSGA2 algorithm had a better performance than the AGEMODEA followed by the CTAE. Thus, we evaluated that, with the balance of hyperparameters, the framework recommended the NSGA2, which had the best evaluation among the three scenarios.   With this simulation, we can prove that the framework can also meet complex problems with N dimensions, enabling users to work with many dimensions that seek to solve one, two, or more distinct objectives. Figures 12-21 display the participants characteristics and perception (details of that next), and figures 22-26 reveal the quality of results obtained on all simulations.
In the experiment, the process of Wohlin et al. [8] was used to verify and validate the framework, with the goal (i.e., what is experienced) the framework instance as a tool used to support decision-making, with the purpose (i.e., what intention of the experiment) evaluating the recommendations provided, with the focus (i.e., what effect of the experiment) problem solving of the Brazilian public sector.
To achieve this objective, quantitative and qualitative questions were defined, where quantitative questions were     related to the execution data of the experiment, and qualitative questions were related to the experimenters' feedback.
Concerning the data used in the experiment, the experimenters used the dataset of the Attorney General's Office of    the State of Pernambuco, in particular, of the Active Debt Center of the Treasury Attorney's Office of the state's active debt registry.
The experiment used only one independent variable, and the framework generated recommendations for technology and business experts. The dependent variables for this experiment were accuracy, precision, recall, and F1 on the main assets of the recommendations, in addition to execution time and convergence, performed online and executed in a distributed manner. The experimenters were free to choose the time and place of the experiment.
The participants of this experiment were selected by the convenience sampling technique, that is, the most appropriate    For verification and validation with the chosen metrics, three scenarios composed of appropriate techniques were used to solve the same problem class. Scenario 1 comprises the technique suggested by the Kernel, and scenarios 2 and 3 are other techniques appropriate for the same problem class. Thus, the results were based on the experiments performed.
With these simulations, we could assess whether the framework can support different types of users (i.e., user portability) and solve different classes of problems (i.e., use scalability).

VI. CONCLUSION
The DSRM methodology and Domain Engineering (DE) were applied with a focus on reuse, and Artificial Intelligence and Intelligence Computational for Safe Reinforcement Learning.
The produced framework has core support capabilities for the decision-making of two different types of users to solve different classes of problems.
The motivation for this research was that many public organizations had already adopted applications for process automation, aiming to avoid repetitive work and produce more efficient results; however, there was a lack of intelligent mechanisms to support complex decision-making.
To this observation, the research hypothesis was ''How could the formal specification of an intelligent Framework for the application and services layer with an emphasis on Compliance be suitable for the Brazilian Public Service?'' Thus, we sought to contribute a solution to this problem.
Given the inherent characteristics of Artificial Intelligence and the need to use Machine Learning, it was considered necessary to incorporate the DE phases into the DSRM steps, contributing to the method, with the DE phases interspersed with the DSRM steps following the following logic: (i) Domain Analysis, interspersed between steps (1) identification and (2) Definition of the DSRM, with the application of domain analysis methods using technical reading techniques, interviews, consultations with experts, and surveys of current and proposed features.
(ii) Domain Design, interspersed between stages (3) development and (4) Demonstration of the DSRM, with domain design models applied using taxonomy techniques and architectural and design patterns.
(iii) Domain Implementation, interspersed between steps (5) evaluation and (6) Communication of the DSRM, using universal languages for the construction of the artifacts of modeling and architecture.
Domain Engineering was applied in three seminal studies of Artificial Intelligence, and Computational Intelligence, focusing on the areas of control and audit to facilitate and optimize processes. Notice that the use of Domain Engineering is a recommended method for collecting features, evidencing that the investigation of similarities in projects can generate new knowledge, and thus facilitate the construction of new solutions.
With the discovery of the features, the modeling activities began after the application of DE in the three studies revealed similarities, and these helped in the construction of generic classes, allowing the construction of a conceptual model as generic as possible, but with the concern of maintaining the necessary functionalities based on the discovered features, applicable to solve problems in the Brazilian Public Sector.
The development of the proposed framework followed the architectural pattern of control, model, and view, with the use of object orientation and the established concepts of inheritance, polymorphism, and encapsulation, focused on reuse. We argue that this architecture can produce more robust applications, as problems involving domain complexity and high taxonomy have been solved, such as those of Artificial and Computational Intelligence applied to the Brazilian Public Sector.
For the elaboration of the architecture, diagrams with a Unified Modeling Language were built, which resulted from the reengineering of the projects, Domain Engineering, and interviews.
The construction of the feature model based on Domain Engineering and interviews with stakeholders was also carried out, with the design of the architectural model of the framework.
The proposed framework uses Artificial Intelligence to learn from the interaction of its agents that will perform actions in the environment using Safe Reinforcement Learning. The Reinforcement Learning technique was applied using the Q-Learning table so that, with the definition of states, problem classes, and actions, families of algorithms, with the application of learning by demonstration, a map was generated from policies to recommendations in support of decision making.
The implementation used the knowledge of experts in Artificial Intelligence technology to determine the best applicability policies of problem-solving techniques. With the policy table defined for the best algorithms for the classes of problems, work began on the study and definition of the Q-Deep Learning method as a tool for recommending the best policies for the techniques to be applied to problems specified by specialists in the business.
To experiment with the instantiation of the Framework, aiming to verify and confirm the resources elicited for its construction, we propose two experimental cases: ''Case-1: portability to users'' and ''Case-2: scalability of use''.
Application prototyping performed the verification and validation of two simulations: ''simulation-1: identification of the best way to collect the debt'' and ''simulation-2: discovery of debtor profile''.
For each simulation, three scenarios were used, allowing the application of the evaluation factors in the framework in relation to the recommendations resulting from Machine Learning with the formalism by reinforcement in the safe mode for verification and validation of the elicited and built features. Generating contributions to both academia and industry.

A. CONTRIBUTIONS TO ACADEMIA
This research contributes to the state of the art at the confluence of Software Engineering and Computational Intelligence with the proposition of a framework that uses an Artificial and Computational Intelligence engine that produces recommendations based on Safe Reinforcement Learning to concomitantly meet different user types when solving problems of different classes.
In the tested case, for the first type of user, technology specialists, based on the data inserted in an instance of the framework, received recommendations of algorithm templates suitable for a given class of problem. Allowing the use of Framework instance parameters with realtime interactions. For the second type of user, business specialists, also based on interactions with the Framework, these users receive recommendations for decision making. This allows for more assertiveness, also with real-time interactions.
This contribution takes place with the use of a Reinforcement Learning model composed of three ''filtering'' or ''recommendation'' methods, with the proposition of supporting specialists using Safe Reinforcement Learning available in the Kernel of this Framework.
Although the contribution offered allows for proper recommendations, for example for the Brazilian Public Sector via Learning with Demonstrations, this could be generalized. Moreover, the content-based and collaborative model, using the memory technique and models, produces assertive recommendations, which is a novelty.

B. CONTRIBUTIONS TO INDUSTRY
The availability of a white-box framework for Artificial Intelligence and computational intelligence with the possibility of evolution offers both the community of technology and domain experts an empowering tool in the Public Sector with Compliance applications.
The Framework supplies Artificial Intelligence and Computational Intelligence algorithm templates, allowing technology specialists who do not have in-depth knowledge of Artificial and Computational Intelligence to still use the recommended solutions for specific problems. The Framework also supports business experts in their decision processes, who can use algorithms already developed and tested on similar problems.
Because of the use of Safe Reinforcement Learning formalism to support decision making for choosing the best Artificial Intelligence and Computational Intelligence technique for a given class of problem, it is also deemed to be a practical contribution.
The Framework also aims to provide several Artificial and Computational Intelligence techniques that have already been properly tested and confirmed by the community to solve classes of problems related to the Brazilian Public Sector, with a focus on compliance.
Finally, we highlight the availability of a functional architecture for the application and service layers, which allows savings, security, and management of Artificial Intelligence and computational intelligence in the use of techniques to solve problems in the public sector, especially for Compliance.

C. LIMITATIONS AND THREATS
This research proposed a framework that can support decision making using Artificial and Computational Intelligence, but limitations were found at the methodological and technological levels.
At the methodological level, the proposal and modeling of the framework faced the following limitations.
The first is related to the rules and dynamics of access to data in the Brazilian Public Sector, which are complex because the General Data Protection Law restricts access to public managers.
The second methodological limitation consisted of using the Content-Based Collaborative Recommendation method because of its relevance in the Reinforcement Learning process; it would be necessary to have a larger number of specialists collaborating for an extended period.
At the technological level, the following limitations were found in the implementation of this framework.
Regarding the architectural model, which uses machine learning directly influenced by the number of iterations, one of the hyperparameters, the value of 2000 iterations, was used in all simulations owing to the hardware restrictions.
Another limitation concerns data transmission, which causes communication failure. The prototyping was built to simulate the layered architecture, with the communication of the client layer (browser) with the server layer (business rules) with the persistence layer (database), and the service used was free hosting. Thus, the communication time was significantly reduced, impairing the performance of the simulations.

D. FUTURE WORKS
This Framework can evolve with more cases to expand its architecture, since this research focused on the Brazilian Public Sector in the executive sphere. It can be expanded to the legislative and judiciary, not restricted to the Brazilian scope.
Domain Engineering was applied in state government projects, proposing the evolution of this milestone the application of the method in federal and municipal government projects.
Finally, owing the abovementioned limitations, it is necessary to broaden the evaluation base of the Content-Based Collaborative Recommendation method so that the recommendations resulting from the Kernel Framework's Reinforcement Learning process can be adequately addressed. His current research interests include artificial/computational intelligence, modeling/simulation of real complex problems, and decision systems explainable via computational semiotics. VOLUME 11, 2023