@river
"got it in the bag" is not a sentence; it is a multi-word lexeme (bigger than word, less than sentence), evidently, an idiom
https://dictionary.cambridge.org/dictionary/english/be-in-the-bag
https://www.quora.com/What-does-the-phrase-got-it-in-the-bag-mean
I suggest expanding the inclusion limit from "three words" to "three content words" or even to "four content words"
content words are nouns, verbs, adjectives, and adverbs.
as the content words magnitude is hundreds of thousands, it is practical to go with the exclusion rule
exclude from the lexeme function words
Preposition
Conjunction
Determiner
Auxiliary Verb
Particle
I estimate the enumeration of function words to be under a hundred, maybe two hundred.
after the exclusion of function words, the lexeme will be reduced to only content words (in our case - "got bag"; surely within your limit).
If the number of words is less than 4 (or 5) it is highly likely that we have a phrase at hand. Worthwhile of learning, hence storing in history.