228 |
229 | {" "}
230 | What is Contextual Query Expansion?{" "}
231 |
232 | Query expansion works as follows. First, a set of rules are used to
233 | determine which token in the query to expand. These rules are chosen
234 | to improve recall (surface relevant queries) without altering the
235 | semantics of the original query. Example rules include only
236 | expanding ADJECTIVES AND ADVERBS ; other parts of speech such as
237 | nouns, proper nouns or even named entities are not expanded. Once
238 | expansion candidates are selected, they are then iteratively masked
239 | and a masked language model is used to predict tokens that best
240 | complete the sentence given the surrounding tokens. Additional
241 | details are provided in the{" "}
242 |
243 | {" "}
244 | NeuralQA paper.
245 | {" "}
246 |
247 | {" "}
248 | How is this Implemented?{" "}
249 |
250 | Part of speech detection is implemented using Spacy NLP. A BERT
251 | based masked language model is used for predicting expansion terms
252 | (can be selected under advanced options).
253 |
254 | *Note contextual query expansion works best when the model is
255 | trained on the target (open-domain) dataset.
256 |
257 |