--- title: Gov Env - Government Service Assistant colorFrom: blue colorTo: green sdk: docker app_file: server/app.py pinned: false --- # 🇮🇳 Government Service Application Assistant Environment A production-quality OpenEnv environment that simulates an AI assistant helping users navigate Indian government service applications, with a focus on document validation and correction workflows. ## 🎯 Problem Statement & Motivation ### The Challenge Every year, **~1.3-1.4 crore (13-14 million)** Indian citizens apply for passports alone. With **138+ crore Aadhaar holders** and **2.5-3 crore PAN applications**, the scale is massive. ### The Pain Point **70-80% of government service rejections** are due to: - Document confusion and missing requirements - Name mismatches across documents - Invalid or expired proof documents ### Our Solution An AI agent environment that trains models to: 1. **Identify** required documents for any government service 2. **Validate** submitted documents for completeness and validity 3. **Suggest** corrections for rejected applications --- ## 📋 Action Space ```json { "action_type": "validate_documents", "service_type": "passport_new", "documents": [{"type": "Aadhaar Card", "details": "Valid"}] } ``` | Action | Description | |--------|-------------| | `select_service` | Choose a government service | | `list_required_documents` | Get document requirements | | `validate_documents` | Check submitted documents | | `suggest_corrections` | Get fix suggestions | | `submit_application` | Finalize application | --- ## 📝 Task Descriptions | Task ID | Difficulty | Description | Optimal Steps | |---------|------------|-------------|----------------| | `passport_new_easy` | Easy | Identify required documents | 2 | | `passport_new_medium` | Medium | Validate submitted docs | 3 | | `passport_new_hard` | Hard | Fix incorrect application | 4 | --- ## 💰 Grading System - **Range**: [0.0, 1.0] - **Deterministic**: Same input → same output - **Components**: Document accuracy (0-0.3) + Validation quality (0-0.3) + Efficiency (+/- 0.1) --- ## 🚀 Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/reset` | POST | Initialize environment | | `/step` | POST | Execute action | | `/state` | GET | Get current state | | `/tasks` | GET | Get available tasks | | `/health` | GET | Health check | --- ## 🤖 Running Inference ```bash export HF_TOKEN=your_groq_api_key export ENV_URL=https://dharunkkk-gov-env.hf.space python3 inference.py passport_new_easy ``` ### Output Format ``` [START] task=passport_new_easy env=gov_env model=llama-3.3-70b-versatile [STEP] step=1 action=... reward=1.00 done=false [END] success=true steps=10 score=10.00 ``` --- ## ✅ Validation Checklist - [x] HF Space deploys (HTTP 200) - [x] OpenEnv spec compliance - [x] Dockerfile builds - [x] Baseline runs without errors - [x] 3+ tasks with graders - [x] Grader outputs in [0.0, 1.0] --- ## 📁 Project Structure ``` ├── inference.py ├── Dockerfile ├── requirements.txt ├── openenv.yaml ├── models.py ├── tasks.py ├── grader.py ├── client.py └── server/ ├── app.py └── gov_env_environment.py ``` --- **Live Space**: https://dharunkkk-gov-env.hf.space