Ecom-RLVE: Adaptive Verifiable Environments for E-Commerce Conversational Agents

TL;DR — We extend the RLVE framework from single-turn reasoning puzzles to multi-turn, tool-augmented e-commerce conversations. EcomRLVE-GYM provides 8 verifiable environments — product discovery, substitution, cart building, returns, order tracking, policy QA, bundle planning, and multi-intent journeys — each with procedural problem generation, a 12-axis difficulty curriculum, and algorithmically verifiable rewards. We train a Qwen 3 8B model with DAPO over 300 steps and present early results demonstrating that environment scaling and adaptive difficulty transfer to agentic, real-world task completion.

This project originated in the PyTorch OpenEnv Hackathon and is still evolving, follow us for updates 🔥

Why RL for shopping agents?

Large language models can hold fluent conversations, yet deploying them as shopping assistants reveals a persistent gap: fluency ≠ task completion. A customer who asks “find me a USB-C charger under $25 that ships in two days” needs an agent that invokes the right catalog search, filters on three hard constraints, avoids hallucinating product IDs it never retrieved, and handles follow-ups when the top result goes out of stock.

Supervised fine-tuning can teach surface-level tool use from demonstrations, but it cannot scale to the combinatorial space of constraint configurations, partial-information dialogues, and multi-step transactional workflows that real e-commerce demands.

Reinforcement learning with verifiable rewards (RLVR) offers an alternative: the agent optimises for outcomes — did the products satisfy the constraints? Was the cart correct? Was the return initiated for the right order line? The challenge is constructing reward functions that are both verifiable (no LLM-as-a-judge subjectivity) and adaptive (difficulty that grows with the policy’s capability).

From RLVE-Gym to EcomRLVE-GYM

RLVE-Gym provides 400 environments for sorting, multiplication, Sudoku, and other algorithmic-reasoning tasks; however, those are all single-turn, text-in / text-out puzzles — extending to agentic domains was left as future work.

EcomRLVE-GYM fills that gap: we stay in the verifiable regime (e-commerce outcomes can be checked algorithmically) while extending to multi-turn, tool-augmented, agentic conversations — environments where the agent must act (call tools, modify world state) rather than merely reason (produce a text answer) and compensates for the deficiency of the search system.

EcomRLVE-GYM transforms customer-service outcomes structurally verifiable:

Table 1. The verifiable signal for each task.

TaskVerifiable signal
Product recommendationDoes the product satisfy all stated constraints? Is it in stock?
SubstitutionIs the substitute similar to the original? Does it meet compatibility requirements?
Cart buildingDoes the final cart exactly match the requested items, variants, and quantities?
Return initiationWas a return initiated? For the correct order and line item?
Order trackingDid the agent identify the correct order and report the accurate status?
Policy Q&ADoes the answer match the deterministic output of the policy rule engine?
Bundle planningDoes the shopping list cover all required categories within budget?
Multi-intent journeyDid each sub-task succeed?

Every signal above can be evaluated by a program with access to the hidden ground-truth goal. No human annotation or LLM-as-a-judge is needed.

What a training episode looks like

Before we explain the framework, here is what a single EcomRLVE episode looks like at difficulty d = 4. The environment generates a hidden goal, a simulated user opens the chat, and the agent must use tools to satisfy the request. Every action is verified algorithmically — no LLM judge required.

Episode: E_CART d=4

  1. User:

    I need two 65-watt Anker chargers (USB-C) and a Spigen MagSafe case in matte black.

    Turn 1

  2. Agent:

    Let me find those for you.

    tool_calls:

    • – catalog.search("Anker 65W charger")
    • – catalog.search("Spigen MagSafe case")

    Turn 2

  3. Agent:

    Checking available variants…

    tool_calls:

    • – catalog.get_variants("prod_8832")
    • – catalog.get_variants("prod_2291")

    Turn 3

  4. Agent:

    Items added to your cart!

    tool_calls:

    • – cart.add("prod_8832", variant="USB-C", qty=2)
    • – cart.add("prod_2291", variant="Matte Black", qty=1)

    Turn 4

Verifier:

F1 = 1.0 ✓
r_task = +1.0
T_eff = 3
r_eff = +0.5
hall_rate = 0
r_hall = 0.0

r_total = 0.825

r_total = 0.75·1.0 + 0.15·0.5 + 0.10·0.0 = 0.825

Figure 1. A sample E_CART episode at difficulty d = 4, with the verifier’s reward breakdown.

The reward is fully computed by code: F1 over (product, variant, qty) tuples, an efficiency bonus for finishing in fewer turns, and a hallucination check that every recommended product ID was actually retrieved. If the agent had picked the Lightning variant instead of USB-C, the simulated user would have corrected it mid-dialogue — and the F1 would have dropped.

The eight environments

Each environment covers a distinct real-world shopping scenario. The agent must complete the task using tools (catalog search, cart operations, order lookups, policy queries) and is scored by a program — not a human or another LLM.

Table 2. The eight environments.

EnvironmentWhat the agent must do
Product DiscoveryFind products that satisfy all the user’s constraints
SubstitutionAn item is out of stock — find a similar, compatible alternative
Cart BuildingAdd the exact products, variants, and quantities the user asked for
Return + ReplacementIdentify the right order line, initiate a return, suggest a replacement
Order TrackingResolve which order the user means and report its current status
Policy QAAnswer a deterministic question about store policy (return window, shipping rules, etc.)
Bundle PlanningRecommend a complete shopping list for a project within a budget
Multi-Intent JourneyHandle a conversation that chains 2–5 of the above tasks in sequence

Every environment uses the same three-part reward signal:

