feat: prefer full hottest line for hotspot questions
This commit is contained in:
parent
d8dc4379a9
commit
8a4ac352cd
@ -308,6 +308,11 @@ class AnswerEngine:
|
||||
elif hardware_facts:
|
||||
metric_facts = hardware_facts
|
||||
key_facts = _merge_fact_lines(metric_facts, key_facts)
|
||||
if any(term in lowered_q for term in ("hot spot", "hotspot", "hot spots", "hotspots")):
|
||||
hottest_line = next((line for line in summary_lines if line.startswith("hottest:")), None)
|
||||
if hottest_line:
|
||||
metric_facts = [hottest_line]
|
||||
key_facts = _merge_fact_lines(metric_facts, key_facts)
|
||||
if classify.get("question_type") in {"metric", "diagnostic"}:
|
||||
if focus_entity != "node" and any(tok in lowered_q for tok in ("hardware", "class", "type", "rpi", "jetson", "amd64", "arm64")) and any(
|
||||
tok in lowered_q for tok in ("average", "avg", "mean", "ram", "memory", "cpu", "load")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user