When governments turn to AI: Algorithms, trade-offs, and trust