Spaces:
Running
A newer version of the Gradio SDK is available: 6.13.0
title: ShopRLVE Cart Environment
emoji: ๐
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: 6.0.0
app_file: app.py
python_version: '3.12'
pinned: false
license: apache-2.0
ShopRLVE-GYM โ Cart Environment Demo
Interactive demo for the Cart Building environment from ShopRLVE-GYM.
You play the AI agent. A persona-driven simulated customer asks you to find and cart specific products. Use catalog search, cart tools, and chat to fulfill the request, then submit your answer to see the verifiable reward breakdown.
How it works
- Reset an episode at your chosen difficulty (0-10)
- Read the customer's request in the chat
- Use tools (search, get_product, get_variants, cart.add, etc.)
- Chat with the customer for clarification
- Submit your answer with the product IDs in the cart
- See the reward decomposition: r_task (75%), r_eff (15%), r_hall (10%)
Data requirements
Primary: Real Catalog (recommended)
The app prefers a 29.6K stratified real product catalog with a pre-built
FAISS index using Alibaba-NLP/gte-modernbert-base (768-dim) embeddings.
Required files in data/real_catalog_index/:
| File | Size | Description |
|---|---|---|
catalog.jsonl |
7.9 MB | 29,601 products (JSONL: id, title, category, brand, price, rating) |
index.faiss |
87 MB | FAISS Flat index (768-dim, inner product) |
ids.txt |
318 KB | Product ID list matching index order |
meta.json |
138 B | Index metadata |
Build with: python scripts/build_real_catalog_index.py
Source: data/real_product_catalog_stratified.jsonl (29.6K products stratified
from 231K Amazebay catalog โ 5 products per product type across 6000 categories).
Fallback: HuggingFace Dataset
If the real catalog is not found, loads from thebajajra/Amazebay-catalog on
HuggingFace Hub (or a local Arrow dataset), limited to 5000 items. Builds a
FAISS Flat index at startup (~30s on CPU).
Environment variables
| Variable | Default | Description |
|---|---|---|
REAL_CATALOG_PATH |
data/real_catalog_index/catalog.jsonl |
Real catalog JSONL |
REAL_INDEX_DIR |
data/real_catalog_index |
Directory with index.faiss + ids.txt |
CATALOG_PATH |
data/amazebay-2M |
Fallback: HF dataset path |
CATALOG_MAX_ITEMS |
5000 |
Fallback: products to load |
EMBEDDING_MODEL |
Alibaba-NLP/gte-modernbert-base |
Must match index embeddings |
EMBEDDING_DEVICE |
cpu |
Device for query encoding |