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 Offline Multilingual Micro-Enterprise Invoice and Tax Ledger

Format
Code-aware
Lines
69
Sections
11
Linked challenge
Build an Offline Multilingual Micro-Enterprise Invoice and Tax Ledger

Prompt source

Original prompt text with formatting preserved for inspection.

69 lines
11 sections
No variables
1 code block
## Build
Parse voice-transcribed sales records in regional dialects to construct GST-compliant offline transaction ledgers. Reconcile input tax credits and calculate net liability summaries for small township storekeepers.

## User
Small merchant business advisor

## Workflow
1. Ingest structured text transcripts from regional merchant purchase orders in Hindi, Marathi, and Kannada.
2. Map informal local commodity names to standardized Harmonized System of Nomenclature (HSN) codes.
3. Compute applicable tax rates across intra-state supply transactions in an offline SQLite datastore.
4. Compile an explainable monthly tax estimate summary for merchant accountant verification.

## Interface
Clean desktop and mobile offline accounting interface with vernacular toggle buttons and tax summary charts.

## Data
Curate synthetic bilingual grocery transactions and standard four-digit HSN mapping tables in SQLite.
Starter examples below are synthetic. They are not downloaded records.

## Source
[Bhashini documentation](https://bhashini.gitbook.io/bhashini-apis)
Utilizes Bhashini NMT pipeline and language identifier conventions to standardize vernacular dialect terms.

## Tools
ollama, sqlite3, pydantic.
Runs local inference for HSN classification directly on merchant devices without network access.
Local quantized Llama or Mistral variant executing on edge hardware via Ollama.

## 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
- Associates vernacular item titles with appropriate 4-digit HSN codes accurately.
- Calculates applicable tax splits correctly between central and state components.
- Operates completely disconnected from the public internet.

## Starter Examples
```json
[
  {
    "input": {
      "invoice_ref": "TX-011",
      "item_raw": "गुड़ की भेली (Jaggery)",
      "quantity_kg": 25,
      "unit_price_inr": 48,
      "intra_state": true
    },
    "expected_output": {
      "hsn_code": "1701",
      "taxable_amount": 1200,
      "cgst_rate_pct": 2.5,
      "sgst_rate_pct": 2.5,
      "total_tax_inr": 60,
      "gross_total_inr": 1260
    }
  },
  {
    "input": {
      "invoice_ref": "TX-012",
      "item_raw": "अखा मसूर (Whole Red Lentils)",
      "quantity_kg": 50,
      "unit_price_inr": 80,
      "intra_state": true
    },
    "expected_output": {
      "hsn_code": "0713",
      "taxable_amount": 4000,
      "cgst_rate_pct": 0,
      "sgst_rate_pct": 0,
      "total_tax_inr": 0,
      "gross_total_inr": 4000
    }
  }
]
```

## Safety
Performs advisory tax estimations only, avoiding automated submissions to revenue authorities or tax portals.
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.