From: Axy Date: Fri, 28 Aug 2026 15:01:23 +0000 (+0200) Subject: Tiny fix X-Git-Url: https://git.uwuaxy.net/sitemap.xml?a=commitdiff_plain;h=9e8bb17bd8f38ca6053bf1788f15711aaf573825;p=axy%2Fft%2Frag.git Tiny fix --- diff --git a/src/rag/evaluate.py b/src/rag/evaluate.py index 296743f..5180390 100644 --- a/src/rag/evaluate.py +++ b/src/rag/evaluate.py @@ -5,6 +5,8 @@ from rag.models import Source def sources_overlap(a: Source, b: Source, min_iou: float) -> bool: """Check whether two sources overlap with a minimum IoU.""" + if a.file_path != b.file_path: + return False union_start = min(a.first_character_index, b.first_character_index) union_end = max(a.last_character_index, b.last_character_index) + 1 union = union_end - union_start