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 Buyer Complaint Audio Transcription and ONDC Issue Drafter

Format
Code-aware
Lines
65
Sections
11
Linked challenge
Build a Buyer Complaint Audio Transcription and ONDC Issue Drafter

Prompt source

Original prompt text with formatting preserved for inspection.

65 lines
11 sections
No variables
1 code block
## Build
Convert buyer complaint voice recordings in regional Indian languages into formal ONDC issue payloads. Map spoken grievances into standard network codes for seller dispute routing.

## User
E-commerce customer service triage agent

## Workflow
1. Process customer voice notes through simulated Bhashini ASR and NMT pipelines.
2. Extract asserted defect facts, order reference IDs, and customer resolution desires.
3. Map vernacular expressions of dissatisfaction to standardized ONDC grievance issue subcategories.
4. Produce formatted Beckn issue transaction payloads for customer service agent sign-off.

## Interface
Grievance listening console with waveform playback, bilingual text view, and Beckn issue draft panel.

## Data
Generate synthetic voice transcripts of buyer issues paired with ONDC issue logging taxonomy tables.
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)
Adopts ONDC protocol draft specifications for buyer-seller issue logging and dispute arbitration.

## Tools
semantic-kernel, pydantic, fastapi.
Enables native integration of multi-step linguistic translation and structured template generation.
Claude API or high-capability open-weights model for dialect idiom interpretation.

## 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
- Transcribe regional audio into standard English issue summaries accurately.
- Assign the correct ONDC issue subcategory based on stated complaint criteria.
- Extract order identifiers and item details into standardized message structures.
- Prevent automatic network dispatch until customer care staff confirms accuracy.

## Starter Examples
```json
[
  {
    "input": {
      "complaint_id": "CMP-302",
      "voice_text": "Mera dabba khula hua mila aur andar ek botal gayab thi order number ONDC-774",
      "source_language": "hi"
    },
    "expected_output": {
      "extracted_order_id": "ONDC-774",
      "issue_category": "ORDER",
      "issue_sub_category": "ORD02_ITEM_MISSING",
      "summary_en": "Package arrived unsealed with one bottle missing from the order.",
      "beckn_action": "issue"
    }
  },
  {
    "input": {
      "complaint_id": "CMP-911",
      "voice_text": "Delivery wala banda badtameezi se baat kar raha tha",
      "source_language": "hi"
    },
    "expected_output": {
      "extracted_order_id": null,
      "issue_category": "FULFILLMENT",
      "issue_sub_category": "FLM04_AGENT_BEHAVIOR",
      "summary_en": "Delivery agent behaved unprofessionally.",
      "beckn_action": "issue",
      "missing_order_reference": true
    }
  }
]
```

## Safety
Does not penalize delivery agents or escalate disputes automatically without human agent oversight.
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.