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 Vernacular Voice-Assisted Kirana Inventory Updater

Format
Code-aware
Lines
77
Sections
11
Linked challenge
Build a Vernacular Voice-Assisted Kirana Inventory Updater

Prompt source

Original prompt text with formatting preserved for inspection.

77 lines
11 sections
No variables
1 code block
## Build
Transform regional voice transcripts from small merchants into structured Beckn catalog updates. Verify product evidence, packaging specifications, and real-time stock levels.

## User
Merchant Operations Partner

## Workflow
1. Accept transcribed voice notes describing daily stock additions in regional vernacular.
2. Map transcribed inventory quantities and price terms to standardized ONDC taxonomy IDs.
3. Verify missing packaging evidence or price discrepancy against local baseline fixtures.
4. Produce standardized Beckn on_search item catalog updates for downstream network nodes.

## Interface
Voice transcript reviewer with interactive table for quantity adjustments and Beckn taxonomy badges.

## Data
Create synthetic audio-derived text transcripts in Hindi and Kannada describing grocery items.
Starter examples below are synthetic. They are not downloaded records.

## Source
[Bhashini documentation](https://bhashini.gitbook.io/bhashini-apis)
Applies Bhashini language-task pipeline concepts to process vernacular merchant stock updates.

## Tools
dspy, fastapi, pydantic.
Optimizes prompt extraction modules to reliably parse varied colloquial phrasing into taxonomy fields.
Hosted or local model fine-tuned or prompted for Indian English and regional transliterations.

## 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
- Extracts accurate numerical quantities and units from colloquial transcripts.
- Maps ambiguous merchant phrasing to valid taxonomy categories.
- Produces valid Beckn protocol catalog item updates.
- Highlights unverified evidence items such as missing expiration dates.

## Starter Examples
```json
[
  {
    "input": {
      "merchant_id": "MER-441",
      "transcript": "Aaj 50 packet toor dal 1kg aur 20 bottle refined sunflower oil aaya hai, dal 110 aur tel 140",
      "language": "hi"
    },
    "expected_output": {
      "catalog_updates": [
        {
          "name": "Toor Dal 1kg",
          "quantity": 50,
          "price": 110,
          "category": "grocery_pulses"
        },
        {
          "name": "Refined Sunflower Oil 1L",
          "quantity": 20,
          "price": 140,
          "category": "grocery_edible_oils"
        }
      ],
      "status": "PROCESSED_SUCCESSFULLY"
    }
  },
  {
    "input": {
      "merchant_id": "MER-442",
      "transcript": "Kuch sabzi aaya hai, thoda pyaz thoda aaloo",
      "language": "hi"
    },
    "expected_output": {
      "catalog_updates": [],
      "status": "INCOMPLETE_SPECIFICATION",
      "clarifications_needed": [
        "exact_quantity_onion",
        "price_onion",
        "exact_quantity_potato",
        "price_potato"
      ]
    }
  }
]
```

## Safety
Processes mock merchant inventory; writes updates only to local staging databases.
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.