Table of Contents

Enum ChunkIndexingDecision

Namespace
LMKit.Retrieval.ChunkQuality
Assembly
LM-Kit.NET.dll

The action the SemanticChunkQualityGate recommends for a candidate chunk before embedding generation.

public enum ChunkIndexingDecision

Fields

Index = 0

The chunk carries standalone semantic value and should be embedded and indexed.

Merge = 1

The chunk is clean but too weak to stand alone (for example a bare heading or a tiny fragment). Inside a DocumentChunkGateSession its text is folded into an adjacent chunk of the same page; when no suitable neighbor exists the chunk is indexed on its own so content is never silently lost. Callers using Assess(string) without neighbor context should treat this value as Index with a merge hint.

Drop = 2

The chunk is semantically worthless (noise, mojibake, markup scaffolding, duplicated boilerplate) and should not be embedded. Dropping it saves embedding time and prevents a recurring false positive in semantic search results.

Flag = 3

The evidence is conflicting: the chunk should be kept out of the index, but it is reported with its ChunkQualityIssues and ChunkQualitySignals so borderline cases can be reviewed and thresholds tuned. Callers wanting maximum recall may choose to index flagged chunks anyway.

Remarks

The gate is precision-first: Drop is only produced on strong, multi-signal evidence that a chunk carries no standalone semantic value (binary extraction noise, font mojibake, repeated boilerplate). Ambiguous chunks resolve to Flag so callers can keep them out of the index while retaining full observability, and weak but clean fragments resolve to Merge so their content survives attached to a neighboring chunk.

Share