[英]Get data for Azure Active Directory user in MS Bot Framework bot
[英]How can I get confidence level value in ms bot framework?
我想使用中間件從luis訪問置信度,以便可以將低置信度響應發送給人類而不是機器人。
我正在尋找的值是這個值(通過仿真器記錄):
Library("*")recognize() recognized: Hallo(0.8215488)
這在中間件中甚至可能發生嗎?
我嘗試在“會話”中找到它,但尚未找到它。
當使用botbuilder庫中的IntentDialog時,可以指定intentThreshold屬性,該屬性將設置觸發意圖識別所需的最低分數。 檢查以下鏈接以獲取參考: https : //docs.botframework.com/zh-cn/node/builder/chat-reference/interfaces/_botbuilder_d_.iintentdialogoptions.html#intentthreshold
如果您的LUIS模型無法識別用戶的輸入,或者得分值低於該intentThreshold值,則IntentDialog中的onDefault方法將對其進行處理。 因此,在這里您可以添加邏輯以將客戶對話從機器人傳遞給人工:
let recognizer = new builder.LuisRecognizer(models);
let minimumScore = 0.3;
let intentArgs = {};
intentArgs.recognizers = [recognizer];
intentArgs.intentThreshold = minimumScore;
var intents = new builder.IntentDialog(intentArgs)
.onBegin()
.onDefault(
// Add logic to handle conversation to human
);
library.dialog('options', intents);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.