Hello, I’m starting to use the Perplexity API to integrate information query functionalities into an ERP. As I’m just beginning, I suspect I might be doing something wrong.
The issue is that a simple question like “Is there any module related to invoicing in Colombia available on Dolistore?” returns a very interesting response from the web UI, mentioning and COMMENTING some modules offered on Dolistore. However, when I use the API, it returns a paragraph that “doesn’t say anything useful” like this:
Yes, there are some modules. I recommend searching Dolistore for something that fits your needs… read the reviews…
Am I doing something wrong?
The endpoints I’ve tried are llama-3.1-sonar-small-128k-online
and llama-3.1-sonar-large-128k-online
, and the differences in the responses are minimal. Honestly, it seems like it’s not searching the internet, or if it does, it rarely finds anything relevant, which surprises me because Perplexity is very good at online searches.
Additionally, I’d like to ask how I can obtain the “sources” or “citations” used for the response. I have this variable defined in the API call, but it never returns anything:
return_citations: true
By the way, other variables I use:
temperature: 0.1
top_p: 0.5
presence_penalty: 1
search_recency_filter: month
The system prompt is the typical one for any “chat completion” endpoint. That’s not wrong, right? Should I be using a “search prompt” or a special format for system and user messages? I haven’t found much relevant information in the API documentation, which is why I’m writing here.
Thanks in advance for any help.