How alibaba-nlp/deepresearch works
Project Type and Purpose
• This is a research-framework project (“Tongyi DeepResearch”) for building, scaling, and benchmarking agentic LLMs specialized in long‐horizon, deep information‐seeking tasks.
• Key modules:
• Agent development & scaling (AgentFounder, AgentScaler)
• Multiple WebAgent prototypes (WebDancer, WebSailor, Webwalker, etc.)
• Inference & evaluation pipelines
• Synthetic data generation & on‐policy RL training
File‐Structure Analysis
• Top‐level directories:
• Agent/AgentFounder – bootstrap & design of new agents (data‐gen, initial RL setups)
• Agent/AgentScaler – scalable data synthesis and continued pre-training pipeline
• WebAgent/… – concrete agent implementations (WebDancer, WebSailor, etc.) each with assets, datasets, demos, scripts
• inference/ – scripts and tools for running trained agents at inference time (ReAct, multi-step planning, file/video tools)
• evaluation/ – benchmark scripts for measuring agent performance on standard datasets
• assets/, requirements.txt – shared resources and dependencies
• Patterns:
• Pipeline stages (founding → scaling → inference → evaluation)
• Tool‐oriented ReAct paradigm: agent core + external tool interfaces
• Modular agent prototypes under WebAgent/ for extensibility
README Insights
• Describes three major phases:
a) Synthetic data generation → supervised & RL fine-tuning (AgentFounder + AgentScaler)
b) Two inference paradigms (ReAct & Heavy mode) implemented under inference/
c) Benchmark evaluation under evaluation/
• Mentions external tools (search, python exec, file parser, video analysis)
a. Main Components
1) Synthetic Data Generation (AgentFounder)
2) Continual Pre-training & Scaling (AgentScaler)
3) Trained Model Artifact (Tongyi DeepResearch LLM)
4) Inference Engine (inference/react_agent.py + tool modules)
5) Evaluation Suite (evaluation/*.py)
6) WebAgent Prototype Suite (WebAgent/WebDancer, WebSailor, etc.)
b. Relationships & Interactions
• AgentFounder → produces initial agentic training data → feeds into AgentScaler
• AgentScaler → continual pre-training → outputs model checkpoints
• Inference Engine → loads model checkpoints, orchestrates ReAct loops, calls tool modules (search, file, python, video)
• WebAgent prototypes → use the same inference engine + custom prompts/tools for specialized experiments
• Evaluation Suite → consumes model outputs via inference scripts → computes metrics
c. Architectural Patterns & Principles
• Pipeline decomposition: clearly separated stages (data, pre-train, infer, eval)
• Modular “tool” interfaces for ReAct: each external capability wrapped in a Python module
• Extensibility: new agents drop in under WebAgent/, inheriting common inference and evaluation layers
d. Relevant Technologies
• Python 3.10, PyTorch (implied), HuggingFace transformers
• Shell scripts (run_react_infer.sh, deploy_model.sh)
• JSONL data format for datasets and benchmarks
• Custom RL framework (Group RPO)