ChatConversationEvaluator.RenderEvaluationPromptAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Renders the information present in the supplied parameters into a prompt that this IEvaluator uses to perform the evaluation.
protected:
abstract System::Threading::Tasks::ValueTask<System::String ^> RenderEvaluationPromptAsync(Microsoft::Extensions::AI::ChatMessage ^ userRequest, Microsoft::Extensions::AI::ChatMessage ^ modelResponse, System::Collections::Generic::IEnumerable<Microsoft::Extensions::AI::ChatMessage ^> ^ includedHistory, System::Collections::Generic::IEnumerable<Microsoft::Extensions::AI::Evaluation::EvaluationContext ^> ^ additionalContext, System::Threading::CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.ValueTask<string> RenderEvaluationPromptAsync (Microsoft.Extensions.AI.ChatMessage? userRequest, Microsoft.Extensions.AI.ChatMessage modelResponse, System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.ChatMessage>? includedHistory, System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.Evaluation.EvaluationContext>? additionalContext, System.Threading.CancellationToken cancellationToken);
abstract member RenderEvaluationPromptAsync : Microsoft.Extensions.AI.ChatMessage * Microsoft.Extensions.AI.ChatMessage * seq<Microsoft.Extensions.AI.ChatMessage> * seq<Microsoft.Extensions.AI.Evaluation.EvaluationContext> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<string>
Protected MustOverride Function RenderEvaluationPromptAsync (userRequest As ChatMessage, modelResponse As ChatMessage, includedHistory As IEnumerable(Of ChatMessage), additionalContext As IEnumerable(Of EvaluationContext), cancellationToken As CancellationToken) As ValueTask(Of String)
Parameters
- userRequest
- ChatMessage
The request that produced the modelResponse
that is to be evaluated.
- modelResponse
- ChatMessage
The response that is to be evaluated.
- includedHistory
- IEnumerable<ChatMessage>
The conversation history (excluding the userRequest
and modelResponse
)
that is to be included as part of the evaluation prompt.
- additionalContext
- IEnumerable<EvaluationContext>
Additional contextual information (beyond that which is available in the userRequest
and
includedHistory
) that this IEvaluator may need to accurately evaluate the
supplied modelResponse
.
- cancellationToken
- CancellationToken
A CancellationToken that can cancel the operation.
Returns
The evaluation prompt.