We define the competence of the knowledge base by enumerating all possible solutions, i.e., faults, for the printer problem. The derivable solutions are as follows:
We see, that we have structured the solutions into meaningful groups, i.e. connection problems and printing quality problems. More groups can be added easily. The structuring of solutions is especially useful when the knowledge base and the number of solutions, respectively, increases.
The d3web markup of the solution hierarchy is as follows:
%%Solution Connection problems - Broken cable - Cable not connected - No Wifi connection - No power supply Printing quality problems - Empty toner - Dirty toner No solution found %
Please note, that we added the solution No solution found for the case, that the system cannot derive an appropriate solution. When inserting the markup into the wiki article, the following section is shown.
To derive the solutions we need to pose appropriate questions to the user. Since, we expect many questions to be included in the knowledge base, we group the questions into meaningful questionnaires.
First, we define an initial questionnaire that tries to identify the problem area of the user and use the following markup:
%%Question Problem specification #1 - Please specify your problem [oc] -- Printer does not print -- Printing with bad quality -- No else %
The annotation #1 specifies, that the questionnaire Problem specification is posed as the initial questionnaire in a dialog session with the user. When inserting the markup into the article, the questions are created.
Each problem area corresponds to a group of solutions. That way, we define a questionnaire for each problem area in order to differentiate the solutions within the problem area.
The questions of the problem area connection problems are as follows:
The questions of the problem area quality problems are as follows:
For the internal computation of the abstraction questions we define the following rules, by the Rule markup. In the following, we define a rule computing the ratio between the expected toner life (Toner capacity) and the current use (Paper count). Two further rules derive a normal or a low toner usage by using the derived value of the abstraction question Current capacity ratio:
%%Rule IF Toner capacity = KNOWN AND Paper count > 0 THEN Current capacity ratio = (Toner capacity / Paper count) IF Current capacity ratio >= 1.1 THEN Toner usage evaluation = normal IF Current capacity ratio < 1.1 THEN Toner usage evaluation = low %
When inserted into the wiki article, the rules markup looks as follows:
It is reasonable to define short names for questions and solutions because they are often used in the markups. When used in the dialog, however, longer verbalizations may be useful. You can define a longer prompt for questions/solutions by using the Property markup. Moreover, the prompts can be internationalized.