Distributions as a test tool
Mova checks every count it produces against the distribution of that count over comparable items. Most pipelines produce many items: documents, chunks, papers, pages, lessons, trees. A bug usually shows up as an item that does not fit the distribution, long before any single example looks wrong.
The rule
For a per-item count, take the norm as the median over comparable items: the same kind of item, of similar size, or the count normalised by size. A value 5× from the norm in either direction deserves a closer look. At 10–20× there is a bug somewhere. Fix the cause in the pipeline, not the single item. The thresholds are ratios, so they work for skewed counts. Where a quantity is expected to be roughly normal after a transform (for example after a logarithm or after dividing by size), also check that its histogram is unimodal and without a long tail.
Examples
- Questions per 1,000 words of a document: compare chunks of one document, and documents of similar size (community).
- Trees, frames or graph facts per sentence, per chapter and per document.
- Tokens per sentence, sentences per paragraph, pages per site section.
- Any count per run or per round in training and annotation pipelines: accepted, rejected, skipped and timing.
Report
A check prints the norm, the quantiles, and every item at ≥ 5× (look) and ≥ 10× (suspect) with its value, its ratio and its source. A check without a negative control is not a check: a deliberately broken input must land in the report.
tools/distcheck does this for any TSV: a group column for the comparable items, a size column for normalised counts, --control for the injected broken item. Absent items are not seen: count the zeros from the source itself (a pass with no ideas, a lesson with no exercises), not from an export that only lists what it found.
This page in Markdown https://md.mova.elamur.ai/free/en/docs/repo-docs/distributions/