a strange device

Week 15  1 Samuel 23

By chapter 20 David is definitely on-the-run (king Saul still visits Normal World occasionally but he’s mostly nursing his homicidal rages against David).
So Outlaw David was holed-up in the town of Keilah and he heard that Saul was coming. What to do?
David asked Abiathar the priest to bring “the ephod” (an elaborate piece of clothing the priest wore). When Abiathar and the ephod arrived David asked the Lord if Saul was actually coming. Yes! Then he asked if the people of Keilah would turn him over to Saul. Yes! So David took-off.
I’m left with the question: how did the ephod actually work? The story just says that Abiathar & the ephod arrived…David asked the Lord…the Lord replied.
Earlier in this same chapter David asked the Lord a question and got his answer without the ephod so I wonder how necessary it was.
I wonder if the ephod functioned as an added insurance measure – a back-up.
Did it work like a crystal-ball? (I don’t get that impression.)
Did it have an instrumental role in the forecast? (Bible doesn’t spell that out.)
Did it only work if a person was in close proximity to the device? (Bible doesn’t say that but I’d think so.)
My three main questions (and answers) are:
Q: Was the ephod helpful? A: Most likely.
Q: Was it necessary? A: I don’t think so.
Q: How did it work? A: Your guess is as good as mine.

Note: the story is in 1 Samuel 23:6-14