Prompting Perplexity
Define the research question, retrieval scope and evidence needed for a cited answer.
Model selection
| Model or service | Use case | Model ID or access |
|---|---|---|
| Agent API | Search and synthesized answers | POST /v1/agent |
| Search API | Ranked search results | See Search API docs |
| Provider model | Model-backed reasoning with tools | Select from API catalog |
Which model to choose
Decide whether the application needs source results or an answer synthesized from them. For synthesis, select an Agent API model and the tools required for retrieval.
Using the chat or local app
Write the topic, entities, dates and geography. Ask for a citation next to every material claim, and ask the system to identify unavailable or conflicting evidence.
Using the API
The Agent API accepts instructions for durable behavior and input for the actual query. With an effort preset, custom instructions replaces its system prompt instead of appending to it. Set domain or date filters and max_steps as request parameters; prompt wording alone does not enforce retrieval boundaries.
POST https://api.perplexity.ai/v1/agent
{
"model": "YOUR_SUPPORTED_PROVIDER_MODEL",
"input": "Compare {{products}} as of {{date}}. Prefer official sources.",
"tools": [
{
"type": "web_search"
},
{
"type": "fetch_url"
}
]
}Prompting advice
- Check publication dates as well as the event dates in the answer.
- Inspect the underlying source when a claim determines your decision.
Example prompt template
Compare {{products}} for {{use case}} as of {{date}} in {{region}}. Prefer official specifications. Put a source beside each fact, identify missing fields and explain which missing fact could change the recommendation.