gov_env / README.md
dharunkkk's picture
Upload README.md
e7b7adf verified
---
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