Skip to content

datasets guide returns nothing for a naturally-phrased question #14

Description

@galjos
$ odh datasets guide "roadworks"                 -> 1 match
$ odh datasets guide "roadworks on a state road" -> 0 matches

The extra words remove the match rather than narrowing it. This is the command SKILL.md tells an agent to run first on an unfamiliar question, so the failure lands where the user is least able to recover: a zero-match guide reads as "Open Data Hub has nothing on this".

The matcher appears to require every term. Real questions arrive as sentences, and the guide is specifically the natural-language entry point — --json discovery commands are the structured path.

Fix

Score and rank rather than requiring all terms: return matches sorted by how many terms hit, and drop the ones that hit none. The existing --limit then bounds the output. The warning that catalogue matches are not proof of live rows already covers over-matching, so ranking is the safer failure direction than filtering.

Worth reusing the stopword list already in trafficSearchStopword so "on a" contributes nothing.

Done when

  • guide "roadworks on a state road" returns at least what guide "roadworks" returns.
  • A test covers a multi-word natural phrasing for two or three catalogue entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions