Files
ar9av__obsidian-wiki/tests/test_graphrag.py
ar9av 427a9016b6 fix: graph-query false positive for non-English gap questions
_score() matched terms as bare substrings, so short function words
(German "ich", "den", French/Spanish equivalents) hit inside unrelated
longer words in a title/summary and scored a page unrelated to the
actual query term. Combined with an absolute index_only threshold,
this let an unrelated page get flagged index_only:true — telling the
calling agent it can answer without reading any page.

- _score() now requires a word-boundary prefix match (\bterm) instead
  of a bare substring, so short terms can't hit mid-word. Prefix
  (not \bterm\b) keeps inflected/plural matches.
- index_only now also requires the top candidate to lead the runner-up
  by 2x, not just clear an absolute score — a real hit does; noise
  scores cluster together.
- extended the stop-word list with common German/French/Spanish
  function words to cut the residual noise these fixes don't remove.

Fixes #191
2026-08-25 18:32:58 -07:00

18 KiB