wufus-CART-8B is a fine-tuned Qwen3-8B model, created via on-policy DAPO training(RL) using OpenEnv, specialized for multi-turn, tool-augmented e-commerce shopping conversations. The model helps customers discover products, compare variants, analyse user history and build accurate shopping carts through natural dialogue.
Key Capabilities
Product Discovery: Searches a product catalog using formulated queries
Variant Selection: Identifies correct color, size, and other variant attributes
Cart Management: Adds products with correct quantities and variants
Clarification Dialogue: Asks follow-up questions when customer requests are ambiguous
Multi-Item Orders: Handles requests for multiple different products in one conversation
Use the following system prompt for optimal performance:
You are a shopping cart assistant. Help customers add the correct products to their cart.
WORKFLOW:
Step 0 (COUNT): Count how many distinct items the customer wants. Plan one search per item.
Step 1 (GATHER): Call user_get_visit_history. Then call catalog_search ONCE PER ITEM with a focused query.
Step 2 (IDENTIFY): Match each item to a specific product_id from search results.
Step 3 (CLARIFY): If color/size/quantity is missing, call ask_user to get the details.
Step 4 (VARIANTS): Call catalog_get_variants for each product to find the right variant.
Step 5 (ADD): Call cart_add for each item with the correct product_id, variant_id, and quantity.
Step 6 (VERIFY): Call cart_view. Compare cart contents against the original request item-by-item.
MULTI-ITEM EXAMPLE (2 items):
User: "Add a blue phone case and 3 screen protectors"
→ catalog_search("blue phone case")
→ catalog_search("screen protectors")
→ catalog_get_variants(phone_case_id)
→ cart_add(phone_case_id, blue_variant, qty=1)
→ cart_add(protector_id, variant, qty=3)
→ cart_view()
Tool Definitions
The model is trained to use the following tools via native Qwen3 tool-calling format:
catalog_search
Search the product catalog for products matching a text query.
json
1{2"name":"catalog_search",3"parameters":{4"type":"object",5"properties":{6"query":{7"type":"string",8"description":"Natural language description of the desired product."9}10},11"required":["query"]12}13}
Returns: List of product dicts with product_id, title, price, rating, stock_qty, key_attrs.
catalog_get_variants
Get available variants (color, size, etc.) for a specific product.
json
1{2"name":"catalog_get_variants",3"parameters":{4"type":"object",5"properties":{6"product_id":{7"type":"string",8"description":"The product ID to retrieve variants for."9}10},11"required":["product_id"]12}13}
Returns: List of variant dicts with variant_id, attrs (e.g. color, size), price_delta, stock_qty.
cart_add
Add a product to the shopping cart.
json
1{2"name":"cart_add",3"parameters":{4"type":"object",5"properties":{6"product_id":{7"type":"string",8"description":"The product ID to add (from catalog_search results)."9},10"variant_id":{11"type":"string",12"description":"Optional variant ID for specific color/size selection."13},14"quantity":{15"type":"integer",16"description":"Number of units to add. Defaults to 1."17}18},19"required":["product_id"]20}21}
Returns: Updated cart summary with lines (list of items), total_items, total_price.
Returns: List of recently viewed product cards with product_id, title, price, category, brand.
ask_user
Ask the customer a clarification question about their order.
json
1{2"name":"ask_user",3"parameters":{4"type":"object",5"properties":{6"question":{7"type":"string",8"description":"Your question to the customer, e.g. 'What color would you like?' or 'How many do you need?'"9}10},11"required":["question"]12}13}
Returns: The customer's response with the requested information.
Usage with Tool Calling
python
1tools =[2{"type":"function","function":{"name":"catalog_search","description":"Search products","parameters":{"type":"object","properties":{"query":{"type":"string"}},"required":["query"]}}},3{"type":"function","function":{"name":"catalog_get_variants","description":"Get variants for a product","parameters":{"type":"object","properties":{"product_id":{"type":"string"}},"required":["product_id"]}}},4{"type":"function","function":{"name":"cart_add","description":"Add to cart","parameters":{"type":"object","properties":{"product_id":{"type":"string"},"variant_id":{"type":"string"},"quantity":{"type":"integer"}},"required":["product_id"]}}},5{"type":"function","function":{"name":"cart_view","description":"View cart","parameters":{"type":"object","properties":{}}}},6{"type":"function","function":{"name":"user_get_visit_history","description":"Get browsing history","parameters":{"type":"object","properties":{}}}},7{"type":"function","function":{"name":"ask_user","description":"Ask customer a question","parameters":{"type":"object","properties":{"question":{"type":"string"}},"required":["question"]}}},8]910messages =[11{"role":"system","content": SYSTEM_PROMPT},12{"role":"user","content":"I need a pair of running shoes and 3 water bottles"},13]1415text = tokenizer.apply_chat_template(messages, tools=tools, tokenize=False, add_generation_prompt=True)16inputs = tokenizer(text, return_tensors="pt").to(model.device)1718with torch.no_grad():19 outputs = model.generate(**inputs, max_new_tokens=2048, temperature=0.7, do_sample=True)20response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)21print(response)
The model will produce tool calls in Qwen3's native format: