Deep Researcher
gllm-generation | Involves LM | Tutorial: Deep Researcher | API Reference | Cookbook
Prerequisites
This example specifically requires completion of all setup steps listed on the Prerequisites page.
You should be familiar with these concepts:
What’s a Deep Researcher?
A Deep Researcher is a specialized component that performs structured, multi-step research within a Retrieval-Augmented Generation (RAG) pipeline. Instead of issuing a single retrieval query, it is designed to plan, execute, and refine research steps to produce a coherent, high-quality result.
Deep Researchers can search across multiple sources, reason over intermediate findings, and iteratively adjust their approach as new information is discovered. This makes them well-suited for tasks that require depth, comparison, or synthesis—where a single-pass retrieval would be insufficient.
By encapsulating research logic into a dedicated component, Deep Researchers enable RAG pipelines to move beyond basic retrieval and toward goal-driven, reasoning-aware research workflows.
These tutorials focus on using the Deep Researcher as a component within an RAG pipeline. If you’re interested in a centralized, end-to-end Deep Research service, see the GL DeepResearch GitBook for a deeper dive.
Available Subclasses
The Deep Researcher module provides the following built-in implementations:
GoogleDeepResearcherOpenAIDeepResearcherParallelDeepResearcherPerplexityDeepResearcherGLOpenDeepResearcher
In this tutorial, we'll learn how to use the deep researcher module in just a few lines of code. You can find more details about these deep researchers in the API reference page.
Installation
Quickstart
Let’s jump into a basic example of using the deep researcher. In this example, we'll use an event emitter with a print event handler, which allows us to see the deep research progress in real time.
Each example uses the same research() interface while swapping out the underlying deep research provider. This allows different providers to be used interchangeably, without changing the calling logic that invokes the Component.
Each example follows the same flow:
define a research query;
invoke deep research using the same
research()call;receive streamed progress and final results via an event emitter.
Below are minimal examples that perform deep research using the GL SDK:
Expected Output
That’s it! You've just successfully used the deep researcher module! Next, let's take a look into some additional capabilities of the deep researcher components!
Custom Prompt
We can customize the deep researcher prompts by supplying a custom PromptBuilder object. This is useful for adding custom instructions or simply adjusting the tone of the deep research results.
Please note that although we're only using the OpenAIDeepResearcher in the example above, the same approach applies to any other deep researcher subclass.
MCP Integration
By default, deep researcher components have the capability to access the internet perform web search operations. This enables them to retrieve and utilize latest public information in the deep research process.
However, sometimes we also need to use non-public services as a source of knowledge. We can provide additional data sources to deep research by supplying MCP tools at invocation time.
MCP integration allows deep research to access private or non-public data (such as enterprise systems or personal data sources) during execution. It does not change how deep research performs research or reasoning internally.
MCP integration supports two types of connections:
MCP server: An MCP server connected via a URL. Currently supported by
ParallelDeepResearcherandOpenAIDeepResearcher.MCP connector: An MCP connector that connects a certain service through a connector ID with authentication. Currently supported by
OpenAIDeepResearcher.
Data Store Integration
Another way to connect to a non-public source of knowledge is by integrating a data store to our deep researcher component. This allows the deep researcher to access files stored in certain provider-managed file stores services. To learn more about these data stores, please refer to the LM invoker data store management page.
Currently, data store integration is only available in GoogleDeepResearcher.
Last updated
Was this helpful?