AutoRAG Deep Search
LLM-orchestrated multi-step research for complex queries requiring thorough analysis
Overview
Deep Search uses an LLM planner to break complex queries into multiple steps and execute them sequentially, building on results from earlier steps. It is designed for highly detailed, accurate responses where short latency is not the primary concern.
There are two Deep Search modes depending on the query type:
- Standard Deep Search (
query_type: 2+use_llm_planner: true): Uses the built-in Local Search retriever. - Custom Deep Search (
query_type: 4+use_llm_planner: true): Uses Custom Retriever tools, with automatic tool selection.
You can also send "mode": "DEEP_SEARCH" instead of
setting query_type and use_llm_planner. The service then uses Custom
Retriever tools when they are available, and Local Search otherwise.

Standard Deep Search
Standard Deep Search uses Local Search as the underlying retriever.
Configuration
{
"query_type": 2,
"use_llm_planner": true
}
use_llm_planner is not specified for LOCAL queries, it defaults to
true (Deep Search mode).Custom Deep Search
Custom Deep Search uses Custom Retriever tools. Instead of specifying which tools to run, the LLM automatically plans and executes the search across multiple steps.
Configuration
{
"query_type": 4,
"use_llm_planner": true
}
You can optionally provide custom_tools to limit which tools are available.
If omitted, all tools are auto-loaded from the Tools collection.
How Deep Search works
Both modes follow the same pipeline:
Get global context: Fetches global context to understand what data is available. If global context is empty, skips to direct tool matching.
Create execution plan and match best tool: The LLM reads the global context and the query, then creates a multi-step plan by breaking the query into sub-questions. It then selects the best tool in two passes:
- Pass 1: LLM picks the best
custom_retrievertool from available tools based on tool descriptions. - Pass 2: If no
custom_retrievertool matches, LLM picks from service-retriever tools (local,global,unified). - If
custom_toolsis not provided, the system auto-loads all supported tool types from theToolscollection.
The selected tool is used for all steps in the plan.
- Pass 1: LLM picks the best
Execute each step: Each step runs sequentially using the matched tool. Results from earlier steps feed into later steps. If the query is fully answered at any step, execution stops early.
Synthesize final answer: All step results are combined and sent to the LLM to produce a final answer.
Writing good tool descriptions
For Deep Search tool selection, the LLM reads each tool’s description and
picks the best match. Description quality directly affects which tool is chosen.
Use this pattern:
- What this tool searches
- Best question type
- When to use this tool
Example descriptions:
localtool: “Use this for customer/account-level investigations in our support and CRM data (ticket timelines, owner changes, SLA breaches). Best for ‘why did this specific case fail’ questions.”globaltool: “Use this for org-level trend summaries across quarterly reports, KPI dashboards, and region performance docs. Best for leadership questions about overall patterns.”unifiedtool: “Use this for end-to-end analysis that combines business summary and concrete evidence from policy docs, tickets, and metrics tables in one response.”
Best use cases
- Complex multi-part questions that require multiple search steps.
- Queries where the right tool is not known upfront.
- When you want the LLM to plan the search strategy automatically.
- Aggregation of highly technical details across the knowledge graph.
Next Steps
- Custom Retriever: Create custom tools for Deep Search to use.
- Custom Prompts: Customize the planning and synthesis prompts.
- Execute queries: Learn how to call the search endpoints.
