Added
- Confidence signal for
hudu_articlesname lookups (issue #42).getAllresponses forname-intent calls now includebestMatchScoreandnoConfidentMatch, so callers know to retry with a shorter fragment orsearchinstead of trusting a weak top hit. Confidence fires when the top-ranked title either contains the full query as a substring OR contains every distinctive (non-stopword) query token when there are at least two of them — so a correctly-ranked reworded/reordered title (all distinctive words present, different order) is treated as confident rather than falsely flagged, while a partial overlap or a lone common-word coincidence still reportsnoConfidentMatch: true.
Fixed
hudu_articlesnamefuzzy matching diluted by common words in long titles (issue #42). Tier-2 title-word-overlap scoring now strips function words (how,to,on,up, etc.) before ranking, so a long multi-word title's distinctive terms aren't drowned out by shared stopwords. All-stopword queries fall back to raw tokens so they never zero out.itis excluded from the stopword list — Hudu is an IT documentation tool, soITis a common content word in real titles (e.g. "IT Glue Import") that shouldn't be stripped.nameandsearchdescription text corrected. Both parameters already shared one matcher (title + body, 100-candidate re-rank, exact-title substring boosted to top) — the descriptions previously implied they used different logic. Text now says so explicitly, recommends a short distinctive fragment over a full title, and notes possible indexing lag for very recently created articles.- Tier-2 token matching now requires a whole-word hit, not a bare substring.
titleMatchScoreandisConfidentTitleMatchpreviously used plainString.includes()for each query token, so a short distinctive token (e.g.it) could spuriously match inside an unrelated longer word in the title (e.g.split), undermining both the ranking and the new confidence signal. Token checks are now boundary-aware (word-boundary regex). - Tier-1 full-query substring check now requires a whole-word boundary too. The tier-1 check still used a bare substring test, so a single-token query (e.g.
IT) could match mid-word inside an unrelated title (e.g.Digital) and reportnoConfidentMatch: falsebefore the tier-2 two-token floor got a chance to block it. BothtitleMatchScore's ranking boost andisConfidentTitleMatch's tier-1 check now reuse the same whole-word boundary helper as tier 2. - Whole-word boundary check now treats underscores as a boundary too. Query tokens are split on
_(among other delimiters), but the whole-word regex previously excluded_from its boundary class, so an underscore-separated title (e.g.MFA_Office365) never matched tokens from a space-separated query (MFA Office365) and scored 0 despite being the correct match. Underscore now counts as a boundary character on both sides, matching the query-side tokenization. - Whole-word boundary check now tolerates a pluralized title word. The underscore-boundary fix above made the boundary check too strict for plain English pluralization: a singular query word/phrase (e.g.
Reset Password) no longer matched a pluralized title (e.g.Reset Passwords), losing both the tier-1 substring boost and the tier-2 token hit, which could leaveisConfidentTitleMatchreportingfalsefor an obvious match. The right-hand boundary now also accepts a single trailing literalsbefore the real boundary, sopassword/passwords,article/articles,vlan/vlans, etc. still match — while a bare mid-word substring (e.g.itinsidesplitoritems) still correctly fails, since only a lone trailingsis special-cased, not arbitrary trailing characters. - Plural allowance no longer applies to 2-letter tokens. The trailing-
sallowance above let a bare 2-letter acronym query (e.g.IT) falsely whole-word-match an unrelated title containing the distinct wordits(a possessive pronoun, not the plural ofit), reintroducing the original acronym-collision bug for short tokens specifically. The allowance now only applies to tokens of 3+ characters, where this collision doesn't occur in practice.