📜 ⬆️ ⬇️

How search tips save human life every day

Search tips exist in Yandex for more than four years . In professional slang, we call them sajest. Initially, it was formed only on the basis of the frequency of certain requests. Over time, we taught the tips to take into account from which region the question is asked , whether it is associated with some recent event , whether it is possible to show the user the site address immediately and which one . On top of that, we are the first of the existing search engines to implement a technology that allows us to Sadzhest take into account the previous request of the user and show him the context help. Now the search prompts enter into a dialogue with you and change depending on what you were just looking for.



The task of Yandex is to answer questions, both asked and not. The search is about the questions asked, but the user can be helped to formulate them. Indeed, one question can be formulated in different ways and often its correct formulation helps to find more appropriate answers. This is especially useful when a person is looking for something on a topic unfamiliar to him and may not have enough of the correct terminology. Or, for example, you need to find some kind of quote or its author. Not always a person can accurately reproduce it. If instead of “of all the arts, cinema is the most important for us” to write “of all the arts, cinema is the most important for us”, then there is a chance that the user may not receive the information he needs. By the way, after he sees a hint with the correct option, he may not need to look further. And this is not to mention the fact that sadzhast helps to avoid spelling errors.
')
But the most obvious benefit of search tips is to save time. When after the first few letters you see the wording of the question, then do not continue to type, but use it. And now sadjest has already learned so much that sometimes you don’t even need to go to the search results page.

For example, search tips can display translations of English words.
Translation in Yandex search tips

Or give answers to unambiguous requests.
Answers to unambiguous requests in Yandex search tips

Recently, we looked at our data and found an interesting fact. In total, people ask Yandex 100 million questions a day. If you disable the search tips, then in the amount of all these users will lose 60 years. This time will take them to formulate the request, its possible correction and new wording after they have not found what they need. It turns out that if you take into account the average life expectancy in Russia, every day sadzhest allows you not to lose the life of one man.

With search tips that take into account the previous request, we save another 7 months. Rate it yourself. If a person was looking for [back to the future], then he would want to find [Christopher Lloyd], and not [contact] or [subway map].

Search tips for the previous query
And the specified sadjust will appear just after a click in the search line. In the case of the Robert Zemeckis film, the first clue will be [we are from the future].

Working on search tips is probably a dream for a person who has studied mathematics and computer science . It requires both the ability to draw conclusions based on the analysis of user requests, and certain programmer skills. After all, sadjest is millions of requests in different languages, from which you need to create such a data structure that will allow you to respond to an incoming request in just a couple of milliseconds. To do this, you need to put all the requests in a tree so that you can walk through it very quickly. Then you need to build the top ten most suitable requests for any prefix, taking into account a number of factors that we take into account in the formation of prompts. For example, the location of the user. And in order to make a sadjust that changes depending on the previous query, we had to change the existing data structures. And we have collected an additional tree containing all kinds of previous requests. They turned out more than 30 million.

In the process, you have to make all sorts of technically non-trivial decisions. Like many developers, we need to constantly look for a balance between speed and used memory. We had the task to speed up the answer to the question currently being asked. To do this, we decided to pre-calculate all possible options for all possible prefixes and put them into a tree in an almost finished form. In this case, it remains only to re-rank them taking into account the factors that we have already described. And it turned out that we did not download, but rather saved memory.

But only knowledge in the field of mathematics and statistics is not enough for us, of course. For example, in order not to show the same sentences to the user in sadzhesta, in which some words are replaced by synonyms, we need to hide them in the tree. In order to recognize them, the achievements of linguistics are also used. Over time, we learned to show hints in different languages.

For example, in Japanese
Yandex Search Tips in Japanese

or Arabic.
Yandex Search Tips in Arabic

Source: https://habr.com/ru/post/160749/


All Articles