The cost of repaying those harmed by AI decisions should be considered before government departments deploy the technology, an inquiry has heard.