namespace AIStudio.Tools.RAG;
///
/// The passages which the check of which passages fit the user prompt left, and why it left out the others.
///
/// The passages left, in the order of the results of the check.
/// How many passages the check judged, i.e., got a usable answer for.
/// How many passages stayed without a judgment, because their check failed.
/// How many passages were left out, because the check judged them not to fit.
/// How many passages judged to fit were left out, because their confidence fell below the threshold.
/// The confidence a passage judged to fit needed to stay.
public sealed record ValidatedPassages(IReadOnlyList Contexts, int NumJudged, int NumUnchecked, int NumRejected, int NumBelowThreshold, float Threshold)
{
///
/// Whether the check failed for every passage, so that it judged none of them.
///
public bool IsUnchecked => this.NumUnchecked > 0 && this.NumJudged is 0;
}