Invalid outputs (malformed JSON, illegal tool calls) trigger an immediate failure score, creating a strong incentive for well-formed responses from step one.

Adaptive difficulty curriculum

A single difficulty number d controls 12 independent aspects of a task simultaneously. This is important because e-commerce conversations are hard in many different ways at once — not just along one dimension.

The difficulty curriculum and its twelve axesA dial labelled Difficulty Curriculum at the centre, joined by hairlines to twelve numbered axes, odd numbers on the left and even on the right: 01 Constraints, 02 Search Top K, 03 Rec Count, 04 Rank Error, 05 Max Count, 06 OSS Rate, 07 Missing Slots, 08 Order History, 09 Noise, 10 Policy branches, 11 Pref Switch, 12 Tool Budget.Axis 01, Constraints: how many constraints the user has: 2 at d = 0, 5 at d = 6, 8 at d = 12 (Table 3)01ConstraintsAxis 02, Search Top K02Search Top KAxis 03, Rec Count03Rec CountAxis 04, Rank Error04Rank ErrorAxis 05, Max Count05Max CountAxis 06, OSS Rate: items that go out of stock mid-conversation: 0% at d = 0, 30% at d = 6, 50% at d = 12 (Table 3)06OSS RateAxis 07, Missing Slots07Missing SlotsAxis 08, Order History: order-history size08Order HistoryAxis 09, Noise: input noise (typos, slang)09NoiseAxis 10, Policy branches10Policy branchesAxis 11, Pref Switch11Pref SwitchAxis 12, Tool Budget: tool budget12Tool BudgetDIFFICULTYCurriculum
The difficulty curriculum and its twelve axesA dial labelled Difficulty Curriculum at the centre, joined by hairlines to twelve numbered axes, odd numbers on the left and even on the right: 01 Constraints, 02 Search Top K, 03 Rec Count, 04 Rank Error, 05 Max Count, 06 OSS Rate, 07 Missing Slots, 08 Order History, 09 Noise, 10 Policy branches, 11 Pref Switch, 12 Tool Budget.Axis 01, Constraints: how many constraints the user has: 2 at d = 0, 5 at d = 6, 8 at d = 12 (Table 3)01ConstraintsAxis 02, Search Top K02Search Top KAxis 03, Rec Count03Rec CountAxis 04, Rank Error04Rank ErrorAxis 05, Max Count05Max CountAxis 06, OSS Rate: items that go out of stock mid-conversation: 0% at d = 0, 30% at d = 6, 50% at d = 12 (Table 3)06OSS RateAxis 07, Missing Slots07Missing SlotsAxis 08, Order History: order-history size08Order HistoryAxis 09, Noise: input noise (typos, slang)09NoiseAxis 10, Policy branches10Policy branchesAxis 11, Pref Switch11Pref SwitchAxis 12, Tool Budget: tool budget12Tool BudgetDIFFICULTYCurriculum
Figure 2. The twelve axes of the difficulty curriculum.

Here are four representative difficulty axes:

Table 3. Four representative difficulty axes at easy, medium and hard settings of d.

What changesEasy (d = 0)Medium (d = 6)Hard (d = 12)
How many constraints the user has258
How often the user omits a constraint5%70%~80%
Fraction of search results that are distractors0%12%24%
Items that go out of stock mid-conversation0%30%50%

The other eight axes cover turn budget, input noise (typos, slang), context switches, retrieval depth, order-history size, policy complexity, and tool budget. The full breakdown is in the technical report.

Adaptive scheduling. Each environment tracks the agent’s success rate independently and only advances to harder problems once the agent is passing the current level reliably. This keeps every environment training at the agent’s capability frontier — avoiding both “too easy to learn from” and “too hard to make progress on”.

