Hybrid Deep Researcher Pipeline

Overview

This guide demonstrates how to leverage multiple deep research systems in parallel within a pipeline.md to obtain comprehensive research results from different sources. By running OpenAIDeepResearcher and GLOpenDeepResearcher simultaneously, you can combine their unique strengths and produce a more thorough analysis.

The Pipeline orchestrates when and under what conditions parallel deep research is invoked, executes both researchers concurrently, and synthesizes their outputs into a unified response.

See complete code in GitHub

chevron-rightPrerequisiteshashtag

This example specifically requires:

  1. Completion of all setup steps listed on the Prerequisites page.

You should be familiar with these:

  1. Event emitting: Event Emitter

Installation

# you can use a Conda environment
pip install --extra-index-url "https://oauth2accesstoken:$(gcloud auth print-access-token)@glsdk.gdplabs.id/gen-ai-internal/simple/" python-dotenv gllm-core gllm-generation gllm-inference gllm-pipeline gl-odr-sdk

Project Setup

1

Clone the repository

git clone https://github.com/gl-sdk/gen-ai-sdk-cookbook.git
cd gen-ai-sdk-cookbook/deep-research
2

Set UV authentication and install dependencies

Unix-based systems (Linux, macOS):

./setup.sh

For Windows:

setup.bat
3

Prepare .env file

OPENAI_API_KEY="..."
GLODR_API_KEY="..."

Implementation

In this example, we use parallel execution to run two different deep research systems simultaneously. The Pipeline handles routing logic, executes both researchers in parallel when deep research is needed, and then combines their results using a ResponseSynthesizer.

Run the script

How it works:

  1. Router Step: The Pipeline evaluates the user query and determines whether it requires deep research or a simple response.

  2. Parallel Deep Research: If deep research is needed, the Pipeline executes both OpenAI Deep Researcher and GL Open Deep Researcher simultaneously (not sequentially).

  3. Reporter: Once both researchers complete, a ResponseSynthesizer combines their outputs into a unified, comprehensive answer.

  4. Normal Response: For casual queries, the Pipeline routes to a simple response synthesizer.

circle-info

Parallel Execution Benefits:

  • Faster Results: Both researchers run simultaneously, reducing total execution time

  • Diverse Perspectives: Combines different research approaches and data sources

  • Comprehensive Coverage: Leverages the unique strengths of each research system

Pipeline Architecture

That's it! You've successfully implemented hybrid deep research with parallel execution!

Next Steps

  1. Explore different research profilesarrow-up-right for GLOpenDeepResearcher

  2. Integrate with RAG pipelines by following Your First RAG Pipeline

  3. Explore the API referencearrow-up-right for advanced features

Last updated

Was this helpful?