HELP!

How can a user find how/why a given decision was reached by the engine?

There are two different methods in the Viabl.ai Platform system which can be used to help understand why a particular runtime session followed the particular path through the logic to reach specific decisions. The first method (Decision Trace) helps the developer to trace the decision making process for a given runtime session. The second method (Line of Reasoning) allows a dynamic report, of the Questions which contributed to all the intermediate decisions reached during the session, to be prepared and presented to the runtime user.

1. Decision Trace

Use the special trace method of the Viabl.ai Platform system object in your JavaScript script to return a special trace string which can be used in the Viabl.ai Platform's Decision Trace feature:

   var trace_string = xpertrule.trace();    
   xpertrule.message(trace_string);

Each trace string is specific to the knowledge base session from which it was generated. An example of a trace string for a session is:

{"v":"1.30","l":[{"t":34,"n":3},{"t":34,"n":5},{"t":37,"n":3},{"t":37,"n":5,"v":2},{"t":37,"n":9},{"t":41,"n":3},{"t":41,"n":4},{"t":41,"n":5},{"t":41}} 

Using copy and paste, the returned trace string can be used in conjunction with the Show Decision Trace option in the Viabl.ai Platform.

image descr

This will allow you to trace every step of the decision inference process (up to the point when the trace method was executed) by highlighting the executed Objects inside the Viabl.ai Platform Knowledge editors.

image descr

2. Line of reasoning

Use the special lineOfReasoning method of the Viabl.ai Platform system object in your Script to return a list of JavaScript Objects (for the inference session up to this point) containing the information about all the executed objects (including all inferred decision Outcomes).

This approach allows a report to be constructed and presented to the runtime user. See here on how to configure a report from the returned Object

On This Page