Perplexity API (sonar) gives worse results compared to Web-UI when using Web Search #171
-
Hi, I am currently trying to create a python app that is able to search the web for recent newspaper articles. However, when I try to query my question using the API with the "sonar" model, most of the time it does not find any articles at all, while when using the Web-UI (https://www.perplexity.ai/) with exactly the same query I get really good results (multiple articles found). Why is that the case? What can I do to make the API work better? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I have the same issue, so would like to know the answer on this as well. |
Beta Was this translation helpful? Give feedback.
-
Same here - with both sonar-pro and sonar-reasoning-pro in the API, I'm getting significantly worse results than even the free Web UI. Looks like the issue is more active here #37 |
Beta Was this translation helpful? Give feedback.
-
Hi! I am sorry to hear that you are experiencing issues with this. While it is not expected that you get worse answers using the API, it is definitely expected that you get different ones, as the search process differs slightly from one process to another. A first element for example is the fact that the API call requires users in a system prompt while we craft the one relevant to the Web-UI. Users are also expected to tweak the hyperparameters for best results. We'll be releasing guides and best practices shortly to help assist with this, but in the meantime please feel free to reach out with additional questions! |
Beta Was this translation helpful? Give feedback.
Hi! I am sorry to hear that you are experiencing issues with this. While it is not expected that you get worse answers using the API, it is definitely expected that you get different ones, as the search process differs slightly from one process to another.
A first element for example is the fact that the API call requires users in a system prompt while we craft the one relevant to the Web-UI. Users are also expected to tweak the hyperparameters for best results. We'll be releasing guides and best practices shortly to help assist with this, but in the meantime please feel free to reach out with additional questions!