Documentation
Table of Contents

Method JudgeAsync

Namespace
IntentSharp.Verification
Assembly
IntentSharp.dll

JudgeAsync(PromptPlan, string, string?, CancellationToken)

Asks the provider whether candidateOutput satisfies the intent for the input, in one model call. A reply that is not JSON passes, with a Warning logged, so a faulty judge never blocks a result.

public Task<(JudgeVerdict verdict, AIResponse response)> JudgeAsync(PromptPlan plan, string candidateOutput, string? model, CancellationToken cancellationToken)

Parameters

plan PromptPlan

The operation being verified: its intent, input and output requirements.

candidateOutput string

The model output, which has already passed the checks against the result type and the request's rules.

model string

The model to judge with; null uses the provider's default model.

cancellationToken CancellationToken

Cancels the judge call.

Returns

Task<(JudgeVerdict verdict, AIResponse response)>