Perplexity AI is in the final stages of raising $500 million in funding at a $9 billion valuation, a source familiar with the situation told CNBC.