Palantir Technologies Inc. raised its annual revenue outlook to $4.4 billion and outpaced analyst estimates for third-quarter sales, though the shares declined in after-hours trading on concerns about the company’s lofty valuation after a record run-up.