The training loopThe problem generator samples a task at difficulty d and its hidden goal. The hidden goal tells the simulated user what the user wants. Inside the episode, a multi-turn conversation, the simulated user and the agent exchange messages. The agent sends calls to the tools and gets results back. The episode’s actions and final state go to the verifier, a program with no LLM judge. The verifier checks them against the hidden goal, which the agent never sees. The verifier returns the reward to the agent: task reward, efficiency reward and hallucination penalty. The verifier reports pass or fail to adaptive scheduling, which tracks the success rate per environment. Adaptive scheduling sends the generator to harder problems, a higher d, once the current level is passed reliably.Episode: multi-turn conversationProblem generator: samples a task at difficulty dProblem generatorsamples a task atdifficulty dHidden goal: ground truth, never shown to the agentHidden goalground truth, nevershown to the agentSimulated user: opens the chat, corrects mistakesSimulated useropens the chat,corrects mistakesAgent: the model being trainedAgentthe modelbeing trainedTools: catalog search, cart operations, order lookups, policy queriesToolscatalog search, cartoperations, orderlookups, policy queriesVerifier: a program, no LLM judgeVerifiera program, no LLM judgeAdaptive scheduling: tracks success rate per environmentAdaptive schedulingtracks success rate per environmentProblem generator to hidden goalHidden goal to simulated user: what the user wantswhat theuser wantsSimulated user and agent: messagesmessagesAgent and tools: calls, resultscalls, resultsEpisode to verifier: actions and final stateactions andfinal stateHidden goal to verifier: checked againstchecked againstVerifier to agent: reward (task, efficiency, hallucination penalty)reward: task, efficiency, hallucination penaltyVerifier to adaptive scheduling: pass or failpass or failAdaptive scheduling to problem generator: harder problems once the current level is passed reliablyharder problems once the currentlevel is passed reliablyd
The training loopThe problem generator samples a task at difficulty d and its hidden goal. The hidden goal tells the simulated user what the user wants. Inside the episode, a multi-turn conversation, the simulated user and the agent exchange messages. The agent sends calls to the tools and gets results back. The episode’s actions and final state go to the verifier, a program with no LLM judge. The verifier checks them against the hidden goal, which the agent never sees. The verifier returns the reward to the agent: task reward, efficiency reward and hallucination penalty. The verifier reports pass or fail to adaptive scheduling, which tracks the success rate per environment. Adaptive scheduling sends the generator to harder problems, a higher d, once the current level is passed reliably.Episode: multi-turn conversationProblem generator: samples a task at difficulty dProblem generatorsamples a task at difficulty dHidden goal: ground truth, never shown to the agentHidden goalground truth, never shown to the agentSimulated user: opens the chat, corrects mistakesSimulateduserAgent: the model being trainedAgentTools: catalog search, cart operations, order lookups, policy queriesToolsopens the chat,corrects mistakesthe model beingtrainedcatalog search,cart operations,order lookups,policy queriesVerifier: a program, no LLM judgeVerifiera program, no LLM judgeAdaptive scheduling: tracks success rate per environmentAdaptive schedulingtracks success rate per environmentProblem generator to hidden goalHidden goal to simulated user: what the user wantswhat the user wantsSimulated user and agent: messagesmessagesAgent and tools: calls, resultscalls, resultsHidden goal to verifier: checked againstcheckedagainstEpisode to verifier: actions and final stateactions andfinal stateVerifier to agent: reward (task, efficiency, hallucination penalty)reward: task, efficiency,hallucination penaltyVerifier to adaptive scheduling: pass or failpass or failAdaptive scheduling to problem generator: harder problems once the current level is passed reliablyharder problems once the currentlevel is passed reliablyd
Figure 3. One training loop. The generator samples a task at difficulty d with a hidden goal; a simulated user and the agent talk while the agent calls tools; a program checks the outcome against the goal and returns the task reward, the efficiency reward and the hallucination penalty. Each environment tracks the agent’s success rate and moves to harder problems only once the current level is passed reliably.

Deep dive: Cart Building (E_CART)

Cart building is a good showcase because it requires the full search → inspect → clarify → act loop, has a binary ground truth, and introduces a challenge absent from most recommendation benchmarks: variant selection.

To succeed, the agent must develop five distinct skills:

Table 4. The five skills cart building requires.

SkillWhat it means in practice
Product DiscoverySearch the catalog with well-formed queries to find the right items
Variant SelectionIdentify the correct color, size, or connector type — not just the right product
Cart ManagementAdd items with the exact variant and quantity the user asked for
Clarification DialogueAsk the user a focused follow-up when a request is ambiguous (e.g., missing size)
Multi-Item OrdersHandle shopping lists with several different products in a single conversation

The agent uses six tools to accomplish this:

Table 5. The six tools available in E_CART.

ToolWhat it does
catalog_searchSearches the product catalog with a natural-language query
catalog_get_variantsReturns available variants (color, size, connector, etc.) for a product
cart_addAdds a product to the cart with a specific variant and quantity
cart_viewReads the current cart so the agent can verify it matches the request
user_get_visit_historyFetches recently viewed products by user
ask_userSends a clarification question to the customer when a detail is missing

The problem

The generator samples 1–5 target products (scaling in difficulty with d), each potentially requiring a specific variant (USB-C vs Lightning, Matte vs Glossy) and a quantity > 1. The agent must:

  1. Search the catalog to find each product
  2. Call catalog.get_variants to see available options
  3. Add the correct (product_id, variant_id, qty) tuples to the cart

Why variants matter

Real product catalogs have sparse variant data — many products have none, and those that do typically vary only by colour or size. To create a richer discrimination task, we synthesize variants at episode initialization:

Difficulty scaling

Table 6. How the cart-building task scales with d.

Axisd = 0d = 3d = 6d = 9
Distinct items1234
Variant required21%66%93%99%
Multi-quantity0%30%50%50%

At d = 0 the agent adds a single product with no variant complexity — learning the basic catalog.search → cart.add workflow. At d = 6 it juggles 3 items, nearly all requiring a specific variant, with half needing qty > 1.

Scoring

The cart must be exactly right — correct product, correct variant, correct quantity. Partial credit is given for partially correct carts, but a perfect score requires every item to match. If the agent adds the wrong variant, the simulated user corrects it mid-dialogue (“that’s the Lightning version, but I need USB-C”), giving the agent a chance to self-correct before the episode ends.

Trajectories: easy vs. hard

Two real E_CART episodes from a Qwen 3 8B agent. Same environment, same agent — difficulty alone changes the game.

look-upcart changetalk onlydoneitem correctitem wrongreward, d = 1reward, d = 8

