We review most of the algorithms in NLP and found that Stupid backoff is one of the best.
With this algorithm (keep in the mind we have just 3,2 and unigrams) we will just use the last two words entered in the input phrase. This algorithm uses the 3, 2, and unigrams in the order to find the words with the highest score.
In each level it will divide the counts of matched phrase with the previous level matched words. For example if we are using trigram, we will divide the counts by the counts of matched words in bigrams. In the next level down we will apply a 0.4 coefficient.
You can refer to: "Speech and Language Processing. Daniel Jurafsky & James H. Martin. Copyright c 2016. All rights reserved. Draft of August 7, 2017." chapter 4