Deep Research tutorial

Updated at:

Manually creating structured reports for complex topics, such as industry trend analyses or technical feasibility studies, by integrating information from multiple sources is time-consuming and tedious. Deep Research is an autonomous AI system powered by a large language model (LLM) designed to automate this process. When you submit a research topic, the system automatically performs task decomposition, conducts multi-step reasoning, retrieves and integrates information from various sources, and generates a professional-grade research report that is logically structured and fully cited.

How it works

Deep Research uses a multi-agent collaborative architecture that simulates the research process of an expert team. After receiving a user's query, the system initiates a "perceive-think-act-reflect" closed loop to collaboratively complete the task.

Collaboration workflow

  1. Planning: The PlannerAgent first conducts background research to understand the user's complex problem. It then decomposes the task into a research plan structured as a directed acyclic graph (DAG).

  2. Researching: Multiple ResearcherAgents execute the sub-tasks in the plan, either in parallel or in sequence. Each agent autonomously selects and calls tools, such as a search engine, crawler tool, or code interpreter, to collect and analyze information, generating preliminary sub-reports.

  3. Reporting: The ReporterAgent consolidates all sub-reports and research data. It then organizes, summarizes, and refines the information to generate a final, well-structured research report with citations.

Core components

Component type

Name

Description

Agents

PlannerAgent

Performs task decomposition and generates a research plan.

ResearcherAgent

Executes specific research steps, calls tools, and generates sub-reports.

MultimodalAgent

Processes and understands multimodal data, such as images and tables, to enrich report content.

ReporterAgent

Aggregates all information to generate the final report in Markdown or HTML format.

Tools

Search tool

Calls external search engines or internal knowledge bases to retrieve information.

Crawler tool

Accesses web links to retrieve full-text content.

Code interpreter

Analyzes data and generates charts.

Get started

Console quick start

  1. Go to the OpenSearch console, select the LLM-based Conversational Search Edition, click Instance Management in the left navigation bar, and then select the target instance and click Manage.

  2. Go to the instance details page, click Q&A Test, enable Deep Research, enter your question in the dialog box, and click Send.

    In the Model Selector, choose deepseek-r1 and enable the Web Search toggle.

  3. The system takes approximately 5 to 15 minutes to return the result and reasoning process. After the task is complete, you can click image to view the result in your History.

    Full result

    The full result page displays the technical documentation for the Qwen3-Reranker model, an open-source model from the Alibaba DAMO Academy Qwen team. It features multilingual support, long-text processing, and multi-size coverage. The content covers a model overview and its core purpose, technical architecture, and working principles (including input construction and output mechanisms). It also describes model specifications and performance characteristics (providing comparisons between Qwen3-Reranker-0.6B, Qwen3-Reranker-4B, and Qwen3-Reranker-8B), deployment and integration solutions (supporting vLLM, Ollama, and Transformers), API calls and service interfaces, LoRA fine-tuning and customization, and three typical application scenarios: RAG systems, search engines, and enterprise knowledge bases.

Code samples

The Deep Research feature is integrated into the MultiSearch API and the knowledge-search API. To use this feature, set the options.chat.enable_deep_research parameter to true. For usage details, see the API specification.

Initiate a task

Note

By default, the number of concurrent tasks for an LLM-based Conversational Search Edition instance is two per RAM user. To increase your concurrency, contact technical support.

