Skip to main content
Challenge

Build an ONDC Grocery Triage Workflow with LangChain and Metaflow

Hyperlocal grocery ventures struggle with inventory churn and network failure during peak traffic spikes. Build an automated LangChain agent orchestrated via Metaflow to reconcile ONDC seller catalog shifts and flag inventory stockouts in real time. Achieve a 95% detection accuracy on simulated order routing failures.

Business OperationsHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Construct an automated grocery inventory triage pipeline using LangChain agents orchestrated through Metaflow production DAGs.

Delivery guide

How work is evaluated

Evaluation

Evaluates the LangChain and Metaflow pipeline against stockout detection accuracy and execution latency under simulated ONDC message streams.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

schema_conformance

Verifies output conforms to expected ONDC triage JSON structure

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

stockout_accuracy

Accuracy in detecting unavailable items • target: 0.95 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Implement LangChain agents for ONDC network transaction analysis

  • Orchestrate batch and streaming triage pipelines using Metaflow DAGs

  • Process Account Aggregator and ONDC protocol payloads with strict schema validation

  • Achieve real-time inventory alerting and order fallback routing

Resources and assets

Reference links and supporting material

Dataset notes

Simulated ONDC protocol transaction payloads containing catalog queries, stock quantities, and geographic delivery nodes.

Challenge setup

Evaluates the LangChain and Metaflow pipeline against stockout detection accuracy and execution latency under simulated ONDC message streams.

Challenge input

JSON array of ONDC search and select payloads

LangChain

Provides core LLM tool binding and prompt execution components.

Metaflow

Orchestrates batch processing and state transitions for data pipelines.

Evaluated output

JSON object with stockout flags and rerouting decisions

Evaluation checks
  • Verifies output conforms to expected ONDC triage JSON structure
  • Accuracy in detecting unavailable items • target: 0.95 • range: 0-1
Configured evaluation evidence
  • Benchmark: ONDC Fulfillment Reliability Benchmark
  • Stockout Accuracy target: 0.95
  • 1 public reference case
Configured runtime
  • Python execution harness
  • Python 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

Action Space
  • Metaflow · Required
  • Langchain · Optional
  • Meta · Optional
Orchestration
  • Langchain · Optional

Evaluation contract

  • schema_conformance · Weight 1
  • stockout_accuracy · Weight 1

Metrics

  • stockout_accuracy · Target 0.95

Benchmarks

  • ONDC Fulfillment Reliability Benchmark
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON array of ONDC search and select payloads

    Output: JSON object with stockout flags and rerouting decisions

    Execution harness: Python

Evaluation tools

  • LangChain · Agent Framework
  • Metaflow · Workflow Engine

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Build an ONDC Grocery Triage Workflow with LangChain and Metaflow