prebuilt.perplexity.base.prompts¶

Prompt templates for the Perplexity multi-agent system.

This module contains all the prompt templates used by different agents in the Perplexity system. Each prompt follows a structured format with system context, task instructions, input/output formats, and examples.

Attributes¶

Functions¶

create_prompt_with_examples(...)

Helper function to create prompts with a consistent structure.

Module Contents¶

prebuilt.perplexity.base.prompts.create_prompt_with_examples(system_prompt: str, task_description: str, input_format: str, output_format: str, examples: list) langchain_core.prompts.ChatPromptTemplate¶

Helper function to create prompts with a consistent structure.

prebuilt.perplexity.base.prompts.CHAIN_OF_THOUGHT_PROMPT¶
prebuilt.perplexity.base.prompts.DOCUMENT_RELEVANCE_SCORING_PROMPT¶
prebuilt.perplexity.base.prompts.MULTI_STEP_PLANNING_PROMPT¶
prebuilt.perplexity.base.prompts.PROJECT_REQUIREMENTS_PROMPT¶
prebuilt.perplexity.base.prompts.PROMPT_REGISTRY¶
prebuilt.perplexity.base.prompts.QUALITY_ASSURANCE_PROMPT¶
prebuilt.perplexity.base.prompts.QUERY_ANALYSIS_PROMPT¶
prebuilt.perplexity.base.prompts.QUERY_ANALYSIS_SYSTEM_PROMPT = Multiline-String¶
Show Value
"""You are an expert Query Analysis Agent in the Perplexity AI system. Your role is to analyze user queries and determine:.
1. The type of query (simple factual, complex reasoning, research, etc.)
2. Complexity score and required capabilities
3. Whether real-time information is needed
4. Suggested search mode and execution strategy

You excel at understanding user intent and breaking down complex queries into actionable components."""
prebuilt.perplexity.base.prompts.RAG_GENERATION_PROMPT¶
prebuilt.perplexity.base.prompts.RAG_GENERATION_SYSTEM_PROMPT = Multiline-String¶
Show Value
"""You are an expert Answer Generation Agent in the Perplexity AI system. Your primary directive is to provide accurate, well-sourced responses based ONLY on retrieved information.

CRITICAL RULES:
1. NEVER make claims without retrieved evidence
2. ALWAYS cite sources using the exact format provided
3. If information is insufficient, clearly state what's missing
4. Maintain objectivity and present multiple perspectives when available
5. Use clear, concise language appropriate for the query complexity

Your responses should be informative, balanced, and rigorously grounded in the provided sources."""
prebuilt.perplexity.base.prompts.RESEARCH_STRATEGY_PROMPT¶
prebuilt.perplexity.base.prompts.RESEARCH_SYNTHESIS_PROMPT¶
prebuilt.perplexity.base.prompts.SEARCH_QUERY_GENERATION_PROMPT¶
prebuilt.perplexity.base.prompts.SOURCE_ANALYSIS_PROMPT¶
prebuilt.perplexity.base.prompts.TOOL_ORCHESTRATION_PROMPT¶