KPMG said this week that it will spend $2 billion on artificial intelligence and cloud services through an expanded partnership with Microsoft (MSFT.O), closely following Accenture (ACN.F) in betting on the latest technologies to weather a slowdown in advisory deals.

The accounting firm said it will incorporate AI into its core audit, tax and advisory services for clients as part of the five-year partnership.

Professional services firms face a slowdown in business as their customers downsize or hold off on consulting and transformation projects to save costs in a challenging macro economic environment.

The expanded partnership will help support KPMG’s clients and 2,500 customers serviced jointly by KPMG and Microsoft.