Alphabet shares gain as Google search boosts profits

Silicon Valley giant says AI is helping engagement in search division