Java

  • Add dependency

    <dependency>
            <groupId>com.aliyun.opensearch</groupId>
            <artifactId>aliyun-sdk-opensearch</artifactId>
            <version>6.0.0</version>
    </dependency>
  • Request sample

    package com.aliyun.opensearch;
    import com.aliyun.opensearch.OpenSearchClient;
    import com.aliyun.opensearch.sdk.generated.OpenSearch;
    import com.aliyun.opensearch.sdk.generated.commons.OpenSearchClientException;
    import com.aliyun.opensearch.sdk.generated.commons.OpenSearchException;
    import com.aliyun.opensearch.sdk.generated.commons.OpenSearchResult;
    import java.util.HashMap;
    import java.util.Map;
    public class LLMSearch {
        private static String accesskey = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID");
        private static String secret = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET");
        private static String appName = "your-app-name";
        private static String host = "your-api-endpoint";
        private static String path = "/apps/%s/actions/multi-search";
        public static void main(String[] args) {
            String appPath = String.format(path, appName);
            //ApiReadTimeOut
            OpenSearch openSearch = new OpenSearch(accesskey, secret, host);
            openSearch.setTimeout(90000);
            OpenSearchClient openSearchClient = new OpenSearchClient(openSearch);
            Map<String, String> params = new HashMap<String, String>() {{
                put("format", "full_json");
                put("_POST_BODY", "{\"question\":{\"text\":\"What are the recent epidemic trends in China (Hangzhou)?\",\"type\":\"TEXT\"},\"options\":{\"retrieve\":{\"entry\":{\"sf\":\"\",\"filter\":\"\"},\"image\":{\"sf\":\"\",\"dense_weight\":\"0.7\"},\"web_search\":{\"enable\":true},\"return_hits\":false,\"graph\":{\"enable\":true},\"doc\":{\"filter\":\"\",\"top_n\":5,\"sf\":\"\",\"dense_weight\":\"0.7\",\"formula\":\"\",\"operator\":\"AND\"},\"qp\":{\"query_extend\":false,\"query_extend_num\":5},\"rerank\":{\"enable\":true,\"model\":\"ops-bge-reranker-larger\"}},\"chat\":{\"stream\":true,\"enable_deep_research\":true,\"enable_deep_search\":false,\"model\":\"deepseek-v3\",\"agent\":{\"tools\":[],\"max_think_round\":10,\"think_process\":true,\"language\":\"CN\"},\"prompt_config\":{\"attitude\":\"normal\",\"rule\":\"detailed\",\"noanswer\":\"sorry\",\"language\":\"Chinese\",\"role\":false,\"role_name\":\"AI Assistant\",\"out_format\":\"text\"},\"csi_level\":\"strict\",\"output_format\":\"markdown\",\"history_max\":\"\",\"link\":\"true\",\"rich_text_strategy\":\"inside_response\",\"enable_llm_knowledge\":true,\"model_generation\":\"\"}}}");
            }};
            try {
                OpenSearchResult openSearchResult = openSearchClient
                        .callAndDecodeResult(appPath, params, "POST");
                System.out.println("RequestID=" + openSearchResult.getTraceInfo().getRequestId());
                System.out.println(openSearchResult.getResult());
            } catch (
                    OpenSearchException e) {
                System.out.println("RequestID=" + e.getRequestId());
                System.out.println("ErrorCode=" + e.getCode());
                System.out.println("ErrorMessage=" + e.getMessage());
            } catch (
                    OpenSearchClientException e) {
                System.out.println("ErrorMessage=" + e.getMessage());
            }
        }
    }

curl

Send a task request

curl --location '{host}/v3/openapi/apps/{app_group_identity}/actions/multi-search' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {API key}' \
--data '{
    "question": {
        "text": "What are the recent epidemic trends in China (Hangzhou)?", 
        "type": "TEXT"
    }, 
    "options": {
        "retrieve": {
            "entry": {"sf": "", "filter": ""}, 
            "image": {"sf": "", "dense_weight": "0.7"}, 
            "web_search": {"enable": true}, 
            "return_hits": false, 
            "graph": {"enable": true}, 
            "doc": {
                "filter": "", 
                "top_n": 5, 
                "sf": "", 
                "dense_weight": "0.7", 
                "formula": "", 
                "operator": "AND"
            }, 
            "qp": {"query_extend": false, "query_extend_num": 5}, 
            "rerank": {"enable": true, "model": "ops-bge-reranker-larger"}
        }, 
        "chat": {
            "stream": true, 
            "enable_deep_search": false, 
            "enable_deep_research": true, 
            "model": "deepseek-v3", 
            "agent": {
                "tools": [], 
                "max_think_round": 10, 
                "think_process": true, 
                "language": "CN"
            }, 
            "prompt_config": {
                "attitude": "normal", 
                "rule": "detailed", 
                "noanswer": "sorry", 
                "language": "Chinese", 
                "role": false, 
                "role_name": "AI Assistant", 
                "out_format": "text"
            }, 
            "csi_level": "strict", 
            "output_format": "markdown", 
            "history_max": "", 
            "link": "true", 
            "rich_text_strategy": "inside_response", 
            "enable_llm_knowledge": true, 
            "model_generation": ""
        }
    }
}'

