concept query in category deep learning

This is an excerpt from Manning's book Deep Learning for Search.
Relevance is the fundamental measure of how well the search engine responds to users’ information needs. Some information retrieval models can give a standardized measure of the importance of results with respect to queries, but there’s no silver bullet. Context and opinions can vary significantly among users, and therefore measuring relevance needs to be a continuous focus for search engineers.
5. Run the queries against the inverted indexes.
As you can see in figure 3.1, you’ll be setting up the search engine to use a neural network at search time to generate appropriate alternative queries to add to the query entered by the user. You’ll keep the original query as it was written by the user and add the generated queries as additional optional queries. Toward the end of the chapter, we’ll discuss how to best use the generated queries.
Automatic query expansion is the name of the technique of generating (portions of) queries under the hood to maximize the number of relevant results for the end user. In some sense, synonym expansion (which you saw in chapter 2) is a special case of automatic query expansion if you use it at query time only (not to index synonyms, but only to expand synonyms for terms in the query).
In the search log example, you take the queries one after the other, removing everything else:
artificial intelligence books about AI artificial intelligence hype covfefe latest trendsAs you can see, this is plain text. All you need to do is decide how to identify the end of a query. In this case, you might use the carriage return character (\n) as a delimiter for two consecutive queries, and the text-generation algorithm will stop whenever it generates a carriage return. This approach is tempting, because it requires almost no preprocessing: the data to be used can come from anywhere because it’s just plain text. You’ll see the pros and cons later in this chapter.
In practice, it took several hours of trial and error to come up with good settings for the different parameters in the unsupervised approach. This process will take less time as you become more experienced with the dynamics of LSTMs (and, in general, of neural networks). For instance, the Shakespeare example contains sequences that are much longer than queries. Queries are short—on average, between 10 and 50 characters—whereas lines from Macbeth can contain 300 characters. So the example-length parameter for the Shakespeare example (200) is longer than that used for learning to generate queries (50).
Also consider the hidden structures in text. Text from Shakespearean comedies usually has the following pattern: CHARACTERNAME : SOMETEXT PUNCTUATION CR, whereas queries are just sequences of words followed by a carriage return. Queries can contain both formal and informal sentences, with words like “myspaceeee” that can confuse the RNN. So whereas the Shakespearean text needed only one hidden layer to give okay results, the LSTM needed at least two hidden layers to perform in a useful way.
Chapter 1 talked about the fundamental problem of how users can best express an information need. But as a user, do you really want to spend a lot of time thinking about how to word a query? Imagine yourself on your way to work on public transport early in the morning, searching for information on your phone. You don’t have the time or the brainpower (it’s early!) to come up with the best way to interact with a search engine.