What It Is
Unlike the simpler File Search tool, the Agentic Search tool employs AI to break down complex questions, perform multiple search iterations, and intelligently refine queries until it finds the most relevant and complete information. It excels at research-oriented tasks requiring deep exploration. NOTE for better results, we recommend using top models from https://huggingface.co/spaces/lmarena-ai/chatbot-arena-leaderboardHow Agentic Search Works
Configuration
Basic configuration requires a query parameter and vector store IDs:Configuration Parameters
| Parameter | Description | Default | Recommended Range |
|---|---|---|---|
vector_store_ids | List of vector store IDs to search | Required | N/A |
max_num_results | Maximum number of final results to return | 5 | 3-10 |
max_iterations | Maximum number of search iterations | 10 | 5-15 |
seed_strategy | Strategy for initial seed queries | ”hybrid" | "topk”, “hybrid” |
alpha | Balance between vector and keyword search weights | 0.5 | 0.1-0.9 |
initial_seed_multiplier | Multiplier for initial seed generation | 3 | 2-5 |
enable_presence_penalty_tuning | Enable dynamic tuning of presence penalty | false | true/false |
enable_frequency_penalty_tuning | Enable dynamic tuning of frequency penalty | false | true/false |
enable_temperature_tuning | Enable dynamic tuning of temperature | false | true/false |
enable_top_p_tuning | Enable dynamic tuning of top p | false | true/false |
filters | Optional filters to narrow search results | null | Depends on use case |
Response Format
The Agentic Search tool returns a comprehensive response including:When to Use It
The Agentic Search tool is designed for complex research scenarios requiring deep exploration across multiple documents.| Recommended For | Consider Alternatives For |
|---|---|
|
|
Use Cases for Agentic Search
Example Queries
Multi-faceted Research
Comparative Analysis
Technical Strategy
Complex Problem-Solving
Advanced Tuning
Seed Strategy Options
Theseed_strategy parameter determines how initial search queries are generated:
“hybrid” (default)
Combines vector and keyword search approaches for balanced results. Best for general-purpose searching across diverse document collections.
”topk”
Uses top-K retrieval, focusing on the most similar documents by vector similarity. Better for specialized document collections with consistent terminology.
Alpha Parameter Tuning
Thealpha parameter (0.0-1.0) balances vector search vs. keyword search weights:
- Higher values (0.7-0.9): More weight to vector semantic search, better for conceptual questions
- Middle values (0.4-0.6): Balanced approach, good for most questions
- Lower values (0.1-0.3): More weight to keyword search, better for specific technical terms
Initial Seed Multiplier
This parameter controls how many initial search seeds are generated:Dynamic Parameter Tuning
The following parameters enable dynamic adjustment of the underlying model’s parameters based on search results:Enable Presence/Frequency Penalty Tuning
Enable Presence/Frequency Penalty Tuning
- enable_presence_penalty_tuning: Dynamically adjusts presence penalty
- enable_frequency_penalty_tuning: Dynamically adjusts frequency penalty
Enable Temperature/Top-P Tuning
Enable Temperature/Top-P Tuning
- enable_temperature_tuning: Dynamically adjusts temperature
- enable_top_p_tuning: Dynamically adjusts top-p sampling
Integration Examples
Tool Usage with OpenAI Models
GitHub Example Implementation
For a complete working example of the Agentic Search tool, check out this Python example on GitHub. This example demonstrates:- Setting up the RAG system with sample documents
- Creating and configuring the AgenticSearchTool
- Performing searches with different strategies and parameters
- Comparing results from different search approaches
- Integration with the OpenAI Agents SDK
Configuring Research Depth
For research tasks requiring different levels of depth, you can adjust the configuration:Best Practices
Ask Specific Queries
Ask Specific Queries
Provide Context When Relevant
Provide Context When Relevant
Monitor and Adjust Iterations
Monitor and Adjust Iterations
- If iterations seem unfocused, consider reducing
initial_seed_multiplier - If iterations aren’t exploring enough aspects, try increasing
max_iterations - If results are too literal, increase
alphafor more semantic search weight
Related Tools
Think Tool
File Search Tool
When to Choose Agentic Search vs. File Search
The Agentic Search tool shines for complex, multi-faceted queries requiring deep exploration, while File Search is better for direct, factual queries when you know exactly what you’re looking for.
- Use Agentic Search when: You need comprehensive research on complex topics, comparative analysis, or multi-step problem solving.
- Use File Search when: You need quick answers to specific questions, looking up known information, or when resource constraints are a concern.