geebro
Posts: 3
Joined: Sat Oct 28, 2017 9:40 am

Interacting with BotConfiguration/ScoreConfiguration

Mon Oct 30, 2017 3:33 am

I am working with the Oscova tutorials and I have a question. I have the following in a dialog class:

[Fallback]
public void GlobalFallback(Context context, Result result)
{
result.SendResponse("Could you please rephrase that for me?");
}

[Expression("Hello")]
public void Hello(Context context, Result result)
{
result.SendResponse("Hello to you too.");
}

Entering "Hello" gets the expected result of "Hello to you too".

Entering a short unmapped phrase, such as "What" results in "Could you please rephrase that for me?"

Entering a long nonsense phrase unexpectedly results in the "Hello to you too" answer.

I believe this is because of how the the intents are being scored. I also believe that I need to set the MaxIntentScore setting (found in ScoreConfiguration) to something other than the default. If this is so, could you please point me to documentation about interacting with the configuration functionality? I am a beginner at C# programming, and I don't know how to get from the class definition (http://developer.syn.co.in/api/Syn.Bot. ... ation.html) to actually finding and setting the MaxIntenScore setting.

Thank you,

Geebro

User avatar
Fantom
Help & Support
Posts: 313
Joined: Fri Oct 25, 2013 9:20 pm

Re: Interacting with BotConfiguration/ScoreConfiguration

Mon Oct 30, 2017 11:51 am

You are right that it is because of how Oscova scores intents. Oscova does semantic analysis at character level. The scoring improves greatly when Word representation data is loaded by the developer. In the coming version (to be available by the end of the week) Oscova will offer optimization of loaded Word representation data (with the option to save the optimized word representation data) that will reduce it to some fraction of the actual size.

MaxIntentScore is for controlling overconfidence instead you could use the MinimumScore property and set it to some higher value like 0.3. The recommended value is between 0.3 and 0.4.

geebro
Posts: 3
Joined: Sat Oct 28, 2017 9:40 am

Re: Interacting with BotConfiguration/ScoreConfiguration

Tue Oct 31, 2017 8:35 am

Thank you for the quick response. If you have time, could you give me a code snippet to set the property and tell me where to do it? I am a newbie, and I'm working my way through C# tutorials at the same time I'm doing the Oscova tutorials. If you don't have time, then don't worry about it. I know this is a C# question rather than an Oscova question. Thanks again for your help.

User avatar
Fantom
Help & Support
Posts: 313
Joined: Fri Oct 25, 2013 9:20 pm

Re: Interacting with BotConfiguration/ScoreConfiguration

Wed Nov 01, 2017 1:23 pm

it's very easy, just use the Configuration property of OscovaBot class.

CSharp Code

var bot = new OscovaBot();
bot.Configuration.Scoring.MinimumScore = 0.3;

geebro
Posts: 3
Joined: Sat Oct 28, 2017 9:40 am

Re: Interacting with BotConfiguration/ScoreConfiguration

Thu Nov 09, 2017 9:43 am

Thank you so much for your help. I will let you know how I get on.

Return to “Feature Request and Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest