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()
|
text = item.get("text", "").lower()
|
||||||
if any(kw in text for kw in lowered):
|
if any(kw in text for kw in lowered):
|
||||||
keyword_hits.append(item)
|
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:
|
for item in keyword_hits:
|
||||||
if len(selected) >= plan.chunk_top:
|
if len(selected) >= plan.chunk_top:
|
||||||
break
|
break
|
||||||
if item in selected:
|
if item in selected:
|
||||||
continue
|
continue
|
||||||
selected.append(item)
|
selected.append(item)
|
||||||
|
for item in ranked:
|
||||||
|
if len(selected) >= plan.chunk_top:
|
||||||
|
break
|
||||||
|
if item is head:
|
||||||
|
continue
|
||||||
|
selected.append(item)
|
||||||
return selected
|
return selected
|
||||||
|
|
||||||
|
|
||||||
@ -843,7 +843,10 @@ def _needs_evidence_fix(reply: str, classify: dict[str, Any]) -> bool:
|
|||||||
"can't",
|
"can't",
|
||||||
"need to",
|
"need to",
|
||||||
"would need",
|
"would need",
|
||||||
|
"does not provide",
|
||||||
"not provided",
|
"not provided",
|
||||||
|
"not in context",
|
||||||
|
"not referenced",
|
||||||
"missing",
|
"missing",
|
||||||
"no specific",
|
"no specific",
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user