Tackle complex research questions with AI-guided iterative searching
The Agentic Search tool uses AI to guide multi-step vector searches, refining queries and filters iteratively until finding the most comprehensive and relevant results for complex questions.
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.
Complex Query: “What are the security implications of using JWT for authentication, and how should we implement proper token validation?”
Iteration 1: Exploring JWT Security
Query: “JWT authentication security implications”
Reasoning: Need to understand security risks before implementation details
Iteration 2: Token Validation Approaches
Query: “JWT token validation best practices”
Reasoning: Initial results showed common attacks, now need implementation guidance
Iteration 3: Implementation Examples
Query: “JWT validation implementation examples”
Reasoning: Need concrete code examples after understanding theoretical concepts
Comprehensive Answer
The search process revealed that JWT security implications include token hijacking, weak signature algorithms, and sensitive data exposure. Proper implementation requires validating the signature with a secure algorithm (at least HS256), checking expiration claims, validating issuer and audience claims, and implementing proper key rotation practices…
The Agentic Search tool is designed to work well with default settings for most use cases. Start with minimal configuration and only adjust parameters if you need to fine-tune the behavior for specific scenarios.
The seed_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.
The alpha parameter (0.0-1.0) balances vector search vs. keyword search weights:
More Keyword (0.1)Balanced (0.5)More Semantic (0.9)
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
If a reranker is enabled in the system configuration, the provided alpha value is ignored and a fixed value of 0.5 is used for pre-reranking result selection only.
Enable these options for exploratory research where creativity in query refinement is beneficial.
Dynamic parameter tuning options are disabled by default for maximum compatibility with model providers. Enable them only if your model supports these parameters.
curl --location 'http://localhost:8080/v1/responses' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer $OPENAI_API_KEY' \--header 'x-model-provider: openai' \--data '{ "model": "gpt-4o", "tools": [{ "type": "agentic_search", "vector_store_ids": ["vs_architecture_docs", "vs_engineering_blogs"], "max_num_results": 5, "max_iterations": 10, "seed_strategy": "hybrid", "alpha": 0.7, "initial_seed_multiplier": 3, "filters": { "type": "and", "filters": [ { "type": "eq", "key": "category", "value": "architecture" }, { "type": "eq", "key": "verified", "value": true } ] } }], "input": "What are the architectural tradeoffs between microservices and monoliths?", "instructions": "Provide a comprehensive analysis based on the retrieved information."}'
The agentic_search tool automatically performs multiple search iterations and provides the results to the AI model in the same request. This creates an advanced RAG experience where the model can access comprehensive research without additional API calls.
While the Agentic Search tool excels at complex queries, questions should still be specific and focused.
Good Example:
Copy
{ "query": "What are the best practices for implementing a CI/CD pipeline for a microservices architecture deployed on Kubernetes?"}
Less Effective:
Copy
{ "query": "Tell me about DevOps"}
Include relevant context in your query to help guide the search process.
Good Example:
Copy
{ "query": "We're experiencing memory leaks in our Node.js application running in production. What debugging approaches and tools should we consider?"}
Less Effective:
Copy
{ "query": "How to fix memory leaks?"}
For critical research queries, monitor the search iterations and adjust parameters if needed.
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 alpha for more semantic search weight
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.