PhantomEnvironments: Training LLM Agents in Fictional Worlds

Anmol Kabra, Swathi Saravana Selvam, Albert Gong, Chao Wan, Christian Belardi +3 more
9/30/2026
cs.LGcs.AIcs.CL
rl

No confident code implementation found for this paper.

Abstract

Training LLM agents with reinforcement learning (RL) is bottlenecked by environments, which must provide verifiable rewards, support long-horizon interaction, and scale cheaply. Existing approaches rely on costly human-curated data or on LLM-generated environments that risk hallucinations and benchmark contamination.

Show full abstract

We show that LLMs can instead be trained into capable search agents using synthetic environments generated entirely by rules, whose generation requires no LLM and has zero marginal cost. We build PhantomEnvironments, multi-turn RL environments from fictional worlds, where agents must search a corpus of templated articles to answer multi-hop questions. Despite sharing no facts with the real world, these strikingly simple environments yield agents that transfer to real-world multi-hop search benchmarks, often outperforming real-world training data on newer benchmarks. Trained agents generalize to unseen fictional universes, and Qwen models learn to scale their search budget roughly linearly with question difficulty, suggesting emergent search scaling from environment interaction alone. Ablating environment complexity reveals that hop count drives transfer more than constraints or comparisons: even the simplest rule-generated environments are a surprisingly effective, free resource for training generalizable LLM agents.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{kabra2026phantomenvironments,
  title  = {PhantomEnvironments: Training LLM Agents in Fictional Worlds},
  author = {Anmol Kabra and Swathi Saravana Selvam and Albert Gong and Chao Wan and Christian Belardi and Dongyoung Go and Katie Z. Luo and Kilian Q. Weinberger},
  year   = {2026},
  eprint = {2609.40221},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.40221v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.40221.svg)](https://codeofpaper.com/paper/2609.40221)

Discussion