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 Multilingual Public Service Policy Navigator with Bhashini
Format
Code-aware
Lines
73
Sections
11
Linked challenge
Build a Multilingual Public Service Policy Navigator with Bhashini
Prompt source
Original prompt text with formatting preserved for inspection.
73 lines
11 sections
No variables
1 code block
## Build
Translate regional citizen service inquiries using simulated Bhashini translation pipelines to assess mock eligibility rules. Generate localized qualification explanations and step-by-step documentation checklists for community field facilitators.
## User
Gram panchayat service facilitator
## Workflow
1. Ingest citizen inquiry text in Indian languages and map ISO-639 language codes via simulated Bhashini pipeline configs.
2. Normalize inquiry criteria such as landholding size, annual household income, and resident state.
3. Evaluate parsed criteria against mock state public benefit policy rules without external government calls.
4. Generate a translated eligibility determination report with specific evidentiary document requirements.
## Interface
Multi-language web form showing original input, Bhashini translation trace, policy rule outcomes, and checklist.
## Data
Create synthetic eligibility policies and synthetic citizen profiles in Hindi, Marathi, and Tamil with English reference translations.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Bhashini documentation](https://bhashini.gitbook.io/bhashini-apis)
Utilizes Bhashini pipeline concepts (Pipeline Config, NMT tasks, ISO-639 language codes) to structure multilingual query flows.
## Tools
dspy, pydantic, fastapi.
DSPy systematically optimizes prompt pipelines to reliably extract structured policy parameters from informal vernacular text.
Instruction-tuned multilingual model capable of processing Indic text and generating strict JSON outputs.
## 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
- Correctly identifies ISO-639 source language and maps to mock Bhashini translation pipeline.
- Accurately extracts numeric income and landholding variables into structured Pydantic models.
- Emits clear eligibility outcome and missing prerequisite documents in both English and target language.
## Starter Examples
```json
[
{
"input": {
"source_lang": "hi",
"query_text": "मेरे पास 1.5 एकड़ ज़मीन है और वार्षिक आय 120000 रुपये है, क्या मैं सोलर पंप योजना के पात्र हूँ?",
"policy_id": "solar_irrigation_2025"
},
"expected_output": {
"target_lang": "hi",
"normalized_criteria": {
"landholding_acres": 1.5,
"annual_income_inr": 120000
},
"eligibility_status": "ELIGIBLE",
"reasoning": "Landholding is under the 5-acre limit and annual income is below 200,000 INR limit.",
"required_documents": [
"Land Ownership Record (Khasra/Khatauni)",
"Income Certificate",
"Electricity Connection NOC"
]
}
},
{
"input": {
"source_lang": "mr",
"query_text": "माझे वार्षिक उत्पन्न 450000 रुपये आहे आणि 6 एकर शेती आहे.",
"policy_id": "solar_irrigation_2025"
},
"expected_output": {
"target_lang": "mr",
"normalized_criteria": {
"landholding_acres": 6,
"annual_income_inr": 450000
},
"eligibility_status": "INELIGIBLE",
"reasoning": "Landholding exceeds maximum limit of 5 acres and income exceeds 200,000 INR limit.",
"required_documents": []
}
}
]
```
## Safety
Mock benefit policies only; no official Aadhaar verification or real administrative determinations are performed.
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.