Two E_CART episodes, turn by turn, and their rewardsEpisode at d = 1, 1 item, no variants, 3 turns, 2 effective. Turn 1: user.get_visit_history() returns 4 results; the keypad is not in the cart yet. Turn 2: cart.add("syn_000162", qty=1); the keypad is in the cart, correct. Turn 3: answer done; the cart is still correct. Episode at d = 8, 3 items, variants and typos, 8 turns, 6 effective. Turn 1: user.get_visit_history() returns 9 results. Turn 2: no tool calls, presents 3 product cards. Turn 3: catalog.get_variants three times; the cart is empty after turns 1 to 3. Turn 4: cart.add three times; the charger (100W, 1) is correct, the air fryer is wrong (Bamboo instead of Charcoal) and the tank top is wrong (3 XL instead of 3 XS). Turn 5: re-fetches tank top variants and adds 2 XS; the tank top is still wrong, now 3 XL plus 2 XS. Turn 6: re-fetches tank top variants again. Turn 7: says it cannot find a Charcoal variant, with no tool call. Turn 8: answer done; the charger is correct, the air fryer and the tank top are wrong. Rewards at d = 1: r_task +1.00, r_eff +0.33, r_hall 0.00, r_total +0.80. Rewards at d = 8: r_task about 0.00, r_eff −0.43, r_hall 0.00, r_total −0.06.d = 11 item, no variantsd = 1, turn 1: user.get_visit_history() → 4 resultsd = 1, turn 2: cart.add("syn_000162", qty=1)d = 1, turn 3: answer: { "done": true }Keypadd = 1, Keypad after turn 1: emptyd = 1, Keypad after turn 2: correctd = 1, Keypad after turn 3: correctd = 83 items, variants + typosd = 8, turn 1: user.get_visit_history() → 9 resultsd = 8, turn 2: no tool calls, presents 3 product cardsd = 8, turn 3: catalog.get_variants × 3d = 8, turn 4: cart.add × 3 (charger right; air fryer and tank top wrong)d = 8, turn 5: re-fetches tank top variants, adds 2× XSd = 8, turn 6: re-fetches tank top variants againd = 8, turn 7: says it cannot find a Charcoal variant (no tool call)d = 8, turn 8: answer: { "done": true }Chargerd = 8, Charger (100W, ×1) after turn 1: emptyd = 8, Charger (100W, ×1) after turn 2: emptyd = 8, Charger (100W, ×1) after turn 3: emptyd = 8, Charger (100W, ×1) after turn 4: correctd = 8, Charger (100W, ×1) after turn 5: correctd = 8, Charger (100W, ×1) after turn 6: correctd = 8, Charger (100W, ×1) after turn 7: correctd = 8, Charger (100W, ×1) after turn 8: correctAir fryerd = 8, Air fryer (Charcoal, ×1) after turn 1: emptyd = 8, Air fryer (Charcoal, ×1) after turn 2: emptyd = 8, Air fryer (Charcoal, ×1) after turn 3: emptyd = 8, Air fryer (Charcoal, ×1) after turn 4: wrong: Bambood = 8, Air fryer (Charcoal, ×1) after turn 5: wrong: Bambood = 8, Air fryer (Charcoal, ×1) after turn 6: wrong: Bambood = 8, Air fryer (Charcoal, ×1) after turn 7: wrong: Bambood = 8, Air fryer (Charcoal, ×1) after turn 8: wrong: BambooTank topd = 8, Tank top (XS, ×3) after turn 1: emptyd = 8, Tank top (XS, ×3) after turn 2: emptyd = 8, Tank top (XS, ×3) after turn 3: emptyd = 8, Tank top (XS, ×3) after turn 4: wrong: 3× XLd = 8, Tank top (XS, ×3) after turn 5: wrong: 3× XL + 2× XSd = 8, Tank top (XS, ×3) after turn 6: wrong: 3× XL + 2× XSd = 8, Tank top (XS, ×3) after turn 7: wrong: 3× XL + 2× XSd = 8, Tank top (XS, ×3) after turn 8: wrong: 3× XL + 2× XS+2× XS12345678turnr_taskr_task, d = 1: +1.00+1.00r_task, d = 8: ≈ 0.00≈ 0.00r_effr_eff, d = 1: +0.33+0.33r_eff, d = 8: −0.43−0.43r_hallr_hall, d = 1: 0.000.00r_hall, d = 8: 0.000.00r_totalr_total, d = 1: +0.80+0.80r_total, d = 8: −0.06−0.060
Two E_CART episodes, turn by turn, and their rewardsEpisode at d = 1, 1 item, no variants, 3 turns, 2 effective. Turn 1: user.get_visit_history() returns 4 results; the keypad is not in the cart yet. Turn 2: cart.add("syn_000162", qty=1); the keypad is in the cart, correct. Turn 3: answer done; the cart is still correct. Episode at d = 8, 3 items, variants and typos, 8 turns, 6 effective. Turn 1: user.get_visit_history() returns 9 results. Turn 2: no tool calls, presents 3 product cards. Turn 3: catalog.get_variants three times; the cart is empty after turns 1 to 3. Turn 4: cart.add three times; the charger (100W, 1) is correct, the air fryer is wrong (Bamboo instead of Charcoal) and the tank top is wrong (3 XL instead of 3 XS). Turn 5: re-fetches tank top variants and adds 2 XS; the tank top is still wrong, now 3 XL plus 2 XS. Turn 6: re-fetches tank top variants again. Turn 7: says it cannot find a Charcoal variant, with no tool call. Turn 8: answer done; the charger is correct, the air fryer and the tank top are wrong. Rewards at d = 1: r_task +1.00, r_eff +0.33, r_hall 0.00, r_total +0.80. Rewards at d = 8: r_task about 0.00, r_eff −0.43, r_hall 0.00, r_total −0.06.d = 11 item, no variantsd = 1, turn 1: user.get_visit_history() → 4 resultsd = 1, turn 2: cart.add("syn_000162", qty=1)d = 1, turn 3: answer: { "done": true }Keypadd = 1, Keypad after turn 1: emptyd = 1, Keypad after turn 2: correctd = 1, Keypad after turn 3: correctd = 83 items, variants + typosd = 8, turn 1: user.get_visit_history() → 9 resultsd = 8, turn 2: no tool calls, presents 3 product cardsd = 8, turn 3: catalog.get_variants × 3d = 8, turn 4: cart.add × 3 (charger right; air fryer and tank top wrong)d = 8, turn 5: re-fetches tank top variants, adds 2× XSd = 8, turn 6: re-fetches tank top variants againd = 8, turn 7: says it cannot find a Charcoal variant (no tool call)d = 8, turn 8: answer: { "done": true }Chargerd = 8, Charger (100W, ×1) after turn 1: emptyd = 8, Charger (100W, ×1) after turn 2: emptyd = 8, Charger (100W, ×1) after turn 3: emptyd = 8, Charger (100W, ×1) after turn 4: correctd = 8, Charger (100W, ×1) after turn 5: correctd = 8, Charger (100W, ×1) after turn 6: correctd = 8, Charger (100W, ×1) after turn 7: correctd = 8, Charger (100W, ×1) after turn 8: correctAir fryerd = 8, Air fryer (Charcoal, ×1) after turn 1: emptyd = 8, Air fryer (Charcoal, ×1) after turn 2: emptyd = 8, Air fryer (Charcoal, ×1) after turn 3: emptyd = 8, Air fryer (Charcoal, ×1) after turn 4: wrong: Bambood = 8, Air fryer (Charcoal, ×1) after turn 5: wrong: Bambood = 8, Air fryer (Charcoal, ×1) after turn 6: wrong: Bambood = 8, Air fryer (Charcoal, ×1) after turn 7: wrong: Bambood = 8, Air fryer (Charcoal, ×1) after turn 8: wrong: BambooTank topd = 8, Tank top (XS, ×3) after turn 1: emptyd = 8, Tank top (XS, ×3) after turn 2: emptyd = 8, Tank top (XS, ×3) after turn 3: emptyd = 8, Tank top (XS, ×3) after turn 4: wrong: 3× XLd = 8, Tank top (XS, ×3) after turn 5: wrong: 3× XL + 2× XSd = 8, Tank top (XS, ×3) after turn 6: wrong: 3× XL + 2× XSd = 8, Tank top (XS, ×3) after turn 7: wrong: 3× XL + 2× XSd = 8, Tank top (XS, ×3) after turn 8: wrong: 3× XL + 2× XS+2× XS12345678turnRewards of the two episodesr_task: d = 1 +1.00, d = 8 about 0.00. r_eff: +0.33 and −0.43. r_hall: 0.00 and 0.00. r_total: +0.80 and −0.06.r_taskr_task, d = 1: +1.00+1.00r_task, d = 8: ≈ 0.00≈ 0.00r_effr_eff, d = 1: +0.33+0.33r_eff, d = 8: −0.43−0.43r_hallr_hall, d = 1: 0.000.00r_hall, d = 8: 0.000.00r_totalr_total, d = 1: +0.80+0.80r_total, d = 8: −0.06−0.060
Figure 4. The two episodes of Table 7 on one turn axis. In each lane the top row shows what the agent did in a turn, and the rows below show each requested item in the cart after that turn, correct or wrong. At d = 1 the item is right at turn 2 and the episode ends at turn 3. At d = 8 the air fryer and the tank top are wrong from turn 4 to the end at turn 8. Right: the reward the verifier returned for each episode.

