Property Certainty
- Namespace
- LMKit.Document.Conversion
- Assembly
- LM-Kit.NET.dll
Certainty
Gets a confidence score in the [0, 1] range that the
page's Markdown faithfully represents its source. A value of
1.0 means the converter is very confident the output
is a correct and complete rendering; values below 0.70
are worth reviewing or routing to a more thorough pipeline.
public double Certainty { get; }
Property Value
Examples
using LMKit.Document.Conversion;
var converter = new DocumentToMarkdown();
var result = converter.Convert("report.pdf");
foreach (var page in result.Pages)
{
if (page.Certainty < 0.70)
{
Console.WriteLine($"Page {page.PageNumber} (certainty {page.Certainty:F2}) needs review.");
}
}
Remarks
The score blends multiple independent signal families that LM-Kit measures while the page is processed — text quality, OCR reliability, structural preservation (tables, headings, reading order), and post-emission refinement intensity. Each family is normalised into a sub-score; the final value is their calibrated aggregate, tuned so that the reported number directly approximates the per-page accuracy a reader would attribute to the output.
The value is computed lazily on first access and cached, so reading it from code that never inspects the score costs nothing at conversion time.
Typical interpretation:
>= 0.90: the page looks very clean — ship it.0.70 - 0.90: usable but worth a spot-check, especially for tables and headings.< 0.70: the page likely needs a re-run with a stronger strategy (for example VLM OCR) or human review.