where \(x_{i}\) is the token with the highest probability at \(i\)-th step of generation conditioned on the context \(\mathbf{x}_{<i}\). For instance in Figure 10, when predicting the next token of the sentence _"I am sleepy. I start a pot of"_, greedy search selects the token "coffee" which has the highest probability at the current step. Greedy search can achieve satisfactory results in text generation tasks (_e.g.,_ machine translation and text summarization), in which the output is highly dependent on the input [307]. However, in terms of open-ended generation tasks (_e.g.,_ story generation and dialog), greedy search sometimes tends to generate awkward and repetitive sentences [308].