ApiBrain().GetResponseWeight
Returns the numeric weight of the match in the given position on the response stack.
Description
After invoking the AI run-time to produce a response, a stack of zero-indexed “best possible” Behavioral results is available for query. Using these methods, the application developer can determine at runtime exactly which Behaviors and Absorbers were considered the top candidate matches for the user input. This particular method returns the numeric weight of the match in the given position on the stack. A higher value indicates a better match. Note that this is the same data as shown in the text output window of SILVIA Studio when in debug mode.
Example Usage (Java/C#)
float weight = _core.ApiBrain().GetResponseWeight(0);
Parameters
int |
index |
The integer zero-based index into the “best match” stack. |
Returns
The numeric weight of the best matching Behavior in that stack position. A -100.0 is returned if there is no valid match.
See Also
- ApiBrain().GetResponse
- ApiBrain().GetResponseBehaviorID
- ApiBrain().GetResponseAbsorberID