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 an Assisted Vernacular Trade License Prep and Appointment Scheduler

Format
Code-aware
Lines
121
Sections
11
Linked challenge
Build an Assisted Vernacular Trade License Prep and Appointment Scheduler

Prompt source

Original prompt text with formatting preserved for inspection.

121 lines
11 sections
No variables
1 code block
## Build
Assist micro-merchants in preparing municipal trade license submittals using regional voice transcripts and standard service appointment schemas. Generate validated document checklists and mock appointment booking payloads.

## User
Field business facilitator aiding unorganized micro-retailers with municipal regulatory compliance and trade center verification.

## Workflow
1. Transcribe vernacular voice or dialect audio prompts describing merchant business categories into structured trade classifications.
2. Map regional business descriptions against municipal trade license document requirement matrices and extract key applicant metadata.
3. Inspect extracted application fields to generate a categorized submittal readiness checklist highlighting missing mandatory credentials.
4. Synthesize a mock service booking payload structured with Beckn appointment context headers and local language confirmation summaries.

## Interface
Terminal CLI and local web console displaying dialect audio transcriptions, document completeness matrices, and structured appointment booking slips.

## Data
Download public municipal trade license category definitions and simulate voice interview transcripts across Hindi and Tamil with mock merchant records.
Starter examples below are synthetic. They are not downloaded records.

## Source
[Beckn protocol specifications](https://raw.githubusercontent.com/beckn/protocol-specifications/master/README.md)
Uses the Beckn protocol core packet structure with explicit context and message separation for appointment discovery and booking payloads.

## Tools
mastra-ai, pydantic, fastapi.
Mastra AI provides declarative workflows and structured step chaining suitable for orchestrating multi-stage multilingual extraction and schema assembly.
Hosted or local LLM with strong multilingual Indian language reasoning capabilities and JSON schema adherence.

## 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
- Parses regional language trade declarations and maps them accurately into standardized municipal trade categories.
- Generates an itemized document readiness scorecard flagging missing utility proofs or premise agreements.
- Formats an outbound Beckn-compatible mock appointment registration payload with valid context and message fields.
- Emits a translated vernacular confirmation summary corresponding to the selected applicant language code.

## Starter Examples
```json
[
  {
    "input": {
      "session_id": "TRD-8821",
      "language_code": "hi",
      "spoken_input": "Main Kanpur me stationery aur photocopy ki dukaan chalata hoon, 150 sq ft area hai, trade certificate chahiye",
      "merchant_profile": {
        "applicant_name": "Ramesh Sharma",
        "establishment_name": "Sharma Xerox & Book Stall",
        "premise_type": "leased",
        "area_sqft": 150
      },
      "documents_provided": [
        "rent_agreement",
        "electricity_bill"
      ]
    },
    "expected_output": {
      "trade_category": "Retail Trade - Commercial Paper & Stationery",
      "compliance_status": "ready_for_appointment",
      "required_documents": [
        {
          "name": "rent_agreement",
          "status": "provided"
        },
        {
          "name": "electricity_bill",
          "status": "provided"
        },
        {
          "name": "fire_safety_noc",
          "status": "exempt"
        }
      ],
      "appointment_payload": {
        "context": {
          "domain": "nic:municipal_services",
          "action": "init",
          "version": "1.0.0",
          "bap_id": "mock-citizen-app.gov.in",
          "bpp_id": "mock-kanpur-nagar-nigam.gov.in"
        },
        "message": {
          "appointment": {
            "category_id": "TRADE_LICENSE_VERIFICATION",
            "location_id": "NN_ZONE_3",
            "applicant": {
              "name": "Ramesh Sharma",
              "business": "Sharma Xerox & Book Stall"
            }
          }
        }
      },
      "confirmation_summary_vernacular": "Sharma Xerox ke liye vyapar praman-patra satyapan slot taiyar hai. Sabhi zaroori dastavez uplabdh hain."
    }
  },
  {
    "input": {
      "session_id": "TRD-8822",
      "language_code": "ta",
      "spoken_input": "Enaku Maduraiyil oru tea stall irukku, trade license eduka vendum",
      "merchant_profile": {
        "applicant_name": "K. Murugan",
        "establishment_name": "Murugan Tea Stall",
        "premise_type": "leased",
        "area_sqft": 80
      },
      "documents_provided": []
    },
    "expected_output": {
      "trade_category": "Food and Beverage - Small Eatery / Tea Stall",
      "compliance_status": "action_required",
      "required_documents": [
        {
          "name": "rent_agreement_or_property_tax",
          "status": "missing"
        },
        {
          "name": "fssai_basic_registration",
          "status": "missing"
        }
      ],
      "appointment_payload": null,
      "confirmation_summary_vernacular": "Murugan Tea Stall-kku trade license satyapanathuku vaadagai oppantham matrum FSSAI registration thevai. Slot book seiya mudiyathu."
    }
  }
]
```

## Safety
Ensures no real Aadhaar numbers, tax credentials, or government API endpoints are contacted; strictly executes against simulated municipal sandboxes.
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.