liveBook · Manning

Disambiguation

As explained in AI-Powered Search

Query disambiguation is the process of resolving multiple plausible interpretations of a search query.

A search for “driver” might mean a person operating a vehicle or software used by a computer system. Query-sense disambiguation identifies these competing meanings so the search experience can make an intentional choice instead of mixing unrelated results. section 6.2

One approach uses a semantic knowledge graph to traverse from a query term to document categories, then from each category to related terms. Category-relatedness scores suggest likely contexts; the terms reveal what the query means in each one. Known user context can guide the choice. When context is unknown, semantic relatedness or popularity among users can help, but neither makes the choice certain. section 6.2

Inspect the senses of “driver”

A three-step traversal can start at driver in the body field, find matching categories, then retrieve body terms within each category: nodes = [ {"field": "body", "values": ["driver"]}, {"field": "category", "min_occurrences": 5, "limit": 2}, {"field": "body", "min_occurrences": 5, "limit": 10}, ] traversal = skg.traverse(*nodes) The travel category scores 0.38996 and yields terms such as taxi, car, and license. DevOps scores 0.08917 and yields terms including ipam, aufs, and overlayfs. The category limit, term limit, and minimum occurrence threshold control how much evidence is returned. section 6.2

Table 6.3 Contextualized related terms lists by category for the query chef
Query: chef
Context: cooking 0.37731
Keywords:
chef 0.93239
chefs 0.5151
www.pamperedchef.com 0.41292
kitchen 0.39127
restaurant 0.38975
cooking 0.38332
chef's 0.37392
professional 0.36688
nakiri 0.36599
pampered 0.34736
Context: devops 0.34959
Keywords:
chef 0.87653
puppet 0.79142
docs.chef.io 0.7865
ansible 0.73888
www.chef.io 0.72073
learn.chef.io 0.71902
default.rb 0.70194
configuration 0.68296
inspec 0.65237
cookbooks 0.61503

The “chef” table shows why the highest score need not be treated as the only possible interpretation: cooking scores 0.37731, while DevOps scores 0.34959, with distinct terms under each. section 6.2

Possible responses include grouping results by meaning, selecting the likeliest meaning, mixing senses deliberately for diversity, or suggesting alternative queries. The graph-based approach depends on documents that represent the domain well; user signals can help reveal language and intentions that the document collection underrepresents. section 6.2 section 6.0

How AI-Powered Search covers it

How deep it goes
Works through graph traversal, configurable limits, and relatedness scores, but offers result-presentation strategies as options rather than an implemented ranking policy.
Examples
Compares travel and DevOps senses of “driver” and cooking and DevOps senses of “chef” using related terms and category scores.
What it assumes
Assumes an indexed collection with searchable text and context fields; builds on semantic knowledge graphs and query classification.
What you can do after
Apply it via a semantic knowledge graph to identify competing senses and choose grouping, diversity, or alternative query suggestions.
How it connects
Links semantic knowledge graphs and query classification to query routing, filtering, and query rewriting.

Also explained in

Compare how 3 books explain disambiguation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.