Class DocumentQAResult<T>
Represents the result of document question answering.
public class DocumentQAResult<T>
Type Parameters
TThe numeric type used for calculations.
- Inheritance
-
DocumentQAResult<T>
- Inherited Members
Remarks
For Beginners: When you ask a question about a document, the model returns an answer along with confidence information and optionally the evidence (where in the document the answer came from).
Properties
AlternativeAnswers
Gets alternative answers if multiple were considered.
public IReadOnlyList<AlternativeAnswer<T>>? AlternativeAnswers { get; init; }
Property Value
Answer
Gets the answer to the question.
public string? Answer { get; init; }
Property Value
Confidence
Gets the confidence score for the answer (0-1).
public T Confidence { get; init; }
Property Value
- T
ConfidenceLevel
Gets the classification of confidence level.
public ConfidenceLevel ConfidenceLevel { get; }
Property Value
ConfidenceValue
Gets the confidence as a double value for comparison.
public double ConfidenceValue { get; init; }
Property Value
Evidence
Gets the evidence regions that support the answer.
public IReadOnlyList<EvidenceRegion<T>>? Evidence { get; init; }
Property Value
Remarks
Evidence regions highlight where in the document the answer was found. This helps verify the answer and understand the model's reasoning.
HasAnswer
Gets whether the model was able to find an answer.
public bool HasAnswer { get; }
Property Value
NoAnswerSentinel
Gets the sentinel string used when a model has no answer.
public static string NoAnswerSentinel { get; }
Property Value
ProcessingTimeMs
Gets processing time in milliseconds.
public double ProcessingTimeMs { get; init; }
Property Value
Question
Gets the original question that was asked.
public string Question { get; init; }