Table 7. Two E_CART episodes turn by turn, at d = 1 and d = 8.

Stepd = 1 — 1 item, no variantsd = 8 — 3 items, variants + typos
User message “Shopping list: SonicWave Keypad. Please add everything.” “pls add the following to my aart: Eco-Frienly HrenLefa Charger by GreenLeaf, High-Performance AqaPure Air Fryer , Lighrweiht PixelVault Tank Top (3).” — typos from noise axis
Turn 1 user.get_visit_history() → 4 results. Spots the target immediately. user.get_visit_history() → 9 results. Must disambiguate across chargers, fryers, tops.
Turn 2 cart.add("syn_000162", qty=1) → Cart: 1 item, $2.74. “I found the SonicWave Keypad.” User: “Great, that’s the exact one.” No tool calls — presents 3 product cards. User: “Add the Charger with 100W output, Air Fryer with Charcoal filter, 3 Tank Tops in size XS.”
Turn 3 answer: { "done": true } — Done in 3 turns. catalog.get_variants × 3 → charger: 6 variants (100W, 120W, 30W…), air fryer: 6 (Bamboo, Permanent, Charcoal…), tank top: 7 (XS, S, XL…). User: “I need three Tank Tops in XS.”
Turn 4 cart.add(charger, "100W", qty=1) ✓ cart.add(fryer, "Bamboo", qty=1) ✗ should be Charcoal. cart.add(tank_top, "size_XL", qty=3) ✗ should be XS. User: “Air Fryer has Bamboo not Charcoal, Tank Top is XL not XS.”
Turn 5 Re-fetches tank top variants, adds 2× XS — doesn’t fix the air fryer. User: “Air Fryer still shows Bamboo. I need three XS, not two.”
Turn 6 Re-fetches tank top variants again — still ignores the air fryer. User: “Please change the Air Fryer variant.”
Turn 7 “I cannot find a Charcoal filter variant.” — It exists; the agent saw it in turn 3 but never selected it. User: “Skip the Air Fryer then.”
Turn 8 answer: { "done": true } — Cart still wrong: Charger ✓, Air Fryer (Bamboo) ✗, Tank Top (3×XL + 2×XS) ✗
Reward r_task = +1.00, r_eff = +0.33, r_hall = 0.00, r_total = +0.80 ✓ r_task ≈ 0.00, r_eff = −0.43, r_hall = 0.00, r_total = −0.06 ✗
Outcome Cart matches goal. 3 turns, 2 effective. Wrong variants, wrong quantities, user gave up. 8 turns, 6 effective.

