atlasbot: emphasize metric facts in evidence fixes

This commit is contained in:
Brad Stein 2026-02-01 04:37:15 -03:00
parent 59f17403ab
commit f6bb0b90dd
2 changed files with 6 additions and 0 deletions

View File

@ -160,6 +160,7 @@ class AnswerEngine:
runbook_paths = self._kb.runbook_paths(limit=10) runbook_paths = self._kb.runbook_paths(limit=10)
history_ctx = _format_history(history) history_ctx = _format_history(history)
lexicon_ctx = _lexicon_context(summary) lexicon_ctx = _lexicon_context(summary)
key_facts: list[str] = []
started = time.monotonic() started = time.monotonic()
reply = "" reply = ""
@ -327,6 +328,10 @@ class AnswerEngine:
extra_bits.append("AllowedRunbooks: " + ", ".join(runbook_paths)) extra_bits.append("AllowedRunbooks: " + ", ".join(runbook_paths))
if resolved_runbook: if resolved_runbook:
extra_bits.append("ResolvedRunbook: " + resolved_runbook) extra_bits.append("ResolvedRunbook: " + resolved_runbook)
if key_facts:
metric_facts = [line for line in key_facts if re.search(r"\\d", line)]
if metric_facts:
extra_bits.append("MustUseFacts: " + "; ".join(metric_facts[:4]))
if allowed_nodes: if allowed_nodes:
extra_bits.append("AllowedNodes: " + ", ".join(allowed_nodes)) extra_bits.append("AllowedNodes: " + ", ".join(allowed_nodes))
if allowed_namespaces: if allowed_namespaces:

View File

@ -100,6 +100,7 @@ EVIDENCE_FIX_PROMPT = (
"If the draft says data is missing but the context includes relevant values, " "If the draft says data is missing but the context includes relevant values, "
"rewrite the answer to include those values. " "rewrite the answer to include those values. "
"If data is truly missing, keep the draft concise and honest. " "If data is truly missing, keep the draft concise and honest. "
"If MustUseFacts are provided, you must incorporate them into the answer. "
"If AllowedRunbooks are provided, use an exact path from that list when answering " "If AllowedRunbooks are provided, use an exact path from that list when answering "
"documentation or checklist questions and do not invent new paths. " "documentation or checklist questions and do not invent new paths. "
"If ResolvedRunbook is provided, you must include that exact path and must not say it is missing." "If ResolvedRunbook is provided, you must include that exact path and must not say it is missing."