More literally, the word is sift
or refine.
It is frequently used in contexts of refining gold and silver. The use of this verb in Judges 7:4 “can give a certain measure of encouragement to Gideon that God will refine his army and will leave only the best…. This feeling is further reinforced by God’s direct intervention in the sifting process: 'bring them down to the water and I will sift them for you there. Anyone of whom I tell you, This one is to go with you, that one shall go with you; and anyone of whom I tell you, This one is not to go with you, that one shall not go' (Judges 7:4) It is God who carries out the refining action and it is He who decides who will fight.”1
4 And the LORD said to Gideon, “The people are still too many. Take them down to the water, and I will test them for you there, and anyone of whom I say to you, ‘This one shall go with you,’ shall go with you, and anyone of whom I say to you, ‘This one shall not go with you,’ shall not go.”