At d=1 the agent solves the task in 3 clean turns. At d=8 it spirals — picking Bamboo instead of Charcoal, XL instead of XS, never fixing the air fryer despite two user corrections, then hallucinating that the variant doesn’t exist. This is exactly the kind of multi-step error cascade that the difficulty curriculum surfaces, and that adaptive training should teach the agent to recover from.

User simulation

A verifiable environment needs a user simulator that behaves realistically. We use Qwen3.5 (9.7B) to generate natural, varied user messages rather than canned templates — covering everything from typo-filled requests to mid-conversation topic switches.

Two design choices matter for training quality:

Preferences match stated constraints. Each simulated user has a hidden set of preferences (price sensitivity, brand loyalty, shipping speed, etc.). These are deliberately biased toward whatever constraints the user communicated — so if the user said “under $25”, the reward function actually cares about price. Without this, an agent could be penalised for correctly following the user’s instructions.

Strategic omission. The LLM deliberately withholds some constraints from the opening message to force the agent to ask clarifying questions. The system tracks exactly what was and wasn’t mentioned, so the agent is never penalised for information it was never given.

Environment scaling

Following RLVE’s methodology, we define nested environment collections:

C1 ⊂ C2 ⊂ C4 ⊂ C8

Table 8. The nested environment collections.

CollectionEnvironmentsSkills trained
C1CartSearch Query Formulation, Cart Manipulation
C2+ SubstitutionSimilarity reasoning under constraints
C4+ Product Discovery, ReturnsTransactional workflows (Retrieval + recommendation, return initiation)
C8+ Status, Policy, Bundle, JourneyKnowledge retrieval, planning, compositionality

We hypothesise — consistent with RLVE’s findings — that C8 agents outperform single-environment specialists, even on the specialist’s own task.

Early results

We trained Qwen 3 8B with DAPO on C1 (Cart Building) for 300 steps as an initial viability study.

Table 9. Training configuration.

SettingConfig
Base modelQwen 3 8B
AlgorithmDAPO (G = 8 rollouts/prompt)
LR1e-5
Catalog2M products, FAISS index with Alibaba-NLP/gte-modernbert-base (768-dim)
User simQwen3.5 9.7B

accuracy, 64-sample windowfaint points of the original plotpromotiondifficulty range