Deep Research is a complex asynchronous task that typically takes 5 to 15 minutes to complete. Results are streamed, allowing you to observe each step of the execution. The following is a sample response:

Response sample

The full response is long. For brevity, the following example shows only a partial result.
{
    "request_id": "************91a2d794c88866a67a95", 
    "status": "OK", 
    "latency": 420179.550336, 
    "result": {
        "data": [
            {
                "answer": "This research task may take a significant amount of time. Deep Research supports background execution, so you can work on other tasks and check the results later.", 
                "type": "TEXT_MARKDOWN", 
                "rich_text_ref": [ ], 
                "event": "THINK", 
                "event_status": "FINISHED", 
                "details": [ ], 
                "node_id": "agent-node-120142831-cdf95c6587946383951702e98bcc0d87-1", 
                "latency": 0
            }, 
            {
                "answer": "# Collect latest monitoring data on respiratory infectious diseases in China (Hangzhou) for 2025, including influenza, RSV, and adenovirus
## Problem Statement
This task aims to collect the latest monitoring data for respiratory infectious diseases such as influenza, respiratory syncytial virus (RSV), and adenovirus in China (Hangzhou) from September to October 2025. Specific requirements include: the reported percentage of influenza-like illness (ILI), the composition ratio of influenza virus subtypes, the trend in detection rates for RSV and adenovirus, sentinel hospital outpatient and emergency monitoring data to assess epidemic intensity and transmission speed and identify major affected populations, and the latest health alerts or epidemic notifications issued by the China (Hangzhou) Center for Disease Control and Prevention.
## Research Findings
### Influenza-Like Illness (ILI) Reporting Rate and Epidemic Intensity
According to the \"National Sentinel Surveillance of Acute Respiratory Infections (Week 39, 2025)\" released by the Chinese Center for Disease Control and Prevention, from September 22 to September 28, 2025, the percentage of influenza-like illness cases among all outpatient and emergency visits (ILI%) reported by national sentinel hospitals was 3.4%, an increase of 0.5 percentage points from the previous week. This indicates a slight increase in influenza activity during this period, remaining at a low epidemic level [1][2].
### Influenza Virus Subtype Composition
Regarding influenza virus subtyping, monitoring data shows that among influenza-positive samples, the influenza A(H1N1) subtype is predominant. Antigenic analysis of virus strains collected by the National Influenza Center from March 31 to October 5, 2025, showed that 98.4% of the A(H1N1)pdm09 subtype influenza virus strains were A/Victoria/4897/2022-like strains [3]. This indicates that influenza A(H1N1) is the main circulating strain.
### Detection Rates of Respiratory Syncytial Virus (RSV) and Adenovirus
Among non-influenza respiratory pathogens, the detection rates for RSV and adenovirus are as follows:
- **Respiratory Syncytial Virus (RSV)**: In week 39, the nucleic acid detection positivity rate for RSV in respiratory samples from ILI cases in outpatient and emergency departments nationwide was 4.5%, an increase of 0.4 percentage points from the previous week. The surveillance report noted a significant increase in RSV detection positivity in southern provinces, with the rate being notably higher in the 0-4 age group compared to other age groups, indicating that young children are the primary risk group for RSV infection [1][2].
- **Adenovirus**: In week 39, the nucleic acid detection positivity rate for adenovirus in respiratory samples from ILI cases in outpatient and emergency departments nationwide was 2.2%, an increase of 0.4 percentage points from the previous week [1].
## Conclusion
In late September 2025, respiratory infectious disease activity in the southern region, where China (Hangzhou) is located, showed an upward trend. The ILI percentage was 3.4%, with influenza A(H1N1) as the predominant subtype. The detection rates for both RSV and adenovirus have increased, with RSV being most prevalent among children aged 0-4, making it a key pathogen of concern. Although no specific notifications from the China (Hangzhou) CDC were found, based on national surveillance data, the current epidemic intensity is low but rising, with an accelerating transmission speed, primarily threatening the health of young children. It is recommended that the public follow standard respiratory disease prevention and control measures and enhance personal protection.
## References
- [1] [National Sentinel Surveillance of Acute Respiratory Infections (Week 39, 2025)](https://www.chinacdc.cn/jksj/jksj04_14275/202510/t20251002_312839.html)
- [2] [Young Children Are Susceptible! Detection Rate of Respiratory Syncytial Virus Is on the Rise](http://www.jksb.com.cn/index.php?a=show&catid=788&id=246573&m=content)
- [3] [Chinese Center for Disease Control and Prevention](https://www.chinacdc.cn/jksj/jksj04_14249/)", 
                "type": "TEXT_MARKDOWN", 
                "rich_text_ref": [ ], 
                "event": "ANSWER", 
                "event_status": "FINISHED", 
                "details": [ ], 
                "node_id": "agent-node-120142831-cdf95c6587946383951702e98bcc0d87-40", 
                "latency": 27, 
                "step": 4
            }, 
            {
                "answer": "# Obtain recent fever clinic and pediatric visit data and virus test results from major medical institutions in China (Hangzhou)
## Problem Statement
This task aims to investigate the trend in patient volume at fever clinics and pediatric outpatient departments in major medical institutions in China (Hangzhou), such as the Children's Hospital of Zhejiang University School of Medicine, Sir Run Run Shaw Hospital, and The First Affiliated Hospital, Zhejiang University School of Medicine, in October 2025. It also aims to collect the nucleic acid test positivity rates for pathogens like influenza, mycoplasma, and RSV as published by these hospitals, and to understand the proportion of pneumonia cases among hospitalized patients due to respiratory infections and the utilization of medical resources. This will provide a comprehensive assessment of the actual epidemic intensity and clinical impact of respiratory infectious diseases in China (Hangzhou).
## Research Findings
...
## Conclusion
In October 2025, major medical institutions in China (Hangzhou) saw a significant increase in visits to fever clinics and pediatric outpatient departments, indicating that respiratory infectious diseases have entered a high-incidence season. The volume of fever clinic visits at the Children's Hospital of Zhejiang University School of Medicine and Sir Run Run Shaw Hospital reached several times their normal levels, putting the healthcare system under pressure. Pathogen test results show that influenza A, Mycoplasma pneumoniae, and RSV are the main causative agents, with co-infections complicating the severity of illnesses. Clinical data indicate that infectious pneumonia is the leading cause of hospitalization for children, accounting for over 80% of inpatients in the respiratory department of the Children's Hospital. Despite strained medical resources, hospitals have managed to maintain normal medical services by increasing staff, optimizing workflows, and utilizing smart healthcare technologies. Overall, the current epidemic intensity of respiratory infectious diseases in China (Hangzhou) is high, posing a significant impact on medical resources and a major threat to the health of children.
## References
- [1] [Fever clinic volumes surge in children's hospitals across multiple regions, experts warn against cross-infection](https://www.toutiao.com/article/7166157423353840158/)
- [2] [Over 20 students in one class have a fever, the entire class is suspended! Adults are also affected!](https://m.thepaper.cn/newsDetail_forward_25513286)", 
                "type": "TEXT_MARKDOWN", 
                "rich_text_ref": [ ], 
                "event": "ANSWER", 
                "event_status": "FINISHED", 
                "details": [ ], 
                "node_id": "agent-node-120142831-cdf95c6587946383951702e98bcc0d87-134", 
                "latency": 27, 
                "step": 2
            }, 
            {
                "answer": "# Comprehensive Analysis of Epidemic Trends and Public Health Response in China (Hangzhou)
## 1. Current Epidemic Status and Core Data
### 1.1 Overall Trend of Respiratory Infectious Diseases
In recent years, respiratory infectious diseases in China (Hangzhou) have shown a pattern of alternating or overlapping epidemics of multiple pathogens, especially during the winter and spring seasons. Various pathogens, including influenza, COVID-19, respiratory syncytial virus (RSV), Mycoplasma pneumoniae, and adenovirus, collectively pose a public health challenge. According to monitoring data, the intensity of respiratory disease epidemics is significantly influenced by factors such as temperature changes, population gatherings (such as school reopenings and holidays), and viral mutations [3]. In November 2024, Zhejiang Province reported 8,155 cases of influenza among Class C infectious diseases, making it the most reported infectious disease of the month [9]. Experts point out that the current respiratory illnesses are predominantly influenza, with co-infections of rhinovirus, Mycoplasma pneumoniae, RSV, and adenovirus, which may increase the severity of the illness [23].
The China (Hangzhou) CDC has repeatedly warned that multiple respiratory infectious diseases may alternate or overlap in the coming winter and spring. Although the overall scale of the epidemic may fluctuate compared to previous years, the high transmissibility and easy mutation of viruses make the control situation challenging [3]. Outbreaks are particularly likely in crowded places such as schools, childcare centers, and nursing homes. Furthermore, the primary mode of transmission for respiratory infectious diseases is through droplets, followed by direct or indirect contact with mucous membranes of the mouth, nose, and eyes. Contact with virus-contaminated objects can also cause transmission [19]. Therefore, strengthening personal protection, maintaining environmental hygiene, and timely vaccination are key to prevention and control.
......
## References
[1] [Hangzhou reports on latest epidemic dynamics, trend analysis, and source tracing](http://nb.ifeng.com/c/8DAKWxCBlnG)", 
                "type": "TEXT_MARKDOWN", 
                "event": "SUMMARY", 
                "event_status": "PROCESSING", 
                "details": [ ], 
                "node_id": "agent-node-120142831-cdf95c6587946383951702e98bcc0d87-239", 
                "latency": 0
            }
        ], 
        "latency": 419
    }
}

Response parameters:

Parameter

Type

Description

request_id

String

The unique request ID, used for issue tracking.

status

String

The execution status. Valid values:

  • OK: The request was successful.

  • FAIL: The request failed.

latency

Float

The total latency of the API call (ms).

result.process_status

String

The processing status. Valid values:

  • SUCCESS: The task was processed successfully.

  • FAILED: The task failed.

result.latency

Integer

The time taken to generate the result (ms).

result.data[]

Array[Object]

An array of core data nodes.

result.data[].answer

String

The content returned by the node (Markdown format).

result.data[].type

String

The content type. Valid values:

  • TEXT_MARKDOWN: Markdown text.

  • HTML: HTML content.

result.data[].event

String

The node event type. Valid values:

  • BACKGROUND: Background analysis.

  • THINK: Thinking process.

  • PLAN: Execution plan.

  • ACTION: Search action.

  • ANSWER: Final answer.

  • SUMMARY: Summary report.

  • STEP: Execution step.

  • STEP_TITLE: Step title.

  • STEP_DESC: Step description.

  • CRAWL: A crawl.

  • SEARCH: A search.

  • END: End of the task.

result.data[].event_status

String

The event status. Valid values:

  • FINISHED: The event is complete.

  • PROCESSING: The event is in progress.

result.data[].parent_id

String

The ID of the parent node (UUID format).

result.data[].node_id

String

The ID of the current node (agent node identifier).

result.data[].latency

Integer

The processing time of the node (ms).

result.data[].step

Integer

The step number.

result.data[].reference[]

Array[Object]

An array of reference source information.

result.data[].reference[].score

Float

The relevance score of the source (0.0 to 1.0).

result.data[].reference[].title

String

The title of the source (max length: 120 characters).

result.data[].reference[].url

String

The link to the source (must be a valid URL).

result.data[].details[]

Array[Object]

An array of child node details (same structure as data[]).

result.data[].details[].answer

String

The content of the child node.

result.data[].details[].type

String

The content type of the child node.

result.data[].details[].event

String

The event type of the child node.

result.data[].details[].event_status

String

The event status of the child node.

result.data[].details[].parent_id

String

The parent ID of the child node.

result.data[].details[].node_id

String

The ID of the child node.

result.data[].details[].latency

Integer

The processing time of the child node.

result.data[].details[].step

Integer

The sub-step number.

result.data[].details[].reference[]

Array[Object]

The reference sources for the child node.

result.data[].details[].reference[].score

Float

The relevance score of the child source.

result.data[].details[].reference[].title

String

The title of the child source.

result.data[].details[].reference[].url

String

The link to the child source.

Retrieving historical task results

After a successful call, you can use the task ID to view the results of previous tasks.

  1. Call the chat history list API to retrieve the chat history.

    curl -X GET "{host}/v3/openapi/apps/{app_group_identity}/chat-history?page_number=1&page_size=10" \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer {API key}"
    (base) hxxx ~ % curl -X GET "http://xxx-hangzhou.aliyuncs.com/v3/openapi/apps/xxx/chat-history?page_number=1&page_size=10" \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer xxx"
    {"request_id":"fxxx3f","status":"OK","total_count":7,"latency":0.0,"result":[{"chat_id":"d6883afb-7xxx","title":"What are the recent epidemic trends in China (Hangzhou)?","time":"2025-10-16 15:19:11","status":"SUCCESS","type":"DEEP_RESEARCH"},{"chat_id":"79xxxc9971c3343cfb","title":"What is the weather forecast for China (Hangzhou) for the next few days?","time":"2025-10-16 12:03:38","status":"SUCCESS","type":"DEEP_RESEARCH"},{"chat_id":"xxx-af43-f82794aed581","title":"What is the weather forecast for China (Hangzhou) for the next few days?","time":"2025-10-16 11:10:53","status":"SUCCESS","type":"DEEP_RESEARCH"},{"chat_id":"364xxx-bdff4f3c3276","title":"What is the weather forecast for China (Hangzhou) for the next few days?","time":"2025-10-16 10:40:54","status":"SUCCESS","type":"DEEP_RESEARCH"},{"chat_id":"7xxx","title":"What is the weather forecast for China (Hangzhou) for the next few days?","time":"2025-10-16 10:30:55","status":"SUCCESS","type":"DEEP_RESEARCH"},{"chat_id":"0xxxf889181485e","title":"What is the weather forecast for China (Hangzhou) for the next few days?","time":"2025-10-16 09:56:26","status":"SUCCESS","type":"DEEP_RESEARCH"},{"chat_id":"12xxx067e0dd","title":"What is the weather forecast for China (Hangzhou) for the next few days?","time":"2025-10-15 19:38:42","status":"SUCCESS","type":"DEEP_SEARCH"}],"errors":[]}%
  2. Obtain the chat_id from the response and call the following API to get the chat details:

    curl -X POST "http://{host}/v3/openapi/apps/{app_group_identity}/agent-tasks/{chat_id}" \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer {API key}" \
      -d '{"stream": true}'

Canceling a task

If a task's output does not meet your expectations, you can cancel it by calling the following API.

Request URL:

DELETE /v3/openapi/apps/{app_group_identity}/agent-tasks/{task_id}