FormLabelingSettings
Settings for FormLabeling. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.
using Nutrient;The SDK creates this class through factory methods or other SDK objects.
Properties
CandidateLabels
public string CandidateLabels { get; set; }Optional vocabulary of candidate labels the model should prefer when labeling. Provide labels as a newline- or comma-separated list (for example, “First name, Last name, Date of birth”). The model matches a field to one of these when it fits, and proposes a new label otherwise; each field’s FormFieldNode.LabelSource records whether the label was “matched” or “invented”. Matched labels are normalized to the casing given here. Empty (default) means fully free-form labeling.
Type: string
EnableAiLabeling
public bool EnableAiLabeling { get; set; }Opt in to AI semantic labeling of detected form fields. When false (default), form detection runs offline and no vision model is contacted; when true, the flow selected by EnrichmentModel runs.
Type: bool
EnableAiRemoveFalsePositives
public bool EnableAiRemoveFalsePositives { get; set; }When true, form fields the AI flags as false positives are removed from the document graph so they never reach the exported output. When false (default), flagged fields are kept and annotated (non-destructive). Only takes effect when EnableAiLabeling is true.
Type: bool
EnrichmentModel
public FormVlmEnrichmentModel EnrichmentModel { get; set; }Which model family enriches fields, and therefore which flow runs, when EnableAiLabeling is true. Defaults to Generalist (set-of-marks over the provider configured via Provider); set to Specialist to use the dedicated detect+extract model configured via FormVlmConnectionSettings.
Type: FormVlmEnrichmentModel
FallbackEnrichmentModel
public int FallbackEnrichmentModel { get; }Optional fallback flow, retried on the whole document when EnrichmentModel fails outright — its connection can’t be reached, or, for Specialist, every page failed. null (the default) means no document-level fallback: a primary failure fails the call, and an individual failed Specialist page still just degrades to detector-only output, exactly as when no fallback is configured. When set to Specialist, the fallback connection comes from FormVlmFallbackConnectionSettings — independent of FormVlmConnectionSettings, so primary and fallback can point at two different dedicated endpoints. When set to Generalist, the provider comes from FallbackProvider (which must be configured to a real provider) and its matching per-provider settings class.
Type: int
OverlapThreshold
public float OverlapThreshold { get; set; }Specialist only: the geometric overlap bar (IoU for a type-agnostic claim, or IoS for a type-compatible containment claim) the RF-DETR x VLM correlator uses for its hard-match phase and its soft-tier corroboration phase (FormVlmCorrelator.Correlate) — its phase-3 bare-box rescue does not require any overlap at all; it accepts a genuinely disjoint box within the edge-to-edge gap RescueDistanceMultiplier configures. Default 0.2 (the benchmarked/scored value, reports/cloud-endpoint-hybrid.json in the training repo) — exposed here mainly for tuning experiments; most callers should leave it at the default.
Type: float
RescueDistanceMultiplier
public float RescueDistanceMultiplier { get; set; }Specialist only: how the correlator’s phase-3 distance-based rescue decides a bare hard-tier box is close enough to a VLM item to claim it — the edge-to-edge gap on each axis must be less than this value times that box’s own width (x) / height (y) (FormVlmCorrelator.Correlate). Default 2.5 (tuned after field testing). Exposed mainly for tuning experiments.
Type: float
Methods
SetFallbackEnrichmentModel
public void SetFallbackEnrichmentModel(FormVlmEnrichmentModel? value = null)Optional fallback flow, retried on the whole document when EnrichmentModel fails outright — its connection can’t be reached, or, for Specialist, every page failed. null (the default) means no document-level fallback: a primary failure fails the call, and an individual failed Specialist page still just degrades to detector-only output, exactly as when no fallback is configured. When set to Specialist, the fallback connection comes from FormVlmFallbackConnectionSettings — independent of FormVlmConnectionSettings, so primary and fallback can point at two different dedicated endpoints. When set to Generalist, the provider comes from FallbackProvider (which must be configured to a real provider) and its matching per-provider settings class.
Parameters
| Name | Type | Description |
|---|---|---|
value | FormVlmEnrichmentModel? | The value to set for the FallbackEnrichmentModel property. |
Resource management
public void Dispose()FormLabelingSettings implements IDisposable. Call Dispose() or use a C# using declaration to release its native handle right away. If you don’t, the handle is released when the object is garbage collected.