30:7,8
So instead of mediums, David turned to the priest, and through the ephod sought an answer from the Lord. We are not told how the ephod worked, but it is evident that David got a clear answer. David should pursue the raiding party, and he would succeed in the rescue.
30:9-15
So David and his men set out. Two hundred of the men were exhausted, so they were left behind to guard what few possessions they had left by his master because he was ill. David and the remaining four hundred continued the pursuit. They came across an Egyptian who had been abandoned. He had had no food or drink, so they fed and watered him. He was able to lead them to the raiding party, as long as he was not killed not handed over to his former master.