landmark-magnifying-glassDeep Researcher

gllm-generationarrow-up-right | Involves LM | Tutorial: Deep Researcher | API Referencearrow-up-right | Cookbookarrow-up-right

chevron-rightPrerequisiteshashtag

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.

circle-info

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 GitBookarrow-up-right for a deeper dive.

Available Subclasses

The Deep Researcher module provides the following built-in implementations:

  1. GoogleDeepResearcher

  2. OpenAIDeepResearcher

  3. ParallelDeepResearcher

  4. PerplexityDeepResearcher

  5. [Coming Soon] GLDeepResearcher

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 pagearrow-up-right.

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. Please feel free to choose any of these deep researcher subclass:

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. To enable this, some deep researchers support integrations with MCP servers and MCP connectors to be used as additional source of information.

circle-exclamation

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.

circle-exclamation

Last updated

Was this helpful?