预测评分指示意向和实体的预测准确性Prediction scores indicate prediction accuracy for intent and entities

预测分数表示 LUIS 对用户话语预测结果的置信度。A prediction score indicates the degree of confidence LUIS has for prediction results of a user utterance.

预测分数在零 (0) 到一 (1) 之间。A prediction score is between zero (0) and one (1). 例如,一个置信度很高的 LUIS 分数可以是 0.99。An example of a highly confident LUIS score is 0.99. 置信度低的分数可以是 0.01。An example of a score of low confidence is 0.01.

分数值Score value 置信度Confidence
11 明确匹配definite match
0.990.99 高置信度high confidence
0.010.01 低置信度low confidence
00 明确匹配失败definite failure to match

得分最高的意向Top-scoring intent

每个话语预测都会返回一个评分最高的意向。Every utterance prediction returns a top-scoring intent. 此预测是对预测分数的数值比较。This prediction is a numerical comparison of prediction scores.

分数彼此接近Proximity of scores to each other

最高 2 个分数的差距可能很小。The top 2 scores can have a very small difference between them. LUIS 不会指明这种分差,只会返回最高分数。LUIS doesn't indicate this proximity other than returning the top score.

返回所有意向的预测分数Return prediction score for all intents

测试或终结点结果可以包括所有意向。A test or endpoint result can include all intents. 此配置是使用 verbose=true 查询字符串名称/值对在终结点上设置的。This configuration is set on the endpoint with the verbose=true query string name/value pair.

预测 APIPrediction API Querystring 名称Querystring name
V3V3 show-all-intents=true
V2V2 verbose=true

查看分数相近的意向Review intents with similar scores

审查所有意向的分数可很好地验证不仅识别到了话语的正确意向,而且该意向的分数始终明显高于识别到话语的下一个意向。Reviewing the score for all intents is a good way to verify that not only is the correct intent identified, but that the next identified intent's score is significantly and consistently lower for utterances.

如果多个意向的预测分数相近,LUIS 可基于话语的上下文在这些意向之间进行切换。If multiple intents have close prediction scores, based on the context of an utterance, LUIS may switch between the intents. 若要解决这种情况,可以继续为每个意向添加具有更广泛上下文差异的话语,或者让客户端应用程序(例如聊天机器人)通过编程选择如何处理前两个意向。To fix this situation, continue to add utterances to each intent with a wider variety of contextual differences or you can have the client application, such as a chat bot, make programmatic choices about how to handle the 2 top intents.

分数太接近的两个意向可能会由于非确定性训练而反转。The 2 intents, which are too-closely scored, may invert due to non-deterministic training. 最高分可能会变为第二高分,第二高分可能会变为最高分。The top score could become the second top and the second top score could become the first top score. 为了防止此情况,请向该话语的前两个意向添加示例话语,并在示例话语中包含单词选择和用于区分两个意向的上下文。In order to prevent this situation, add example utterances to each of the top two intents for that utterance with word choice and context that differentiates the 2 intents. 这两个意图应该具有相同数量的示例话语。The two intents should have about the same number of example utterances. 防止由于训练而造成反转的一个间隔经验法则是,让分数有 15% 的差值。A rule of thumb for separation to prevent inversion due to training, is a 15% difference in scores.

可以通过使用所有数据进行训练来关闭非确定性训练You can turn off the non-deterministic training by training with all data.

不同训练会话之间的预测差异Differences with predictions between different training sessions

如果在不同的应用中训练相同的模型,但分数不同,这种差异是因为存在非确定性训练(一种随机性因素)。When you train the same model in a different app, and the scores are not the same, this difference is because there is non-deterministic training (an element of randomness). 其次,如果话语的多个意向重叠,则意味着相同话语中评分最高的意向可能会因训练而发生变化。Secondly, any overlap of an utterance to more than one intent means the top intent for the same utterance can change based on training.

如果聊天机器人需要一个特定的 LUIS 分数来指示意向的置信度,则应使用前两个意向之间的分差。If your chat bot requires a specific LUIS score to indicate confidence in an intent, you should use the score difference between the top two intents. 这种情况可更灵活地应对训练过程中的变化。This situation provides flexibility for variations in training.

可以通过使用所有数据进行训练来关闭非确定性训练You can turn off the non-deterministic training by training with all data.

E(指数)表示法E (exponent) notation

预测分数可采用指数表示法,显示超过 0 到 1 这个范围的值,例如 9.910309E-07Prediction scores can use exponent notation, appearing above the 0-1 range, such as 9.910309E-07. 此分数指示的是非常小的数。This score is an indication of a very small number.

E 表示法分数E notation score 实际分数Actual score
9.910309E-079.910309E-07 .0000009910309.0000009910309

标点Punctuation

详细了解如何使用或忽略标点符号。Learn more about how to use or ignore punctuation.