atlasbot: detect baseline trend metrics
This commit is contained in:
parent
9716755fdb
commit
692b059b52
@ -285,6 +285,10 @@ class AnswerEngine:
|
|||||||
metric_terms = ("cpu", "ram", "memory", "net", "network", "io", "disk", "load", "usage", "pod", "pods", "namespace")
|
metric_terms = ("cpu", "ram", "memory", "net", "network", "io", "disk", "load", "usage", "pod", "pods", "namespace")
|
||||||
if any(term in lowered_question for term in hottest_terms) and any(term in lowered_question for term in metric_terms):
|
if any(term in lowered_question for term in hottest_terms) and any(term in lowered_question for term in metric_terms):
|
||||||
classify["question_type"] = "metric"
|
classify["question_type"] = "metric"
|
||||||
|
baseline_terms = ("baseline", "delta", "trend", "increase", "decrease", "drop", "spike", "regression", "change")
|
||||||
|
if any(term in lowered_question for term in baseline_terms) and any(term in lowered_question for term in metric_terms):
|
||||||
|
classify["question_type"] = "metric"
|
||||||
|
classify["needs_snapshot"] = True
|
||||||
|
|
||||||
if not classify.get("follow_up") and state and state.claims:
|
if not classify.get("follow_up") and state and state.claims:
|
||||||
follow_terms = ("there", "that", "those", "these", "it", "them", "that one", "this", "former", "latter")
|
follow_terms = ("there", "that", "those", "these", "it", "them", "that one", "this", "former", "latter")
|
||||||
|
|||||||
@ -26,6 +26,7 @@ ROUTE_SYSTEM = (
|
|||||||
+ "Assume questions are about the Titan Lab Atlas Kubernetes cluster unless the user explicitly asks about something else. "
|
+ "Assume questions are about the Titan Lab Atlas Kubernetes cluster unless the user explicitly asks about something else. "
|
||||||
+ "Prefer snapshot evidence when available. "
|
+ "Prefer snapshot evidence when available. "
|
||||||
+ "If the question asks for hottest/highest/lowest CPU/RAM/NET/IO/Disk nodes, mark it as a metric question and require snapshot evidence. "
|
+ "If the question asks for hottest/highest/lowest CPU/RAM/NET/IO/Disk nodes, mark it as a metric question and require snapshot evidence. "
|
||||||
|
+ "If the question asks about baselines, deltas, trends, increases/decreases, drops, spikes, or time-based comparisons, mark it as metric or diagnostic and require snapshot evidence. "
|
||||||
+ "Return JSON only."
|
+ "Return JSON only."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user