This page (revision-41) was last changed on 06-Oct-2015 01:51 by Albrecht Striffler

This page was created on 17-Dec-2012 11:12 by Joba Baumeister

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
41 06-Oct-2015 01:51 3 KB Albrecht Striffler to previous

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 removed 3 lines
[{Image src='denkPrint2012.jpg' width='300' align='right' style='margin-right:30px; margin-top:30px' }]
At line 10 changed one line
[{TableOfContents title='Contents' numbered='true'}]
[{TableOfContents}]
At line 12 removed one line
At line 15 changed 3 lines
!! Annotate Wiki Articles
! Annotate Wiki Articles
At line 20 removed one line
At line 24 removed one line
At line 27 changed 3 lines
!! Define the Knowledge Base Center
! Define the Knowledge Base Center
At line 33 removed one line
At line 42 added one line
At line 55 changed 2 lines
In the first step we need to define the terminology of the planned system, i.e., the questions (inputs into the system) and the solutions (outputs of the system).
The definition of terms for questions and solutions is described in the article [Tutorial Printer Problem - Terminology].
In the first step we need to define the terminology of the planned system, i.e., the inputs (user entries) and the outputs (derived solutions).
At line 47 added one line
!! Solutions
At line 59 changed one line
!!! Derivation Knowledge using DiaFlux Models
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:
At line 61 changed 4 lines
After the definition of the terminology we need to define knowledge elements that implement the derivation and dialog behavior of the knowledge base.
For that, d3web/KnowWE provides a number of alternatives ranging from scoring rules, decision trees to set-covering models.
In this tutorial we show how to implement the derivation knowledge as a DiaFlux flowchart model:
[DiaFlux implementation|Tutorial Printer Problem - DiaFlux]
# Connection problems
## Broken cable
## Cable not connected
## No Wifi connection
## No power supply
# Printing quality problems
## Empty toner
## Dirty toner
At line 61 added 3 lines
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.
At line 67 changed one line
!!! Manually Testing the Knowledge Base
The d3web markup of the solution hierarchy is as follows:
At line 69 changed one line
Now we can test the knowledge base by running a dialog.
{{{
%%Solution
Connection problems
- Broken cable
- Cable not connected
- No Wifi connection
- No power supply
Printing quality problems
- Empty toner
- Dirty toner
No solution found
%
}}}
At line 81 added 2 lines
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.
At line 72 changed one line
!! Quick Interview
%%Solution
Connection problems
- Broken cable
- Cable not connected
- No Wifi connection
- No power supply
Printing quality problems
- Empty toner
- Dirty toner
No solution found
%
At line 74 changed one line
A simple test dialog interface can be created by inserting the markup
!! Questions
At line 98 added 4 lines
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:
At line 77 changed 2 lines
%%QuickInterview %
%%ShowSolutions %
%%Question
Problem specification #1
- Please specify your problem [oc]
-- Printer does not print
-- Printing with bad quality
-- No else
%
At line 81 changed 2 lines
into the same article, where {{KnowledgeBase}} is defined.
The markup will provide an interface for the user:
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.
At line 84 changed one line
%%QuickInterview %
%%Question
Problem specification #1
- Please specify your problem [oc]
-- Printer does not print
-- Printing with bad quality
-- No else
%
At line 86 changed one line
%%ShowSolutions %
The annotation ''~[oc]'' specifies a corresponding one-choice question.
The possible values/answers of this question are printed in separate lines below the question.
Each value/answer should be indented by an increased dash.
We see, that the three answers ''Printer does not print'', ''Printing with bad quality'', and ''No else'' has been defined for the one-choice question ''Please specify your problem''.
At line 128 added 2 lines
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.
At line 89 changed one line
!! Interactive Single-Question Dialog (free-to-use)
! Problem Area: Connection Problems
At line 91 changed 3 lines
Additionally, an interactive single-question dialog is available (provided by denkbares GmbH).
Here, only the currently active question is shown that should be answered by the user.
Derived solutions are printed at the end of the dialog session.
The questions of the problem area ''connection problems'' are as follows:
At line 95 changed one line
The dialog is started by using the tools menu of the {{KnowledgeBase}} markup as shown in the image below.
%%Question
Connection Questions
- Please check the power supply of the printer [oc]
-- Printer is connected and power is on
-- Printer is not connected or power is off
- How is the printer connected to your computer [oc]
-- Connected by cable
-- Connected by Wifi
Printer with cable connection
- Is the cable plugged into the printer and the computer [yn]
-- Yes
-- No
- Please exchange the cable and try to print again [oc]
-- Stil not printing
-- Now it works
%
At line 97 changed one line
[{Image src='Printer Problem denkbares Dialog.png' width='800' align='left' caption='Starting the interactive dialog interface.' }]
We see, that a number of one-choice questions (~[oc]) are defined.
Additionally, a yes/no question is defined (~[yn]), which is similar to one-choice questions, but has the predefined answers ''yes'' and ''no''.
At line 99 changed 3 lines
\\
\\
An example dialog of the interactive interview is depicted in the following screenshot.
! Problem Area: Quality Problems
At line 103 changed one line
[{Image src='Printer Problem denkbares Dialog2.png' width='800' align='left' caption='An example run of the interactive denkbares dialog interface.' }]
The questions of the problem area ''quality problems'' are as follows:
At line 105 changed one line
\\
%%Question
Quality Questions
- Dirty housing [yn]
- Toner capacity [num] {pages} (0 10000000)
- Paper count [num] {pages} (0 10000000)
-- Current capacity ratio [num] <abstract>
-- Toner usage evaluation [oc] <abstract>
--- normal
--- low
%
At line 170 added 3 lines
In addition to yes/no questions and one-choice questions we defined some numerical questions (~[num]), that allow the input of numerical values. The annotation ''(0 10000000)'' defines the value range of the particular question, i.e., numbers from 0 to 10000000 can be entered, whereas ''{pages}'' defines the unit as an arbitrary string, i.e., the number of ''pages'' is queried to the user.
The annotation ''<abstract>'' specifies a abstraction question.
For such a question the values are not entered externally, e.g., by a user in a dialog, but the values are computed internally by the knowledge base.
At line 108 changed one line
!!! Automated Testing
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'':
At line 110 changed 2 lines
The knowledge base can be tested continuously by defining test cases and continuous integration test.
See the article [Tutorial Printer Testcases] for more information.
{{{
%%Rule
IF Toner capacity = KNOWN AND Paper count > 0
THEN Current capacity ratio = (Toner capacity / Paper count)
At line 113 changed one line
%%Package Printer_Demo
IF Current capacity ratio >= 1.1
THEN Toner usage evaluation = normal
At line 115 changed 2 lines
%%tags
printerProblems tutorial
IF Current capacity ratio < 1.1
THEN Toner usage evaluation = low
At line 189 added 37 lines
}}}
When inserted into the wiki article, the rules markup looks as follows:
%%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
%
! Human-friendly Prompts of Questions/Solutions
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.
%%Property
Dirty housing.prompt = When opening the housing of the printer: Is there some dirt at the toner and the surrounding?
Toner capacity.prompt = Number of pages usually printed with one toner
Paper count.prompt = Number of pages printed with the current toner
Paper count.prompt.de = Anzahl der mit den aktuellen Toner gedruckten Seiten
%
%%Package Printer_Demo
----
[{KnowWEPlugin quickInterview}]