Skip to main content
Loading navigation

Build a Regional Fertilizer Demand Aggregator — implementation

Prompt source

implementation65 lines11 sectionsNo variables1 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.