Intelligent research assistant using Perplexity AI models with automatic query complexity detection and routing