Namespace LMKit.Retrieval.ChunkQuality
Classes
- ChunkIndexUnit
One ready-to-embed unit produced by EvaluatePage(IReadOnlyList<string>): either a single source chunk, or several contiguous source chunks folded together by the neighbor-merge policy.
- ChunkQualityAssessment
The outcome of gating one chunk: the recommended Decision, the estimated semantic value Score, the diagnostic Issues, the normalized EmbeddingText to embed when the chunk is kept, and the raw Signals behind the decision.
- ChunkQualityGateOptions
Configuration for a SemanticChunkQualityGate. The defaults implement the recommended Balanced behavior; most callers never need to change anything.
- DocumentChunkGateSession
Gates the chunks of one document, page by page, with the per-document features a stateless assessment cannot provide: suppression of chunks repeated inside the document (page furniture, boilerplate), folding of weak-but-clean chunks into an adjacent chunk of the same page, and a document-level extraction verdict.
- DocumentQualitySummary
Aggregated gating totals for one document, produced by Complete(). Useful for ingestion telemetry and for detecting documents whose text extraction produced garbage wholesale.
- SemanticChunkQualityGate
A fast, deterministic quality gate that decides whether a text chunk is worth embedding into a semantic (vector) index. It rejects chunks that are technically valid text but carry no standalone semantic value: binary extraction noise, legacy-font mojibake, markup scaffolding, repeated boilerplate, and metadata-only fragments. Once embedded, such chunks become recurring high-score false positives across unrelated queries; dropping them before embedding both protects search quality and saves embedding time.
Structs
- ChunkQualitySignals
The raw, deterministic measurements the SemanticChunkQualityGate computed for one chunk. Exposed for observability: logging these values alongside a decision makes every rejection explainable and reproducible.
Interfaces
- IChunkRepetitionTracker
Cross-document repetition knowledge for a DocumentChunkGateSession. A session detects chunks repeated INSIDE one document by itself; content repeated ACROSS documents (email footers, legal notices, page furniture, template fragments) needs state that outlives a document. Implementations own that state and its scope (typically one tracker per index or per tenant); the session reports what it sees and asks before indexing.
Enums
- ChunkIndexingDecision
The action the SemanticChunkQualityGate recommends for a candidate chunk before embedding generation.
- ChunkQualityIssues
Machine-readable reasons explaining a SemanticChunkQualityGate decision. Several issues can apply to the same chunk, so the enumeration is a flags set.
- ChunkQualityProfile
Calibrated sensitivity presets for the SemanticChunkQualityGate. Each profile selects a frozen set of decision thresholds validated against a labeled corpus of real-world extraction noise and multilingual clean content.