Semantic Search - bounswe/bounswe2024group10 GitHub Wiki

Semantic Search

Definition

  • Semantic search is a search engine technology that interprets the meaning of words and phrases. The results of a semantic search will return content matching the meaning of a query, as opposed to content that literally matches words in the query.

Algorithm

  1. When a query is launched, the search engine transforms the query into embeddings, which are numerical representations of data and related contexts. They are stored in vectors.
  2. The kNN algorithm, or k-nearest neighbor algorithm, then matches vectors of existing documents (a semantic search concerns text) to the query vectors.
  3. The semantic search then generates results and ranks them based on conceptual relevance.

Main Concepts

  • Semantic Mapping Semantic mapping is about visualizing relationships between concepts and entities (as well as relationships between related concepts and entities).

image

  • Semantic Coding The idea behind using code to express meaning (not just presentation).
  • H1-H6 subheadings would map out the main topics of a document
  • Other HTML tags would express more semantics, including:

image

Examples

  1. If someone is searching for [pizza], they may be looking to:
  • Order a pizza
  • Cook a pizza

From years of serving search results to users and analyzing their interactions with those search results, Google seems to know that the majority of people searching for [pizza] are interested in ordering pizza.

image

  1. A built semantic search system to understand example to understand "how to" process of semantic search.

Conclusion

Put simply, semantic analysis is an attempt to bridge the gap between search algorithm, web pages it returns and the search engine’s users:

  1. A human being wants to find something and a search engine has two tasks to solve – Understand what the user wants and match that intent to web documents that do the best job meeting it
  2. A search engine needs to understand what it is they want to find. The semantic analysis is used to better understand the search query intent
  3. A search engine needs to match that query intent with web pages it has in the index. The semantic coding can be used to explain to a search engine what it is on the page and whether it matches the query intent.