atlasbot: prioritize keyword chunks and expand evidence fixes
This commit is contained in:
parent
b3e53a7fd7
commit
89d6ba3a3d
@ -714,18 +714,18 @@ def _select_chunks(
|
||||
text = item.get("text", "").lower()
|
||||
if any(kw in text for kw in lowered):
|
||||
keyword_hits.append(item)
|
||||
for item in ranked:
|
||||
if len(selected) >= plan.chunk_top:
|
||||
break
|
||||
if item is head:
|
||||
continue
|
||||
selected.append(item)
|
||||
for item in keyword_hits:
|
||||
if len(selected) >= plan.chunk_top:
|
||||
break
|
||||
if item in selected:
|
||||
continue
|
||||
selected.append(item)
|
||||
for item in ranked:
|
||||
if len(selected) >= plan.chunk_top:
|
||||
break
|
||||
if item is head:
|
||||
continue
|
||||
selected.append(item)
|
||||
return selected
|
||||
|
||||
|
||||
@ -843,7 +843,10 @@ def _needs_evidence_fix(reply: str, classify: dict[str, Any]) -> bool:
|
||||
"can't",
|
||||
"need to",
|
||||
"would need",
|
||||
"does not provide",
|
||||
"not provided",
|
||||
"not in context",
|
||||
"not referenced",
|
||||
"missing",
|
||||
"no specific",
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user