The Bible here teaches we must avoid teachers of lies. (
Mat 15:8-9) It further says we gain knowledge of (or identify) false prophets by their fruitage. That is simple! If a person or group directs you to Christ, encouraging you to know him personally by reading the Gospels, that is good fruit or works. If they direct you to their group or sect, asserting joining them (and being identified as following their doctrine of faith) is your only hope of salvation,
that is always bad fruit.