Build an ONDC Dispute Triage Engine with Vercel AI SDK and OpenRouter
In light of over 5.1 lakh e-commerce complaints registered in India, public delivery networks like the Open Network for Digital Commerce (ONDC) require automated, multilingual, and policy-compliant dispute resolution systems. This challenge requires building a real-time e-commerce dispute triage engine using Vercel AI SDK and OpenRouter API, designed to process citizen complaints across multiple Indian languages, parse logistics and transaction telemetry, and generate structured resolution recommendations.
What you are building
The core problem, expected build, and operating context for this challenge.
Build an AI SDK-powered multi-lingual dispute triage pipeline utilizing OpenRouter model switching to automatically analyze ONDC e-commerce customer claims.
How work is evaluated
Evaluates the triage engine's accuracy in classifying complaint severity, extracting transaction IDs, and outputting standardized JSON schema recommendations.
Challenge datasets
Public datasets, plus the private datasets you have access to.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
schema_validation
Output must strictly conform to required JSON schema without missing properties.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
classification_accuracy
Accuracy of grievance_category classification • target: 0.95 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Implement structured output streaming using Vercel AI SDK and TypeScript.
Configure multi-model routing via OpenRouter to dynamically select LLMs based on language and complexity.
Integrate automated fraud detection and refund eligibility scoring against ONDC protocol specifications.
Validate JSON schema compliance for dispute triage outputs under strict runtime bounds.
Reference links and supporting material
Synthetic dataset of 500 multilingual e-commerce dispute records formatted according to ONDC payload structures, including buyer complaints in Hindi, Tamil, Telugu, and English.
Challenge setup
Evaluates the triage engine's accuracy in classifying complaint severity, extracting transaction IDs, and outputting standardized JSON schema recommendations.
Challenge input
JSON object containing multilingual complaint text and transaction metadata
Vercel AI SDK
Used for structured outputs and model invocation.
OpenRouter
Provides unified access to multi-LLM routing.
Evaluated output
Validated JSON object adhering to OndcTriageResult schema
- Output must strictly conform to required JSON schema without missing properties.
- Accuracy of grievance_category classification • target: 0.95 • range: 0-1
- Benchmark: DPI-Bench-Ecom-Disputes
- Classification Accuracy target: 0.95
- 1 public reference case
- JavaScript execution harness
- javascript sandbox (unavailable on Versalist)
Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.
View technical recipe
Configured tools
- Vercel AI SDK · Optional
- Anon · Optional
- OpenRouter · Required
- OpenRouter · Required
- Vercel AI SDK · Optional
Evaluation contract
- schema_validation · Weight 1
- classification_accuracy · Weight 1
Metrics
- classification_accuracy · Target 0.95
Benchmarks
- DPI-Bench-Ecom-Disputes
- general
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: JSON object containing multilingual complaint text and transaction metadata
Output: Validated JSON object adhering to OndcTriageResult schema
Execution harness: JavaScript
Evaluation tools
- Vercel AI SDK · Agent Framework
- OpenRouter · AI Gateway / Model Provider
Recipe freeze marker
No recipe freeze time is recorded.