Searches with Perplexity AI, which provides answers with citations to sources. This makes it particularly useful for research-oriented queries.
Usage
ask_perplexity(query = geterrmessage(), prompt = NULL)
See also
Other AI assistants:
ask_bing_copilot()
,
ask_chatgpt()
,
ask_claude()
,
ask_meta_ai()
,
ask_mistral()
Examples
# Basic query
ask_perplexity("Compare dplyr vs data.table")
#> Using prompts: default (perplexity)
#> Please type into your browser:
#> https://www.perplexity.ai/search?q=Answer%20with%20a%20focus%20on%20R%20programming%20and%20statistics.%20Include%20reliable%20sources%20when%20possible.%20Compare%20dplyr%20vs%20data.table&focus=internet&copilot=false
# Using a custom prompt
ask_perplexity("Best packages for time series in R",
prompt = "Provide citations and compare performance:")
#> Using prompts: function call
#> Please type into your browser:
#> https://www.perplexity.ai/search?q=Provide%20citations%20and%20compare%20performance:%20Best%20packages%20for%20time%20series%20in%20R&focus=internet&copilot=false