Skip to content

Replace the keyword scorer with BM25 over the extended text #76

Description

@aborruso

The 2026-08-10 retrieval eval (54 queries on ISTAT, see docs/search.md) measured:

arm MRR S@10
A — current keyword scorer 0.073 16.7%
A″ — BM25, extended text 0.135 24.1%

Roughly +85% MRR. No model, no server, no new dependency, works offline on the cache that already ships.

Two properties of _score_results set the ceiling: all query tokens weigh the same, and occurrences are summed with no length denominator, so long documents score high for being long. BM25 fixes exactly both.

The extended text (df_prose, df_keywords, df_notes) is already on disk — today only the embedding path reads it.

Measured on ISTAT only; the extended-text gain on other providers is untested, and only ISTAT ships harvested prose today.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions