knolo-core icon indicating copy to clipboard operation
knolo-core copied to clipboard

Whole-word matching option and a minimum term length

Open HiveForensicsAI opened this issue 3 weeks ago • 0 comments

For human review. This came from a usage review of knolo-box. A human maintainer will review and implement this manually. No code or PRs come with this issue. No version bump or npm publish is requested.

Summary

Search matching is substring-based. Short terms match inside longer words (for example a three-letter term matching inside "quote" and "quota"), and one-letter terms match nearly every chunk. That produces noisy false hits and makes short queries unusable.

Steps to reproduce

  1. Build a knolo-box image with ordinary skill or doc text that contains words like "quote", "quota", or other common stems.
  2. Call knolo_search with a short substring that appears only inside those longer words (not as its own whole word).
  3. Observe multiple hits that do not contain the term as a whole word.
  4. Call knolo_search with a single-letter term. Nearly every chunk matches.

Expected behavior

  • Add a whole-word or prefix matching mode (or make one of those the default).
  • Ignore one- and two-letter terms unless they are quoted.
  • Keep behavior deterministic and document the matching rules in the knolo-box / @knolo/mcp docs.

Why it matters

False substring hits crowd out real answers and train users and agents to distrust search. Single-letter noise is especially bad when an agent expands a short acronym or a product letter into a query.

Acceptance criteria

  • A three-letter substring inside "quote"/"quota"-style words does not match unless whole-word/prefix rules say it should.
  • Unquoted one- and two-letter terms are ignored (or documented as no-ops).
  • Quoted short terms still match when the caller asks for them.
  • Fixture tests cover substring false positives and the minimum term length rule.

Related

  • Ranking / relevance follow-up for knolo-box search (file alongside this issue if present)
  • #79 / #87: @knolo/mcp search tools

A human maintainer will review and implement this manually.

HiveForensicsAI avatar Nov 09 '26 10:11 HiveForensicsAI