Skip to main content
Back to Prompt Library
implementation

Agent Orchestration for Fan-out Search and Data Processing

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Perplexity-Powered Growth Intelligence Agent with OpenAI Agents SDK

Format
Code-aware
Lines
6
Sections
1
Linked challenge
Perplexity-Powered Growth Intelligence Agent with OpenAI Agents SDK

Prompt source

Original prompt text with formatting preserved for inspection.

6 lines
1 sections
No variables
5 checklist items
Design your OpenAI Agent's core logic to perform multi-step reasoning. Given an initial high-level business goal (e.g., 'Identify growth opportunities for a B2B SaaS in the HR tech space'), the agent should:
1.  **Break down the goal** into several sub-queries (e.g., 'top HR tech competitors', 'HR tech market trends 2024', 'pain points for HR managers in SMEs').
2.  **Execute fan-out `perplexity_search` calls** concurrently or sequentially.
3.  **Process raw search results**: Implement Python code (either as an internal agent function or another tool) to filter irrelevant information, deduplicate similar findings, and extract key insights. The agent must synthesize information from multiple search results.
4.  **Identify and score potential growth opportunities**: Define a scoring mechanism based on relevance, feasibility, and potential impact. This logic should be implemented and managed by the agent itself.
5.  **Maintain state**: Ensure the agent effectively aggregates information across multiple turns and tool calls.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.