atlasbot: focus token coverage for metric facts

This commit is contained in:
Brad Stein 2026-02-04 14:11:27 -03:00
parent 9d034bb937
commit 6da00c5008

View File

@ -450,9 +450,12 @@ class AnswerEngine:
if key_lines:
metric_facts = _merge_fact_lines(key_lines, metric_facts)
if metric_facts:
metric_cover_tokens = [tok for tok in keyword_tokens if tok and tok not in GENERIC_METRIC_TOKENS]
if not metric_cover_tokens:
metric_cover_tokens = [tok for tok in question_tokens if tok and tok not in GENERIC_METRIC_TOKENS]
metric_facts = _ensure_token_coverage(
metric_facts,
all_tokens,
metric_cover_tokens or all_tokens,
summary_lines,
max_add=plan.max_subquestions,
)