Accuracy and difficulty range against combined training steps, runs 7 to 11Top panel: accuracy over a 64-sample window. Run 7 (d = 0–3) stays near zero, below 0.16, from step 8 to step 126, climbs from step 126 to 0.94 at step 144 and is promoted there. Run 8 (d = 1–4) dips to 0.5 at step 154 and is promoted at step 162 with accuracy 1.00. Run 9 (d = 2–5) holds at 0.75 and is promoted at step 174 with accuracy 1.00. Run 10 (d = 3–6) ranges between 0.69 and 0.94 and is promoted at step 200 with accuracy 1.00. Run 11 (d = 4–7) holds near 0.72 to 0.75, climbs to 0.97 and is promoted at step 216 with accuracy 1.00. Bottom panel: the difficulty range, d = 0–3 from step 0 to 144, then 1–4, 2–5, 3–6 and 4–7, each one level up.0.00.20.40.60.81.0τ=0.9τ=0.8τ=0.7τ=0.6Step 8, run 7: accuracy 0Step 10, run 7: accuracy 0Step 12, run 7: accuracy 0Step 14, run 7: accuracy 0.094Step 16, run 7: accuracy 0.094Step 18, run 7: accuracy 0.094Step 20, run 7: accuracy 0.094Step 22, run 7: accuracy 0Step 24, run 7: accuracy 0Step 26, run 7: accuracy 0Step 28, run 7: accuracy 0Step 30, run 7: accuracy 0Step 32, run 7: accuracy 0Step 34, run 7: accuracy 0Step 36, run 7: accuracy 0.031Step 38, run 7: accuracy 0.031Step 40, run 7: accuracy 0.031Step 42, run 7: accuracy 0.031Step 44, run 7: accuracy 0Step 46, run 7: accuracy 0.031Step 48, run 7: accuracy 0.031Step 50, run 7: accuracy 0.031Step 52, run 7: accuracy 0.031Step 54, run 7: accuracy 0Step 56, run 7: accuracy 0Step 58, run 7: accuracy 0Step 60, run 7: accuracy 0Step 62, run 7: accuracy 0Step 64, run 7: accuracy 0.094Step 66, run 7: accuracy 0.125Step 68, run 7: accuracy 0.125Step 70, run 7: accuracy 0.125Step 72, run 7: accuracy 0.031Step 74, run 7: accuracy 0Step 76, run 7: accuracy 0Step 78, run 7: accuracy 0Step 80, run 7: accuracy 0Step 82, run 7: accuracy 0Step 84, run 7: accuracy 0Step 86, run 7: accuracy 0Step 88, run 7: accuracy 0Step 90, run 7: accuracy 0.031Step 92, run 7: accuracy 0.031Step 94, run 7: accuracy 0.031Step 96, run 7: accuracy 0.031Step 98, run 7: accuracy 0Step 100, run 7: accuracy 0Step 102, run 7: accuracy 0Step 104, run 7: accuracy 0Step 106, run 7: accuracy 0.031Step 108, run 7: accuracy 0.031Step 110, run 7: accuracy 0.031Step 112, run 7: accuracy 0.094Step 114, run 7: accuracy 0.062Step 116, run 7: accuracy 0.062Step 118, run 7: accuracy 0.062Step 120, run 7: accuracy 0Step 122, run 7: accuracy 0Step 124, run 7: accuracy 0Step 126, run 7: accuracy 0.062Step 128, run 7: accuracy 0.281Step 130, run 7: accuracy 0.344Step 132, run 7: accuracy 0.344Step 134, run 7: accuracy 0.375Step 136, run 7: accuracy 0.188Step 138, run 7: accuracy 0.375Step 140, run 7: accuracy 0.625Step 142, run 7: accuracy 0.719Step 144, run 7: accuracy 0.938Step 146, run 8: accuracy 0.938Step 148, run 8: accuracy 0.688Step 150, run 8: accuracy 0.75Step 152, run 8: accuracy 0.75Step 154, run 8: accuracy 0.5Step 156, run 8: accuracy 0.75Step 158, run 8: accuracy 0.75Step 160, run 8: accuracy 0.75Step 162, run 8: accuracy 1Step 164, run 9: accuracy 1Step 166, run 9: accuracy 0.75Step 168, run 9: accuracy 0.75Step 170, run 9: accuracy 0.75Step 172, run 9: accuracy 0.75Step 174, run 9: accuracy 1Step 176, run 10: accuracy 1Step 178, run 10: accuracy 0.75Step 180, run 10: accuracy 0.75Step 182, run 10: accuracy 0.719Step 184, run 10: accuracy 0.688Step 186, run 10: accuracy 0.938Step 188, run 10: accuracy 0.906Step 190, run 10: accuracy 0.938Step 192, run 10: accuracy 0.719Step 194, run 10: accuracy 0.719Step 196, run 10: accuracy 0.75Step 198, run 10: accuracy 0.75Step 200, run 10: accuracy 1Step 202, run 11: accuracy 1Step 204, run 11: accuracy 0.75Step 206, run 11: accuracy 0.75Step 208, run 11: accuracy 0.719Step 210, run 11: accuracy 0.719Step 212, run 11: accuracy 0.969Step 214, run 11: accuracy 0.969Step 216, run 11: accuracy 1Run 7 (d = 0–3), τ = 0.9: promoted at step 144, acc=0.94Run 8 (d = 1–4), τ = 0.9: promoted at step 162, acc=1.00Run 9 (d = 2–5), τ = 0.9: promoted at step 174, acc=1.00Run 10 (d = 3–6), 64 consec: promoted at step 200, acc=1.00Run 11 (d = 4–7), 64 consec: promoted at step 216, acc=1.00Run 7Run 8Run 9Run 10Run 11accuracy (64-sample window)Run 7: d = 0–3, steps 0 to 144Run 8: d = 1–4, steps 144 to 162Run 9: d = 2–5, steps 162 to 174Run 10: d = 3–6, steps 174 to 200Run 11: d = 4–7, steps 200 to 21601234567d = 0–31–42–53–64–7difficulty d050100150200144162174200216promotedcombined training steps
Accuracy and difficulty range against combined training steps, runs 7 to 11Top panel: accuracy over a 64-sample window. Run 7 (d = 0–3) stays near zero, below 0.16, from step 8 to step 126, climbs from step 126 to 0.94 at step 144 and is promoted there. Run 8 (d = 1–4) dips to 0.5 at step 154 and is promoted at step 162 with accuracy 1.00. Run 9 (d = 2–5) holds at 0.75 and is promoted at step 174 with accuracy 1.00. Run 10 (d = 3–6) ranges between 0.69 and 0.94 and is promoted at step 200 with accuracy 1.00. Run 11 (d = 4–7) holds near 0.72 to 0.75, climbs to 0.97 and is promoted at step 216 with accuracy 1.00. Bottom panel: the difficulty range, d = 0–3 from step 0 to 144, then 1–4, 2–5, 3–6 and 4–7, each one level up.0.00.20.40.60.81.0τ=0.9τ=0.8τ=0.7τ=0.6Step 8, run 7: accuracy 0Step 10, run 7: accuracy 0Step 12, run 7: accuracy 0Step 14, run 7: accuracy 0.094Step 16, run 7: accuracy 0.094Step 18, run 7: accuracy 0.094Step 20, run 7: accuracy 0.094Step 22, run 7: accuracy 0Step 24, run 7: accuracy 0Step 26, run 7: accuracy 0Step 28, run 7: accuracy 0Step 30, run 7: accuracy 0Step 32, run 7: accuracy 0Step 34, run 7: accuracy 0Step 36, run 7: accuracy 0.031Step 38, run 7: accuracy 0.031Step 40, run 7: accuracy 0.031Step 42, run 7: accuracy 0.031Step 44, run 7: accuracy 0Step 46, run 7: accuracy 0.031Step 48, run 7: accuracy 0.031Step 50, run 7: accuracy 0.031Step 52, run 7: accuracy 0.031Step 54, run 7: accuracy 0Step 56, run 7: accuracy 0Step 58, run 7: accuracy 0Step 60, run 7: accuracy 0Step 62, run 7: accuracy 0Step 64, run 7: accuracy 0.094Step 66, run 7: accuracy 0.125Step 68, run 7: accuracy 0.125Step 70, run 7: accuracy 0.125Step 72, run 7: accuracy 0.031Step 74, run 7: accuracy 0Step 76, run 7: accuracy 0Step 78, run 7: accuracy 0Step 80, run 7: accuracy 0Step 82, run 7: accuracy 0Step 84, run 7: accuracy 0Step 86, run 7: accuracy 0Step 88, run 7: accuracy 0Step 90, run 7: accuracy 0.031Step 92, run 7: accuracy 0.031Step 94, run 7: accuracy 0.031Step 96, run 7: accuracy 0.031Step 98, run 7: accuracy 0Step 100, run 7: accuracy 0Step 102, run 7: accuracy 0Step 104, run 7: accuracy 0Step 106, run 7: accuracy 0.031Step 108, run 7: accuracy 0.031Step 110, run 7: accuracy 0.031Step 112, run 7: accuracy 0.094Step 114, run 7: accuracy 0.062Step 116, run 7: accuracy 0.062Step 118, run 7: accuracy 0.062Step 120, run 7: accuracy 0Step 122, run 7: accuracy 0Step 124, run 7: accuracy 0Step 126, run 7: accuracy 0.062Step 128, run 7: accuracy 0.281Step 130, run 7: accuracy 0.344Step 132, run 7: accuracy 0.344Step 134, run 7: accuracy 0.375Step 136, run 7: accuracy 0.188Step 138, run 7: accuracy 0.375Step 140, run 7: accuracy 0.625Step 142, run 7: accuracy 0.719Step 144, run 7: accuracy 0.938Step 146, run 8: accuracy 0.938Step 148, run 8: accuracy 0.688Step 150, run 8: accuracy 0.75Step 152, run 8: accuracy 0.75Step 154, run 8: accuracy 0.5Step 156, run 8: accuracy 0.75Step 158, run 8: accuracy 0.75Step 160, run 8: accuracy 0.75Step 162, run 8: accuracy 1Step 164, run 9: accuracy 1Step 166, run 9: accuracy 0.75Step 168, run 9: accuracy 0.75Step 170, run 9: accuracy 0.75Step 172, run 9: accuracy 0.75Step 174, run 9: accuracy 1Step 176, run 10: accuracy 1Step 178, run 10: accuracy 0.75Step 180, run 10: accuracy 0.75Step 182, run 10: accuracy 0.719Step 184, run 10: accuracy 0.688Step 186, run 10: accuracy 0.938Step 188, run 10: accuracy 0.906Step 190, run 10: accuracy 0.938Step 192, run 10: accuracy 0.719Step 194, run 10: accuracy 0.719Step 196, run 10: accuracy 0.75Step 198, run 10: accuracy 0.75Step 200, run 10: accuracy 1Step 202, run 11: accuracy 1Step 204, run 11: accuracy 0.75Step 206, run 11: accuracy 0.75Step 208, run 11: accuracy 0.719Step 210, run 11: accuracy 0.719Step 212, run 11: accuracy 0.969Step 214, run 11: accuracy 0.969Step 216, run 11: accuracy 1Run 7 (d = 0–3), τ = 0.9: promoted at step 144, acc=0.94Run 8 (d = 1–4), τ = 0.9: promoted at step 162, acc=1.00Run 9 (d = 2–5), τ = 0.9: promoted at step 174, acc=1.00Run 10 (d = 3–6), 64 consec: promoted at step 200, acc=1.00Run 11 (d = 4–7), 64 consec: promoted at step 216, acc=1.00Run 7Runs 8–11accuracyRun 7: d = 0–3, steps 0 to 144Run 8: d = 1–4, steps 144 to 162Run 9: d = 2–5, steps 162 to 174Run 10: d = 3–6, steps 174 to 200Run 11: d = 4–7, steps 200 to 216073d = 0–3difficulty d050100150200144162174200216combined training steps
Figure 5. Accuracy over a 64-sample window against combined training steps for runs 7 to 11 (top), and the difficulty range each run trained on (bottom). The curve and the faint points are traced from the authors’ original training plot, and the dashed lines are its thresholds τ. Diamonds mark each promotion to a harder range: run 7 at step 144 (accuracy 0.94), runs 8 to 11 at steps 162, 174, 200 and 216 (accuracy 1.00 each).

