Loading
Loading
A 0–100 health score over four pillars — Coverage × Precision × Resolution × Density. Geometric mean, by design.
@dataclass(frozen=True, slots=True)
class Diagnostics:
fmi: int # 0..100
coverage: float # 0..1
precision: float # 0..1
resolution: float # 0..1
density: float # 0..1
window_days: int
deposit_count: int
def explain(self) -> str: ...FMI = 100 * (Coverage × Precision × Resolution × Density) ** (1/4)Geometric mean, not arithmetic — so a single weak pillar drops the score sharply. Intentional. A field that scores 90 on three pillars and 10 on the fourth is not a healthy field.
Rolling 30-day fraction of recall()calls that returned at least one confident hit. Drops when users are asking questions the field hasn't answered yet.
Average bag_precision across all multi-sample scope bags. Drops when bags are split — i.e. the field stores both a positive and a negative for the same scope.
Fraction of conflict bags that have been resolved — at least one deposit in the bag is the target of a contradicts edge. Tracks whether known conflicts get adjudicated.
1 − singleton_bags / total_bags. Drops when most scope bags have just one deposit (single observations aren't settling anything).
diag = user.health(window_days=30)
print(diag.fmi) # e.g. 72
print(diag.explain())
# "Memory is healthy (FMI 72/100). Searches are returning confident answers."Was this page helpful?