WebDancer and WebShaper: Tongyi's early web-agent data recipes
arXiv ↗PDF ↗Paper ↗Website ↗Code ↗
Read first: Building training data for search agents
TL;DR. Two Tongyi Lab papers from mid-2025 set the template that WebSailor and later Tongyi agents follow. WebDancer (2505.22648) gives a four-stage recipe: synthesize browsing QA, sample ReAct trajectories with rejection sampling, fine-tune as a cold start, then run DAPO. WebShaper (2507.15061) focuses on the data: it writes each question as a formula over sets of entities and uses a search agent to expand it, which makes the number of reasoning steps and the answer set easier to control.
Second paper on this page: WebShaper. WebShaper: Agentically Data Synthesizing via Information-Seeking Formalization. Zhengwei Tao, Jialong Wu, Wenbiao Yin, …, Jingren Zhou. 2025. arXiv 2507.15061. The bibliographic card above is WebDancer’s (2505.22648).
Key idea
Section titled “Key idea”WebDancer data. crawlQA: GPT-4o reads pages crawled by following links down from the root pages of official and knowledge-rich sites (arXiv, GitHub, wikis and others) and writes questions of three kinds: counting, multi-hop and intersection; about 60K pairs. e2hQA (“easy to hard”): start from a simple question and repeatedly replace an entity in it with a sub-question that has that entity as its answer, keeping the final answer fixed; about 40K pairs. Trajectories are sampled with two tools, search and click, from GPT-4o (short reasoning, 7,678 kept) and QwQ (long reasoning, 6,550 kept). RL then uses the QA pairs that were not used for SFT, with DAPO and a reward of 0.1 × format + 0.9 × LLM-judged answer.
WebShaper formalization. A knowledge projection is the set of entities linked to any entity in by relation . A question is an intersection of projections, and a projection’s input set can itself be the answer to another such question. WebShaper writes these as triples [variable, relation, set] and generates questions in three steps: (1) seed questions from random walks over an offline Wikipedia copy, keeping those that at least one of 5 agent attempts solves; (2) an Expander agent with Search, Summarize and Validate tools replaces leaf constants with sub-questions, layer by layer; Validate rejects a new question if QwQ can answer it without search or if types do not match; (3) trajectories are sampled 5 times per question and filtered for correctness, hallucination and repetition, leaving 5,000. Training is SFT with observations masked, then RL with a GRPO objective that uses DAPO-style token-level averaging and asymmetric clipping.
Key results
Section titled “Key results”WebDancer (2505.22648; paper-reported, GAIA / WebWalkerQA pass@1). QwQ-32B 51.5 / 47.9 and Qwen2.5-32B 40.7 / 38.4, against 37.8 and 31.0 on GAIA for the same models in a plain ReAct setup. On BrowseComp it scores 3.8 (en) and 18.0 (zh) pass@1, so the recipe did not yet reach BrowseComp-level search. RL straight from QwQ without the SFT stage reaches only 5% GAIA pass@3.
WebShaper (2507.15061; paper-reported). WebShaper reports GAIA 60.1 and WebWalkerQA 52.2 with a 72B model (Table 1). Its controlled comparison (Table 2: SFT on 5,000 items from each dataset, GAIA average) gives WebShaper 43.6 vs E2HQA 39.8 and WebWalkerQA 32.0 on Qwen2.5-32B, and 53.3 vs 45.6 on QwQ-32B, but only 45.6 vs 44.6 (E2HQA) on Qwen2.5-72B. RL on top of SFT adds 7.8 points on 32B and 13.5 on 72B. GAIA’s text-only validation subset is small (103 questions in WebSailor’s setup), so a gap of 1 point is about one question.
Connections
Section titled “Connections”- WebSailor keeps WebDancer’s structure but makes the questions harder (SailorFog-QA) and rewrites the trajectories’ reasoning.
- Training-data synthesis puts crawlQA, e2hQA and WebShaper next to ORBIT, InfoSeek and others.
- DAPO is WebDancer’s RL algorithm; GAIA and WebWalker are the main evaluations.
- InfoSeek (InForage and InfoSeek) uses a similar tree-of-constraints view with an explicit uniqueness check.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
A toy knowledge base has played-for edges (P1,T1), (P2,T1), (P3,T2), (P4,T3); teams founded T1 1902, T2 2001, T3 2003; players born P1 1992, P2 1985, P3 1995, P4 1979. Write the WebShaper-style formal question "players who played for a team founded in the 2000s and were born in the 1990s" as an intersection of projections, compute each set, and then show what happens if the birth clue is blurred to "born after 1975".
What a strong answer covers
- Teams = founded-in projection of the 2000s = T2, T3. Players-of-those-teams = played-for projection of T2, T3 = P3, P4.
- Born-in-1990s = P1, P3. Target = P3, P4 intersected with P1, P3 = P3: a unique answer.
- Blurred clue: born after 1975 = P1, P2, P3, P4. Intersection = P3, P4: two answers, so the item is underdetermined.
- Because the question is a formula over sets, the generator can compute the answer set and reject non-unique items, which free-text generation cannot do as directly.
- Mechanism
WebShaper expands a question by replacing constants with sub-questions. Explain the redundancy and reasoning-shortcut problems that random and sequential expansion cause, and why expanding all leaf constants layer by layer avoids them. Which ablation supports this?
What a strong answer covers
- Redundancy: random expansion can add facts that link two constants (e.g. a club and its city), which lengthen the question without adding a reasoning step.
- Shortcut: sequential expansion can leave a constant directly linked to the target, so a solver uses that near clue and skips the deep chain.
- Layer-wise expansion only replaces leaf constants, so every constant ends up at the same depth from the target and none sits next to it.
- Figure 7(b): the layer-wise structure beats the sequential structure for every base model tested.
- Critique
WebDancer's Table 3 trains models on short-CoT trajectories (from GPT-4o) or long-CoT trajectories (from QwQ) and reports GAIA pass@3 and the invalid-output rate. Interpret the numbers for Qwen2.5-7B and QwQ-32B, and name one confound that limits the conclusion that long reasoning "transfers" only to reasoning models.
What a strong answer covers
- QwQ-32B: long-CoT pass@3 58.3 vs short-CoT 44.7, invalid rate 13.3% vs 1.0%: a large gain despite more invalid outputs.
- Qwen2.5-7B: long-CoT 35.9 vs 34.0, but invalid outputs rise from 0.7% to 21.4%; the instruct model imitates long thoughts poorly and often breaks the format or runs out of context.
- Confound: the two trajectory sets come from different teacher models with different numbers of actions (about 4.6 vs 2.3 per trajectory) and different item counts (7,678 vs 6,550), so CoT length is not the only difference.
- A cleaner test rewrites the same action sequences with short or long thoughts, as WebSailor later did.