Require route evidence in displayed snippets
CI / test (push) Successful in 1m38s
CI / test (pull_request) Failing after 55s

This commit is contained in:
m
2026-08-25 23:57:50 +03:00
parent d7afd5be34
commit 24916aa8f7
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -1838,8 +1838,11 @@ func researchFindingMatchesIntent(query string, finding epistemics.ResearchFindi
if len(routeTerms) < 2 {
return true
}
// A route-looking URL or page title alone is not enough for a human-facing
// answer: the displayed excerpt itself must support both endpoints.
excerptEvidence := strings.ToLower(finding.Excerpt.Text)
for _, term := range routeTerms {
if !strings.Contains(evidence, term) {
if !strings.Contains(excerptEvidence, term) {
return false
}
}