Share via


IQnAMakerClient.GetAnswersRawAsync Method

Definition

Generates an answer from the knowledge base.

public System.Threading.Tasks.Task<Microsoft.Bot.Builder.AI.QnA.QueryResults> GetAnswersRawAsync (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.AI.QnA.QnAMakerOptions options, System.Collections.Generic.Dictionary<string,string> telemetryProperties = default, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default);
abstract member GetAnswersRawAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.QnA.QnAMakerOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.AI.QnA.QueryResults>
Public Function GetAnswersRawAsync (turnContext As ITurnContext, options As QnAMakerOptions, Optional telemetryProperties As Dictionary(Of String, String) = Nothing, Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing) As Task(Of QueryResults)

Parameters

turnContext
ITurnContext

The Turn Context that contains the user question to be queried against your knowledge base.

options
QnAMakerOptions

The options for the QnA Maker knowledge base. If null, constructor option is used for this instance.

telemetryProperties
Dictionary<String,String>

Additional properties to be logged to telemetry with the QnaMessage event.

telemetryMetrics
Dictionary<String,Double>

Additional metrics to be logged to telemetry with the QnaMessage event.

Returns

A list of answers for the user query, sorted in decreasing order of ranking score.

Applies to