Summary
For sharp queries that map cleanly to a single canonical note, vault_search sometimes ranks that canonical note below tangentially-related ones — by 2–4 positions and ~0.1+ score gap.
Example shape (anonymised)
Query targeting a specific environment/topic. Workspace scoped. top_k=5, depth=full.
Returned order by score:
- 0.59 — Note about an unrelated audit that links to the canonical note in its
## Related section
- 0.51 — Investigation note in a different subdirectory
- 0.51 — Architecture note for an unrelated system
- 0.47 — The canonical note that explicitly contains the queried fact in a top-level section, with the entities in question listed verbatim in a table
- 0.46 — A peripheral ops note
The canonical note's ## Environments section verbatim contains the queried entities; the regenerated summary already mentions them. Yet three lower-relevance notes score higher.
Hypothesis
The ## Related section in note #1 contains a dense block of [[wiki-links]] matching the query terms, which may be inflating its hybrid score. Backlink / link-density / co-occurrence signals may be over-weighted relative to actual section-level body matches.
Suggested investigation
- Surface (in debug) the per-component score breakdown — semantic vs keyword vs co-occurrence vs context-boost — for the top 5 results in a repro case.
- Consider down-weighting matches that occur only in
## Related / link-list / index sections vs body content.
- Verify the
context= re-rank boost is being applied as documented; results that should be in-context appear to be losing to out-of-context neighbours.
Workaround
Don't trust rank #1 alone — scan the full top-5/top-8 and re-rank by visually checking which note's section header matches the query topic.
Summary
For sharp queries that map cleanly to a single canonical note,
vault_searchsometimes ranks that canonical note below tangentially-related ones — by 2–4 positions and ~0.1+ score gap.Example shape (anonymised)
Query targeting a specific environment/topic. Workspace scoped.
top_k=5,depth=full.Returned order by score:
## RelatedsectionThe canonical note's
## Environmentssection verbatim contains the queried entities; the regenerated summary already mentions them. Yet three lower-relevance notes score higher.Hypothesis
The
## Relatedsection in note #1 contains a dense block of[[wiki-links]]matching the query terms, which may be inflating its hybrid score. Backlink / link-density / co-occurrence signals may be over-weighted relative to actual section-level body matches.Suggested investigation
## Related/ link-list / index sections vs body content.context=re-rank boost is being applied as documented; results that should be in-context appear to be losing to out-of-context neighbours.Workaround
Don't trust rank #1 alone — scan the full top-5/top-8 and re-rank by visually checking which note's section header matches the query topic.