Яндекс.Метрика Рейтинг@Mail.ru
KARKAS: a toolkit for creating a knowledge base
KARKAS: the shell for creating a knowledge base

Registration »         Forgot password »

04 Август 2022

07 Февраль 2019
MODEL OF HIERARCHICAL FUNCTIONAL SYSTEM FOR CLUSTER ANALYSIS Collection of Scientific Papers of KhNUPS 2(56). Kharkiv, 2018, p. 82 - 88. The model of the hierarchical functional system of the subject area...

24 Апрель 2015
Laboratory workshop on the system "KARKAS" / Computer Based Training Contains laboratory work, the purpose of which is the practical development of skills in the construction of knowledge bases by users using a tool...
24 Апрель 2015

Laboratory workshop on the system "KARKAS" / Computer Based Training

Contains laboratory work, the purpose of which is the practical development of skills in the construction of knowledge bases by users using a tool for creating knowledge base models in the KARKAS system (system site http://it-karkas.com.ua). Guidelines for providing distance learning are given: a brief theoretical material for performing independent and individual work.
Keywords: knowledge base models, expert systems
LAP-PUBLISHING/Laboratory practical work on the system KARKAS
It includes laboratory work, the purpose is the development of practical skills of users in the design of knowledge bases using the tool to create a knowledge base of models in the computer system "FRAME" (http://it-karkas.com.ua system site). The methodical recommendations for distance learning: a brief theoretical material to carry out independent and individual work.
Keywords: model of knowledge bases, expert systems

AMAZON COM/Laboratory workshop on the KARKAS system
AMAZON FR/Laboratory workshop on the KARKAS system
Laboratory workshop on the system "KARKAS" FACEBOOK
Laboratory workshop on the system "KARKAS"/Computer Based Training OZON RU


Introduction 3
Module 1. Conceptual foundations of AI. Knowledge modeling and inference mechanisms 4
Laboratory work 1. KARKAS - a tool for creating models of knowledge bases. General principles  
Laboratory work 2. The concept of knowledge representation in the system KARKAS 12
Laboratory work 3. Building rules and frames in the KARKAS system 20
Module 2. Applied intelligent systems. Methodology and design tools 34
Laboratory work 4. Methodology for building a knowledge base model in the KARKAS system 34
Laboratory work 5. Development of a knowledge base model in the KARKAS system 43
Self-diagnosis checklist 51
Recommended reading 54

The laboratory workshop is dedicated to one of the main areas in computer science - artificial intelligence (AI). It is especially relevant today, when in the context of the developing Internet, knowledge of the subject area is directly used to solve an increasing number of problems, and AI methods are increasingly used to solve traditional problems. In this regard, knowledge of the languages ​​and methods of AI, models and means of representing knowledge and the ability to use them becomes vital for a modern specialist in the field of economics.
The main goal of the laboratory workshop is to study mathematical models, AI methods and software for designing intelligent information systems in the economy.
Objectives of the laboratory workshop:
to give students a systematic knowledge of the main models, methods, tools and languages ​​that are used in the development of AI systems;
to familiarize students with the main methods of finding solutions that are used in AI systems;
to form the student's analytical abilities that would allow him to make an informed choice of the studied methods, means, and if solving problems from the problem area in which they specialize.
When studying this discipline, the student must master the following competencies:
make a comparative analysis and justify the choice of a model and means of knowledge representation;
build a model of a given subject area using the studied means of knowledge representation;
apply new methods for solving problems in the subject area;
make a comparative analysis and justify the choice of the AI ​​language for solving the problem.
The updated user interface of the KARKAS system is available at http://it-karkas.com.ua.
Module 1. Conceptual foundations of AI. Modeling Knowledge and Inference Mechanisms
Lab 1
FRAMEWORK is a tool for creating knowledge base models. General principles
Purpose: to familiarize students with the general concept of building database models using the KARKAS tool.
Basic information. An expert system (ES) is a program that emulates the interaction of a user with a human expert when solving a specific problem [1–10].
Many ES are not difficult to build in the presence of an expert system shell - a program that allows the user to fill the knowledge base of a certain structure with specific knowledge of the subject area.
More complex ES include confidence factors that allow you to choose several possible solutions with different degrees of confidence.
Any ES of a production type (based on rules) must contain three main components: a knowledge base (KB), a fact base (FB) and an inference engine.
KB is knowledge about the subject area formalized with the help of production rules.
BF is a set of facts describing the current situation. The content of the BF in the process of consultation with the EC usually increases in volume as the rules are applied.
The output machine performs two main functions:
viewing existing facts and rules, as well as adding new facts to the BF;
determine the order in which rules are viewed and applied. The order can be direct or reverse.
Direct order - from facts to conclusions. In the ES with direct conclusions based on known facts, a conclusion is sought that follows from these facts. If such a conclusion can be found, it is entered in the BF. Direct inferences are often used in diagnostic systems and are called data-driven inferences.
The reverse order of inference is from conclusions to facts. In systems with backward inference, some hypothesis about the final proposition is first put forward, and then the inference engine tries to find facts that could confirm or disprove the hypothesis put forward. The process of finding the necessary facts may include a sufficiently large number of steps, while it is possible to put forward new hypotheses (goals). Reverse inferences are driven by goals.
The inference engine determines the order in which the rules are applied, and also determines whether there are more facts that can be changed if the work continues (with non-monotonic inference). The following steps are performed in the inference engine loop:
comparison (unification) - the antecedent of the rule is compared with the facts from the BF;
conflict set resolution - selection of one of several rules if they can be applied simultaneously;
rule triggering - if the antecedent of the rule matches the facts, the rule triggers, that is, it is marked as used;
action − adding a consequential of the triggered rule to the BF, that is, the formation of a new fact. If the inference engine analyzes a frame in which the values ​​of the slots correspond to facts, then it starts the control slot of the frame (for example, calculation procedures) for execution.
There are several ways to exit the output machine loop, for example:
selection of all rules from the knowledge base;
using metarules, i.e. rules that govern other rules.
So, the ES does not have a ready-made solution in the state space, but finds it in the process of inference based on the data received from the user.
ES are able to explain why in the course of their work these particular data were required and how the conclusions (conclusions on the problem being solved) were obtained. A striking example of a tool for creating knowledge base models is the "KARKAS" system.
The range of problems that can be solved by ES is vast. ES can be developed using the KARKAS system for any subject area in which, in order to solve a problem, it is necessary to make a choice among a certain set of options, and the process of achieving this decision is based on logical steps. Any problem area where a person or group of people has special expertise needed by others is a possible area of ​​application for the KARKAS system.
ES can help automate the execution of complex instructions, select a product from a group of products, or diagnose equipment.
The tools of the KARKAS system are used to create both production and probabilistic ES.
The modules of the KARKAS system are designed for the fact that ES will be created by domain experts together with professionals in the field of building engineering knowledge.
Lab 2
The concept of knowledge representation in the KARKAS system
Purpose: to familiarize students with the concepts of knowledge representation in the KARKAS system.
Basic information. When studying any object, one or more of its properties are singled out, the totality of which constitutes the essence of this object in this consideration. To describe an object or its individual properties, certain characteristics are selected - quantities that can be measured on different scales: quantitative, ordinal, qualitative.
The information necessary for the knowledge base is collected by a specialist - a cognitive scientist.
Expert's judgment Attribute Value
"Work experience up to 2 years" Work experience  up to 2 years
"PC Skills" PC proficiency Administrator
"The ratio between the bank's own funds and assets is 8% or more" Own funds 8% or more
"The company issues promissory notes to its partner enterprises" Promissory note Yes
"Need for Benefits" Benefits Yes
"There are discounts for the purchase of products" Discount Yes
"There are requirements for price parameters" Required_price Yes
"Compliance with contractual conditions by the supplier is mandatory" Compliance with conditions Necessarily
Each characteristic of any object can take values ​​from a certain list (set) of allowed values, also determined by a cognitive scientist with the help of an expert. For example, the characteristics "need for benefits" and "availability of discounts" take one of two values ​​(yes or no), the characteristic "price" - one of several values ​​(minimum, contractual, maximum, constant). In turn, the totality of all the characteristics of a certain object (or the subject area as a whole) selected by the cognitologist forms the so-called list of allowed characteristics of this object (subject area). Lists of allowed characteristics and allowed values ​​of these characteristics cover the set of all available facts to be stored in the knowledge base of the expert system. Each of the lists is not rigidly fixed, but may change during the design of the knowledge base, for example, due to its replenishment with new knowledge.
Representation of knowledge base rules in the form of productions and frames. The KB rules are usually formulated by a cognitologist in the form of productions. Examples of describing rules using productions are given in Table. 2.2.
Table 2.2
Rules as products
Premise (antecedent) Conclusion (consequent)
Boolean condition: A#.
A Req_Price = No Maintenance Price = Satisfies
 Then Maintenance Price = Satisfies
Boolean condition: A&B&C&D#.
A The right to change the tariff = NO
B Tariff B = YES
C Tariff from = NO
D Tariff n = NO
Tariff = Unchanged high tariff
Boolean condition:A&B&C#.
A Compliance with the contract by the bank = No
B Bank experience = No
C Leak = No Maintenance
Reliability = Low
Boolean condition: A&B&C&D&E#.
IFA Loan = Yes
B Capital investment = No
C Loans = No
D Term = Don't know
E Property Management = Yes MOT
Operation = Trust-Deposit
Boolean condition: A&B&C#.
A Reputation = Yes
B Delivery violations = No
C Claim = No maintenance
Vendor reputation = Good
Lab 3
Building rules and frames in the KARKAS system
Target. Develop rules and frames. Familiarize yourself with the work of the BZ editor.
Basic information. The appearance of the KB editor is shown in fig. 2.1 with a list of attributes [4, 6]. The editor screen has six tabs:
KB attributes;
the order of knowledge in the knowledge base;
BZ tree.
For the convenience of creating and editing questions and answers, rules, frames and images, there are six tabs. The question and answers are bound to an attribute (such as a domain keyword) and contained in a database file. A set of attributes is arranged in the form of a list. When you click on each attribute, the question and answer texts associated with it appear.
For the convenience of editing questions and answers, the knowledge base editor module contains a number of service buttons: copying an attribute, deleting an attribute, copying all attributes to the clipboard, uploading an image. The same service functions are available for each attribute and are called using the context menu.
For syntactic control of the logical condition of the production, a rule parser is used.
The described rules analyzer is used both in the rules and frames editor, the view of which is shown in Fig. 2.2, and in the output machine of the "KARKAS" system.
So the production is a rule of the form
which displays the knowledge necessary to solve problems and organize interaction with the user. Production-based inference is the application of a rule, then the definition of a successor rule, and so on. There are different withdrawal strategies: direct, reverse and mixed.
Advantages of a production knowledge base: easy to manage knowledge modules (removal, addition, correction).
with a large number of rules, the output takes a very long time;
with a large number of rules (over a hundred), their logical connection among themselves is difficult to compare.
Another way to represent knowledge is frames. A frame is a knowledge framework consisting of slots. Since the frame model most successfully displays the knowledge elements of the human neural network, therefore, the system under consideration was called "FRAMEWORK".
There are two types of frames:
frame-concept − relation/action + objects connected by this relation/participating in this action;
frame-example − specific instance of relation/action + specific objects (associated with this relation/participating in this action).
Frame: name − relation/action
Slots - objects or other frames
The following information can be associated with each slot: filling condition (type, "default", connection with other slots), associated procedures (actions performed, for example, when this slot is filled).
Basic operations on frames:
frame/slot search;
replacing the value of the slot (inheritance);
taking a copy of the concept frame.
An example of a frame is shown in fig. 2.3.
Advantages of frames: knowledge is well structured, the structure is understandable to a person.
Frames Disadvantages:
with a large number of frames, all operations are performed for a long time;
with a large number of frames (over a hundred), their logical connection among themselves is difficult to compare.
In table. 3.1. an example of a list of attributes of the KB "Selection of personnel for the position of computer systems analyst" is given
Table 3.1.
KB attributes
Attribute Question Answers  
1 2 3  
Higher education Is there a higher education? Yes  
Спецификации Разрабатывали ли вы спецификации на программный продукт? Yes  
IT proficiency What IT tools do you have? RUP Basics  
CASE funds  
UML notations  
I don't own  
Language Do you know English? Yes  
Speaking level What is your spoken language level? Freehold  
Average level  
Low level  
Technical level What is your technical language level? Freehold  
Average level  
Low level  
work experience What is your work experience? More than 3 years  
About a year  
No experience  
Psychological factors What psychological factors do you own? Stress tolerance  
Result orientation  
Communication skills  
I don't own  
The following is an example of a fragment of the KB "Selection of personnel for the position of computer systems analyst".
Rule 1
A Higher education = Yes
B Specification = No
C Proficiency in IT = Not proficient
D Language = No
E Experience = More than 3 years
F Psychological factors = Sociability
G Psychological factors = Results orientation
H Psychological factors = Resilience
I Psychological factors = Optimism
Score = 60%.
We offer you to improve your knowledge in the field of IT technologies!
Module 2. Applied intelligent systems. Methodology and design tools
Lab 4
Methodology for building a knowledge base model in the "KARKAS" system
Target. Get acquainted with the logical inference engine in the "KARKAS" system.
Basic information. Consider an example of building a knowledge base "Choice of an apartment".
Statement of the problem: development of a knowledge base for the buyer to choose an apartment suitable for him, depending on the requirements and goals.
Purpose of the ES prototype: advising the buyer during the selection of a suitable apartment.
Scope of the ES prototype: the system will be used in various real estate agencies.
Purpose: selection of the most optimal option - an apartment from an existing base of apartments for any buyer, depending on his needs and requirements.
Initial data: area, type of building, transport, orientation, condition of the apartment, number of rooms, area, price, market, infrastructure.
Expected results: an apartment that satisfies the needs.
The conceptual model of the subject area of ​​choosing an apartment can be represented as a tree of goals (Fig. 4.1). Here, the crossing arc marks the vertex of type "AND", and its absence is marked "OR". The logical model for solving this problem is shown in Figure 4.2. Table 4.1 shows the attributes of the developed knowledge base.
Lab 5
Development of a knowledge base model in the "KARKAS" system
Target. Development of knowledge base on the example of the economic subject area.
Additional requirements for a lab report.
The lab report should contain the following main sections:
The main characteristics of the ES prototype.
Subject area identification.
Conceptual model of the subject area.
Formalization of knowledge base.
KB testing.
The main characteristics of the ES prototype.
Purpose: consulting, training, etc.
Scope: users.
The class of problems to be solved: interpretation (analysis), diagnostics, forecasting, design, planning, and so on.
Efficiency Criteria and Limitations: Economic Indicators.
Purpose: The purpose of the consultation.
Expected results: hypotheses - a list of possible values ​​of the goal, subgoals.
Initial data.
Features of problem solving, for example, describing the characteristics of uncertainty, basic heuristics
Subject area identification. This section of the report first describes an informal statement of the problem, which justifies the need to develop an ES prototype and determines the sources of obtaining economic efficiency. The following is a structured report of domain parameters:
Conceptual model of the subject area. The report contains the following graphical models: goal tree - graph "AND / OR", logical models of subgoals, dialogue with the user.
Formalization of knowledge base. The choice of methods of logical inference is carried out: direct or reverse chain of reasoning.
Handling conflicting rule sets.
Analysis of attribute inheritance in frames.
Preparation of initial facts, rules, frames.
ES testing. The texts of rules, frames and protocols of test cases are analyzed. The argumentation of the obtained test results of consultations is carried out. The number of test cases should match all of the proposed hypotheses for consultation purposes.
Let's consider an example of report design on the example of a knowledge base for selecting a supplier of products.
Formulation of the problem. Develop a knowledge base for choosing a supplier for the purchase of dairy products, depending on the needs of the buyer. The KB being developed is based on the analysis of data and proposals from suppliers, which will make it possible to identify requirements for the terms of supply, price and time parameters of future purchases. The KB will help the enterprise to select the most profitable and acceptable supplier among all alternative ones.
The purpose of the ES prototype is to advise on the selection of a supplier for the purchase of dairy products; assessment of the possibility of purchasing from several alternative sources; selection on the basis of certain criteria of the most profitable and acceptable supplier.
The scope of the ES prototype is various enterprises, firms that need to purchase dairy products.
The purpose of the ES prototype is to select the most optimal supplier for the purchase of dairy products, depending on the needs of the buyer.
A class of solvable problems: analysis of supplier proposals, selection of a supplier based on certain criteria.
Initial data:
information about suppliers' offers: the price of products, conditions of supply and payment, the accuracy of compliance with the terms of contracts, the quality of goods and services, ensuring the delivery of products;
reputation of the supplier in its field;
the possibility of unscheduled deliveries.
Criteria for the effectiveness of indicators: compliance with the conditions of supply to the accepted requirements.
Expected results: requirements for supply conditions, effective selection of a supplier according to accepted requirements.
Domain Identification: Vendor selection is based on a study of vendor offerings and broken down into the following blocks:
1. Product quality. Refers to the supplier's ability to provide goods and services in accordance with specifications as well as customer requirements, whether or not it conforms to the specification.
2. Reliability of the supplier (honesty, responsiveness, commitment, interest in doing business with this company, financial stability, reputation in its field, compliance with previously established delivery volumes and delivery times, and so on).
3. Price. The price should take into account all the costs of purchasing a specific material resource, that is, transportation, administrative costs, the risk of changes in exchange rates, customs duties, and so on.
4. Quality of service. Evaluation according to this criterion requires the collection of information from a fairly wide range of people from various departments of the company and third-party sources. It is necessary to observe opinions on the quality of technical assistance, the supplier's attitude to the speed of response to changing requirements and conditions of supply, to requests for technical assistance, the qualifications of maintenance personnel, and so on.
5. Terms of payment and the possibility of unscheduled deliveries. Suppliers who offer favorable payment terms (eg, deferred, credit) and guarantee the possibility of receiving unscheduled deliveries avoid many supply problems.
Requirement for the ES prototype for supplier selection: To set the assessment of the enterprise's suppliers, the generally accepted method is a scoring for a number of parameters: product quality, terms of payment, product price, quality of service, supplier reliability.
For the decision maker, it is not always convenient to quantify suppliers according to the above parameters. The knowledge representation approach in the "KARKAS" system allows using fuzzy data, for example, the attribute "product quality" can take on the values ​​"high", "medium", "low". So, the knowledge base will allow you to better select a supplier of products.
Conceptual model of the subject area. The conceptual model of the product supplier selection domain can be represented as a goal tree (Fig. 5.1).
Test questions for self-diagnosis
Module 1
1. The concept of AI.
2. History of AI.
3. Computers of the fifth generation.
4. Main directions of AI research (knowledge-based systems).
5. Main directions of AI research (machine translation).
6. Main directions of AI research (visual information processing).
7. Main directions of AI research (pattern recognition).
8. Main directions of AI research (machine creativity).
9. Main directions of AI research (new computer architectures).
10. Main directions of AI research (intellectual works).
11. Main directions of AI research (multi-agent systems).
12. Main directions of AI research (software).
13. The concept of ES.
14. ES architecture.
15. Example of ES MYCIN.
16. Knowledge base of ES MYCIN.
17. Coefficients of confidence. Robustness of ES.
18. Shell for creating ES EMYCIN.
19. Self-learning systems (example).
20. ES development technology (identification).
21. ES development technology (conceptualization).
22. ES development technology (formalization).
23. ES development technology (testing).
24. Technology for the development of ES (implementation).
25. Technology for the development of ES (industrial operation).
26. The difference between knowledge and data.
27. Typical models of knowledge representation (examples).
28. Logical model of knowledge representation (example).
29. Quantifiers in predicate logic (example).
30. Knowledge representation by product rules (example).
31. Main directions of AI research (language generation and recognition).
Module 2.
1. Object-oriented representation of knowledge by frames (example).
2. Frames, slots, demons, inheritance (example).
3. Model of the semantic network (example).
4. How did the concept of "task" change at different stages of the development of ideas about an intellectual system?
5. Define an artificial intelligence system (AI).
6. What are the features of AIS in comparison with traditional algorithmic systems?
7. What properties should any intelligent system have?
8. What is the object of study in SII?
9. What is meant by a domain model?
10. What is the structure of the subject area?
11. Give examples of the subject area.
12.What do we mean by "solving" a problem?
13. What is an algorithm for solving problems?
14. Define the concept of "knowledge".
15. What is the fundamental difference between "knowledge" and "data"?
16. What basic properties should knowledge base have?
17. Give an example of the internal interpretation of knowledge.
18. How is the simplest information unit recorded?
19. What is a "slot"?
20. What is the structure of the frame?
21. How is the external structure of links displayed in the knowledge base?
22. Why is the network called semantic?
23. Give an example of a semantic web
24. What is data schooling?
25. How do you understand "a space with semantic metric evidence"?
26. What is a cluster?
27. What does procedural knowledge contain?
28. What does declarative knowledge contain?
29. What is the principle of activity?
30. What is a production model?
31. How is output organized on products?
32. Recalculate the methods of knowledge representation.
33. What systems are called production?
34. Define products.
35. What is the structure of the production system?
36. Describe the mechanism of the rule base using an example.
37. What is the role of the working database?
38. Describe the output mechanism in the production system using the direct (reverse) strategy. Give examples.
39. What is a conflict set of rules? How is this situation resolved?
40. What are the advantages and disadvantages of the production model?
41. Define a frame.
42. What types of frames do you know?
43. How does the inheritance mechanism work?
44. Why are attached procedures needed?
45. Describe the mechanism of output on frames.
46. ​​State the advantages and disadvantages of systems.
47. Define a semantic web.
48. What is the name of a network with one type of relationship?
49. What functions do expert systems perform?
50. What is the role of the knowledge base in expert systems?
51. From what functional blocks is made ES.

2012 г. it-karkas.com.ua
Vladimir Burdaev
Info for users
Site map


Copyright 2012 - it-karkas.com.ua
Website development - alphastudio.com.ua