atlasbot: enforce metric facts after evidence fix
This commit is contained in:
parent
e07e3c785f
commit
b91f3e72aa
@ -535,6 +535,24 @@ class AnswerEngine:
|
||||
model=plan.model,
|
||||
tag="evidence_fix",
|
||||
)
|
||||
if metric_facts and not _reply_matches_metric_facts(reply, metric_facts):
|
||||
enforce_prompt = (
|
||||
prompts.EVIDENCE_FIX_PROMPT
|
||||
+ "\nQuestion: "
|
||||
+ normalized
|
||||
+ "\nDraft: "
|
||||
+ reply
|
||||
+ "\nMustIncludeFacts: "
|
||||
+ "; ".join(metric_facts[:6])
|
||||
+ "\nInstruction: The answer must include all MustIncludeFacts items."
|
||||
)
|
||||
reply = await call_llm(
|
||||
prompts.EVIDENCE_FIX_SYSTEM,
|
||||
enforce_prompt,
|
||||
context=context,
|
||||
model=plan.model,
|
||||
tag="evidence_fix_enforce",
|
||||
)
|
||||
|
||||
if "raspberry" in lowered_question and "not" in lowered_question:
|
||||
non_rpi = _non_rpi_nodes(summary)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user