Tata Consultancy Services, India's biggest information technology company, reported second-quarter results after the market closed on Thursday. Net profit came to 13,884 crore rupees, up 4% from the prior quarter, on revenue of 73,188 crore rupees, CNBC-TV18 reported. In dollar terms, revenue was $7.64 billion, in line with forecasts.

The standout number was artificial intelligence. Revenue from AI work crossed $3 billion during the quarter, up from $2.6 billion the quarter before, and now makes up more than 10% of total sales.

Other numbers were flat or a bit soft. The operating margin held at 24%, slightly below estimates. Revenue grew just 0.5% in constant currency, a measure that strips out exchange rate swings. New deal wins totaled $9.6 billion, the middle of what analysts expected.

Investors liked it anyway. TCS shares rose more than 4% on Friday to about 2,161 rupees by midday, The Hindu BusinessLine reported. "People were expecting numbers to be even bad," fund manager Sandeep Agarwal told CNBC-TV18. "From that perspective, numbers are decent."

Analysts are split. Nomura kept a Buy rating with the highest target, 2,630 rupees. Citi kept a Sell, warning that margins keep missing the company's goal of 26% to 28%. Jefferies rated the stock Underperform, citing rising margin pressure.

The rally comes after a hard year. The stock was down about 29% over the past 12 months before Friday's gain, as investors worried that AI tools could shrink demand for traditional outsourcing work.

There is a U.S. angle too. Analysts at Kotak flagged that the U.S. government suspended new and pending PERM applications, a step in the green card process, involving TCS, Infosys and Wipro. They expect limited impact because Indian IT firms already hire many local workers in the U.S.

TCS also struck a deal to buy Porsche's consulting arm MHP for an enterprise value of 320 million euros.

What we know: TCS met forecasts, and AI now tops 10% of its sales.
What we don't: Whether margins can climb back to the company's target range.