Prompt the agent - Perplexity
Summary
Perplexity's agent API distinguishes between two prompt surfaces: "instructions" and "input", which are critical for controlling agent behavior and grounding responses. "Instructions" define persistent rules such as the agent's role, tone, and formatting requirements, applying consistently across all turns. Conversely, "input" specifies the immediate question or task for a given turn, directly influencing tool selection and the specificity of retrieval when tools like "web_search" are enabled. Effective grounding, ensuring the agent answers from retrieved evidence, relies on crafting highly specific "input" queries and enabling appropriate retrieval tools. For strict constraints like allowed domains or date ranges, using request parameters within tool configurations is preferred over prose instructions, as parameters are directly enforced. Retrieved evidence is provided in the response "output" for citation and verification.
Key takeaway
For AI Engineers designing agents that require precise control and factual grounding, carefully distinguish between "instructions" and "input". Use "instructions" for immutable rules like agent persona and output format, and "input" for specific, turn-based queries that drive targeted retrieval. Prioritize request parameters for hard constraints like search domains or date ranges, as these are enforced directly, ensuring more reliable agent behavior and reducing hallucination risks. This structured approach enhances agent accuracy and performance.
Key insights
Distinguish agent "instructions" (persistent rules) from "input" (turn-specific task) for precise control and grounded retrieval.
Principles
- "instructions" establish persistent agent rules.
- "input" drives tool selection and retrieval.
- Parameters enforce constraints better than prose.
Method
Ground agent responses by using specific "input" queries, enabling retrieval tools like "web_search", and applying hard constraints via request parameters for enforcement.
In practice
- Set agent role and tone in "instructions".
- Specify entities and time ranges in "input".
- Apply "web_search" filters for domain control.
Topics
- Perplexity Agent API
- Prompt Engineering
- Agent Grounding
- Retrieval-Augmented Generation
- Web Search Tools
- Prompt Parameters
Best for: AI Engineer, Prompt Engineer, Software Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by perplexity.ai via Google News.