# zjunlp/datamind architecture

> Architecture diagram of the GitHub repository zjunlp/datamind, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zjunlp/datamind
- Repository: https://github.com/zjunlp/datamind

## Overview

DataMind is a research portfolio rather than one application: its projects develop data-analysis agents, training methods, evaluation benchmarks, and reusable skills. The most concrete end-to-end workflow in the evidence is DataCOPE’s verifier-guided skill discovery and refinement: a pipeline coordinates benchmark runs and skill refinement, then exports a resulting skill. The README also documents separate work on agent scaling, process rewards, empirical diagnosis, and long-horizon evaluation. Several subsystems are represented by their documented project directories because their implementation was not sampled.

Main entry points: [`datacope/report_task/DataCOPE_DDR/pipeline/pipeline.py`](https://github.com/zjunlp/datamind/blob/main/datacope/report_task/DataCOPE_DDR/pipeline/pipeline.py) (Skill refinement), [`datamind`](https://github.com/zjunlp/datamind/tree/main/datamind) (Generalist agents), [`dataprm/evaluate`](https://github.com/zjunlp/datamind/tree/main/dataprm/evaluate) (Process reward), [`datacope/report_task/DDR_Bench`](https://github.com/zjunlp/datamind/tree/main/datacope/report_task/DDR_Bench) (DDR benchmark)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cope["DataCOPE skills"]
  node_cope_pipeline["Skill refinement<br/>[pipeline.py]"]
  node_cope_general["Skill framework"]
  node_cope_synthesis["Task synthesis"]
  node_cope_bench["DDR benchmark"]
  node_skill_result["Reusable skills<br/>[skill_manager.py]"]
end

subgraph group_agents["Agent development"]
  node_diagnosis["Empirical diagnosis"]
  node_generalist["Generalist agents"]
  node_report_agent["Report agent<br/>[data_agent.py]"]
end

subgraph group_evaluation["Evaluation and rewards"]
  node_longds["LongDS benchmark"]
  node_dsgym_eval["Agent evaluation"]
  node_process_reward["Process reward"]
  node_reward_tools["Reward tools<br/>[query_document.py]"]
end

subgraph group_training["Training systems"]
  node_sft["Supervised tuning<br/>[hf_engine.py]"]
  node_rl["RL training<br/>[fsdp_workers.py]"]
  node_swift_inference["Model inference<br/>[vllm_engine.py]"]
end

node_user(("Researcher"))

node_user -.->|"runs refinement"| node_cope_pipeline
node_cope_pipeline -->|"coordinates runs"| node_cope_bench
node_cope_pipeline -->|"exports skill"| node_skill_result
node_cope_general -->|"creates skills"| node_skill_result
node_cope_synthesis -.->|"supplies tasks"| node_cope_pipeline
node_diagnosis -->|"informs scaling"| node_generalist
node_generalist -.->|"uses training"| node_sft
node_generalist -.->|"uses training"| node_rl
node_longds -.->|"evaluates agents"| node_dsgym_eval
node_process_reward -.->|"uses tools"| node_reward_tools
node_swift_inference -.->|"supports scoring"| node_process_reward
node_report_agent -.->|"runs analysis"| node_cope_bench

click node_cope_pipeline "https://github.com/zjunlp/datamind/blob/main/datacope/report_task/DataCOPE_DDR/pipeline/pipeline.py"
click node_cope_general "https://github.com/zjunlp/datamind/tree/main/datacope/general/src"
click node_cope_synthesis "https://github.com/zjunlp/datamind/tree/main/datacope/reason_task/generation"
click node_cope_bench "https://github.com/zjunlp/datamind/tree/main/datacope/report_task/DDR_Bench"
click node_skill_result "https://github.com/zjunlp/datamind/blob/main/datacope/general/src/skill_manager/skill_manager.py"
click node_diagnosis "https://github.com/zjunlp/datamind/tree/main/datamind-analysis"
click node_generalist "https://github.com/zjunlp/datamind/tree/main/datamind"
click node_report_agent "https://github.com/zjunlp/datamind/blob/main/datacope/report_task/DDR_Bench/agent/data_agent.py"
click node_longds "https://github.com/zjunlp/datamind/tree/main/longds/runners/DSGym"
click node_dsgym_eval "https://github.com/zjunlp/datamind/tree/main/datacope/reason_task/eval/DSGym/dsgym/eval"
click node_process_reward "https://github.com/zjunlp/datamind/tree/main/dataprm/evaluate"
click node_reward_tools "https://github.com/zjunlp/datamind/blob/main/dataprm/evaluate/tools/query_document.py"
click node_sft "https://github.com/zjunlp/datamind/blob/main/datamind/train/sft/LLaMA-Factory/src/llamafactory/chat/hf_engine.py"
click node_rl "https://github.com/zjunlp/datamind/blob/main/datamind/train/rl/verl/verl/workers/fsdp_workers.py"
click node_swift_inference "https://github.com/zjunlp/datamind/blob/main/dataprm/ms-swift/swift/llm/infer/infer_engine/vllm_engine.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cope_pipeline,node_cope_general,node_cope_synthesis,node_cope_bench,node_skill_result toneBlue
class node_diagnosis,node_generalist,node_report_agent toneAmber
class node_longds,node_dsgym_eval,node_process_reward,node_reward_tools toneMint
class node_sft,node_rl,node_swift_inference toneRose
class node_user toneIndigo
```

## Components

### DataCOPE skills

- [Skill refinement](https://github.com/zjunlp/datamind/blob/main/datacope/report_task/DataCOPE_DDR/pipeline/pipeline.py): `datacope/report_task/DataCOPE_DDR/pipeline/pipeline.py`
- [Skill framework](https://github.com/zjunlp/datamind/tree/main/datacope/general/src): `datacope/general/src`
- [Task synthesis](https://github.com/zjunlp/datamind/tree/main/datacope/reason_task/generation): `datacope/reason_task/generation`
- [DDR benchmark](https://github.com/zjunlp/datamind/tree/main/datacope/report_task/DDR_Bench): `datacope/report_task/DDR_Bench`
- [Reusable skills](https://github.com/zjunlp/datamind/blob/main/datacope/general/src/skill_manager/skill_manager.py): `datacope/general/src/skill_manager/skill_manager.py`

### Agent development

- [Empirical diagnosis](https://github.com/zjunlp/datamind/tree/main/datamind-analysis): `datamind-analysis`
- [Generalist agents](https://github.com/zjunlp/datamind/tree/main/datamind): `datamind`
- [Report agent](https://github.com/zjunlp/datamind/blob/main/datacope/report_task/DDR_Bench/agent/data_agent.py): `datacope/report_task/DDR_Bench/agent/data_agent.py`

### Evaluation and rewards

- [LongDS benchmark](https://github.com/zjunlp/datamind/tree/main/longds/runners/DSGym): `longds/runners/DSGym`
- [Agent evaluation](https://github.com/zjunlp/datamind/tree/main/datacope/reason_task/eval/DSGym/dsgym/eval): `datacope/reason_task/eval/DSGym/dsgym/eval`
- [Process reward](https://github.com/zjunlp/datamind/tree/main/dataprm/evaluate): `dataprm/evaluate`
- [Reward tools](https://github.com/zjunlp/datamind/blob/main/dataprm/evaluate/tools/query_document.py): `dataprm/evaluate/tools/query_document.py`

### Training systems

- [Supervised tuning](https://github.com/zjunlp/datamind/blob/main/datamind/train/sft/LLaMA-Factory/src/llamafactory/chat/hf_engine.py): `datamind/train/sft/LLaMA-Factory/src/llamafactory/chat/hf_engine.py`
- [RL training](https://github.com/zjunlp/datamind/blob/main/datamind/train/rl/verl/verl/workers/fsdp_workers.py): `datamind/train/rl/verl/verl/workers/fsdp_workers.py`
- [Model inference](https://github.com/zjunlp/datamind/blob/main/dataprm/ms-swift/swift/llm/infer/infer_engine/vllm_engine.py): `dataprm/ms-swift/swift/llm/infer/infer_engine/vllm_engine.py`

### Other components

- **Researcher**

## Connections

- Researcher → Skill refinement: runs refinement (evidence: `datacope/report_task/DataCOPE_DDR/pipeline/pipeline.py`)
- Skill refinement → DDR benchmark: coordinates runs (evidence: `datacope/report_task/DataCOPE_DDR/pipeline/pipeline.py`)
- Skill refinement → Reusable skills: exports skill (evidence: `datacope/report_task/DataCOPE_DDR/pipeline/pipeline.py`)
- Skill framework → Reusable skills: creates skills (evidence: `datacope/general/src/skill_manager/skill_manager.py`)
- Task synthesis → Skill refinement: supplies tasks
- Empirical diagnosis → Generalist agents: informs scaling
- Generalist agents → Supervised tuning: uses training (evidence: `datamind/train/sft/LLaMA-Factory/src/llamafactory/chat/hf_engine.py`)
- Generalist agents → RL training: uses training
- LongDS benchmark → Agent evaluation: evaluates agents
- Process reward → Reward tools: uses tools
- Model inference → Process reward: supports scoring
- Report agent → DDR benchmark: runs analysis