We saw progressive growth in difficulty reached, confirming that adaptive scheduling produces a steady learning signal rather than the saturation (static-low) or starvation (static-high) patterns predicted by the RLVE paper.

Try it yourself

Run a live episode directly in your browser using the embedded demo below. Here is how to get started:

  1. Pick an environment from the dropdown (e.g., E_CART for cart building or E_PD for product discovery).
  2. Set a difficulty — 0 is a simple single-constraint task; 6+ introduces missing information, noisy retrieval, and variant selection.
  3. Click “Reset Episode” — the simulated user will open with a shopping request.
  4. You are the agent now: make tool calls, analyse outputs and submit the final list of product ids.
  5. Click “Reset Episode” between runs to start a fresh scenario.

Resources

Models: WUFUS Catalog data: Amazebay2M Code: GitHub Demo: Space

The environments, verifiers, and training configs are all open-source:

git clone https://github.com/owlgebra-ai/EcomRLVE-Gym
cd EcomRLVE-Gym
pip install -e .

The 2M-product catalog is on the Hub:

from datasets import load_dataset

catalog = load_dataset("owlgebra-ai/Amazebay-catalog-2M", split="train")
print(f"{len(catalog)} products loaded")

References

  1. Zeng, Z., Ivison, H., Wang, Y., et al. (2025). RLVE: Scaling Up Reinforcement Learning for Language Models with Adaptive Verifiable Environments. ICML 2025. arXiv:2511.07317
  2. Yu, Q., Zhang, Z., Zhu, R., et al. (2025). DAPO: An Open-Source LLM Reinforcement Learning System at Scale. arXiv:2503.14476
  3. Shao, Z., Wang, P., Zhu, Q., et al. (2024). DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models. arXiv:2402.03300
  4. DeepSeek-AI. (2025). DeepSeek-R1: Incentivizing Reasoning in LLMs through Reinforcement Learning. Nature.
  5. Meta AI. (2024). Llama 3.1: A Foundation Model for General Intelligence. llama.meta.com
  6. Qwen Team. (2025). Qwen3 Technical Report. arXiv:2505.09388

Originally published on Hugging Face, Apr 16, 2026.