From fafe078857a4742a4c56861aff1ea4be4bc17b8b Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Fri, 4 Sep 2026 22:36:55 +0000 Subject: [PATCH] Raise the vector over-fetch to 4x so every collection fills its budget 3x still came up short on `complexes` for one of the 20 questions in tests/golden/questions.txt -- 8 distinct documents where 10 were asked for -- because a Reactome entity can occupy more rows than 3x leaves room to collapse. Measured across all four collections and all 20 questions: 4x clears every case, 6x gains nothing further. The cost is a larger k on a Chroma query that is already local, which is not measurable next to the LLM calls in the same request. Follows #169, which fixed the duplication itself. The constant carries the measurement so the next person does not have to redo it to know why it is 4. Co-Authored-By: Claude Opus 5 --- src/retrievers/csv_chroma.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/retrievers/csv_chroma.py b/src/retrievers/csv_chroma.py index 43b5dba..8e5fdc0 100644 --- a/src/retrievers/csv_chroma.py +++ b/src/retrievers/csv_chroma.py @@ -67,7 +67,11 @@ # pathway/input/output/catalyst combination -- and those rows have distinct # page_content, so nothing upstream collapses them. Without over-fetching, a # request for 10 returns about 5 distinct reactions. See issue #169. -VECTOR_OVERFETCH = 3 +# +# 4x, not 3x: measured over the 20 questions in tests/golden/questions.txt, 3x +# still came up short on `complexes` for one of them (8 distinct of 10). 4x +# clears all 20 on every collection and 6x gains nothing further. +VECTOR_OVERFETCH = 4 # How many fused documents each collection contributes to the answer prompt. #