atlasbot: guard arch claims and ensure metric facts
This commit is contained in:
parent
84b09f34ed
commit
dc2bb6229e
@ -388,6 +388,8 @@ class AnswerEngine:
|
||||
metric_facts = _merge_fact_lines([best_line], metric_facts)
|
||||
if metric_facts:
|
||||
key_facts = _merge_fact_lines(metric_facts, key_facts)
|
||||
if (classify.get("question_type") in {"metric", "diagnostic"} or force_metric) and not metric_facts and key_facts:
|
||||
metric_facts = key_facts
|
||||
if key_facts:
|
||||
key_facts = _ensure_token_coverage(
|
||||
key_facts,
|
||||
@ -1459,6 +1461,9 @@ def _needs_evidence_guard(reply: str, facts: list[str]) -> bool:
|
||||
pressure_terms = ("pressure", "diskpressure", "memorypressure", "pidpressure", "headroom")
|
||||
if any(term in lower_reply for term in pressure_terms) and not any(term in fact_text for term in pressure_terms):
|
||||
return True
|
||||
arch_terms = ("amd64", "arm64", "rpi", "rpi4", "rpi5", "jetson")
|
||||
if any(term in lower_reply for term in arch_terms) and not any(term in fact_text for term in arch_terms):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user