Next Query Prediction (NQP).
This is a standard query suggestion task [1]}, [2]}. Specifically, for a mined session \(\mathcal {T} = \lbrace  Q_1,..., Q_{N-1}, Q_{N}\rbrace \) , the NQP task is to predict the last query \(Q_N\) , as a positive suggestion \(S\) , give the previous queries \(Q_{<N}\) .
The GPT-2 model can be fine-tuned directly with the positive pairs formed by for pairing \(Q_N\)  (or \(S\) ) and its previous queries in the same session. Training the BERT-based ranker requires negative suggestions, which can be sampled from the \(K\)  most frequent queries that appear after \(Q_{N-1}\)  in the search log [1]}.
