ConfRAG: Confidence-Guided Retrieval-Augmenting Generation