Wall Street's main indices closed slightly lower as worries over valuations of artificial intelligence stocks lingered in the final days of the year.