Skip to main content
Back to Prompt Library
implementation

Build the application

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build a Seller Multi-Language Product Catalog Generator and Schema Publisher

Format
Code-aware
Lines
75
Sections
11
Linked challenge
Build a Seller Multi-Language Product Catalog Generator and Schema Publisher

Prompt source

Original prompt text with formatting preserved for inspection.

75 lines
11 sections
No variables
1 code block
## Build
Translate single-language merchant inventory sheets into multilingual Beckn catalog payloads. Verify required schema extensions for retail categories across regional languages.

## User
E-commerce onboarding field agent

## Workflow
1. Receive raw catalog spreadsheets in English or Hindi from local retail merchants.
2. Generate compliant product names, search tags, and descriptions across three target languages.
3. Map product attributes to ONDC retail category taxonomy and packaging rules.
4. Output validated Beckn catalog JSON objects for seller gateway synchronization.

## Interface
Multi-column catalog translator and schema validator highlighting untranslated idioms and missing fields.

## Data
Synthesize typical kirana inventory price sheets covering consumer goods, snacks, and household essentials.
Starter examples below are synthetic. They are not downloaded records.

## Source
[ONDC protocol specifications](https://raw.githubusercontent.com/ONDC-Official/ONDC-Protocol-Specs/master/README.md)
Employs ONDC protocol specifications for retail domain schemas and taxonomy classifications.

## Tools
dspy, pydantic.
DSPy compiles few-shot prompt modules to maintain consistent product taxonomy mappings across multiple languages.
Multilingual model supporting English, Hindi, and regional Indic language generation.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Outputs valid Beckn catalog items with language-specific descriptor objects.
- Validates standard pricing structures with proper decimal currency representation.
- Prevents literal translations that alter brand names or technical unit measurements.

## Starter Examples
```json
[
  {
    "input": {
      "sku": "GROC-001",
      "name_en": "Basmati Rice 5kg Pack",
      "price_inr": 450,
      "target_langs": [
        "hi",
        "ta"
      ]
    },
    "expected_output": {
      "catalog_entry": {
        "id": "GROC-001",
        "descriptors": {
          "en": "Basmati Rice 5kg Pack",
          "hi": "Basmati Chawal 5kg Pack",
          "ta": "Basmati Arisi 5kg Pack"
        },
        "price": "450.00",
        "schema_valid": true
      }
    }
  },
  {
    "input": {
      "sku": "ELEC-99",
      "name_en": "LED Bulb 9W",
      "price_inr": -50,
      "target_langs": [
        "hi"
      ]
    },
    "expected_output": {
      "catalog_entry": null,
      "schema_valid": false,
      "validation_errors": [
        "INVALID_PRICE_VALUE"
      ]
    }
  }
]
```

## Safety
Processes synthetic retail inventories only; executes no real catalog publishing or live network broadcasts.
Use mock external writes. Require human review before any real deployment.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.