有没有办法指定 QnA 对 (QnA Maker) 中替代问题的顺序?

Is there any way to specify order of alternate questions in QnA pair (QnA Maker)?

我正在使用 QnA Maker 服务并通过 explicit feedback 使用主动学习功能,其工作方式如下:查询 QnA Maker,找到不明确的 questions/answer 对,通过选择 创建英雄卡来自每个 QnA 对 (QnAMakerResult) 的第一个问题,并将其发送给用户。

因为我正在使用这个逻辑,所以我想在 QnA 对 中得到最好看的第一个问题。但我发现,当我在 QnA Maker 门户中单击“保存并训练”时,它会覆盖我在 qna 对中的替代问题顺序,这完全破坏了主动学习体验,因为 qna 对中的某些问题不是那么用户友好,例如仅特定关键字等

是否有任何方法可以为此目的标记一些备选问题(例如标记最用户友好的问题)或在 QnA Maker 中禁用此自动排序?

由于您没有指定语言,我的回答是指 C# SDK,但概念应该可以转移到其他 SDK。

我相信您可以通过迂回和手动的方式实现您想要的功能:

  1. 在 QnA Maker 门户中 add a metadata property to the questions you'd like to disambiguate, it could have the key disambiguation-question and the value would be the question you'd like to use for disambiguation. An example is provided here。例如disambiguation-question: My question that I want to use to disambiguate.
  2. 保存、训练和发布您的知识库。
  3. 更新您的代码以过滤 Metadataproperty of the QueryResult class, which contains an array of Metadata 个对象。 TheGetAnswersAsyncmethod which is how you query your QnA Maker endpoint, will return an array ofQueryResult` 对象。
  4. 使用 Value from the Metadata object to display in your card for disambiguation. There is an example of how to do this here.

还有关于 QnA Maker 答案排名系统工作原理的概述here,目前它的工作原理如下:

| Step  | Purpose |
| --- | --- |
| 1 | The client application sends the user query to the GenerateAnswer API |
| 2 | QnA Maker preprocesses the user query with language detection, spellers, and word breakers. |
| 3 | This preprocessing is taken to alter the user query for the best search results. |
| 4 | This altered query is sent to an Azure Cognitive Search Index, which receives the top number of results. If the correct answer isn't in these results, increase the value of top slightly. Generally, a value of 10 for top works in 90% of queries. |
| 5 | QnA Maker uses syntactic and semantic based featurization to determine the similarity between the user query and the fetched QnA results. |
| 6 | The machine-learned ranker model uses the different features, from step 5, to determine the confidence scores and the new ranking order. |
| 7 | The new results are returned to the client application in ranked order. |

Features used include but aren't limited to word-level semantics, term-level importance in a corpus, and deep learned semantic models to determine similarity and relevance between two text strings.

希望对您有所帮助。