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 Regional Fertilizer Demand Aggregator

Format
Code-aware
Lines
65
Sections
11
Linked challenge
Build a Regional Fertilizer Demand Aggregator

Prompt source

Original prompt text with formatting preserved for inspection.

65 lines
11 sections
No variables
1 code block
## Build
Process vernacular farmer inquiries regarding crop planting intentions. Aggregate required fertilizer varieties across mock taluk registries to generate cooperative procurement requests and simplified seasonal supply estimates using local AI models.

## User
Farmer producer organization coordinator

## Workflow
1. Ingest vernacular farmer voice transcripts detailing upcoming crop planting plans and field sizes.
2. Extract crop types, farm acreage, and requested fertilizer varieties using a local language model.
3. Aggregate required supply metrics across mock taluks for the upcoming planting season.
4. Generate a structured cooperative procurement manifest for regional agricultural suppliers.

## Interface
Command-line processing script that reads mock audio transcripts and outputs tabular fertilizer demand manifests.

## Data
Curate mock vernacular voice transcripts of farmers describing their upcoming planting seasons and requested inputs.
Starter examples below are synthetic. They are not downloaded records.

## Source
[Bhashini documentation](https://bhashini.gitbook.io/bhashini-apis)
Adopts Bhashini pipeline standards for multilingual text processing and translation sequences in agricultural demand aggregation.

## Tools
ollama, pandas, fastapi.
Ollama securely runs localized small language models for vernacular extraction without relying on external cloud APIs.
Local open-weights model capable of vernacular intent extraction and deterministic JSON formatting.

## 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
- Accurately extracts crop type, acreage, and fertilizer type from vernacular text.
- Aggregates total acreage and fertilizer demand by mock taluk ID.
- Formats the final cooperative procurement manifest as a valid JSON or CSV payload.

## Starter Examples
```json
[
  {
    "input": {
      "transcript": "Agle mahine 5 acre me ganna lagana hai, urea chahiye.",
      "taluk_id": "TALUK-01",
      "lang": "hi",
      "farmer_id": "F-101"
    },
    "expected_output": {
      "crop_type": "Sugarcane",
      "acreage": 5,
      "fertilizer_requested": "Urea",
      "aggregation_status": "LOGGED",
      "record_type": "simplified synthetic app record"
    }
  },
  {
    "input": {
      "transcript": "Need DAP for 2 acres of wheat.",
      "taluk_id": "TALUK-02",
      "lang": "en",
      "farmer_id": "F-102"
    },
    "expected_output": {
      "crop_type": "Wheat",
      "acreage": 2,
      "fertilizer_requested": "DAP",
      "aggregation_status": "LOGGED",
      "record_type": "simplified synthetic app record"
    }
  }
]
```

## Safety
Operates entirely on mock cooperative rosters and synthetic farmer IDs; does not collect actual land registry data.
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.