Inspiration
Finding the right public service or government assistance can be surprisingly difficult. People often need to search across multiple portals, understand complicated eligibility requirements, identify the right documents, determine which authority is responsible, and figure out what to do next. During a crisis, this complexity becomes even more difficult.
We built Sahay 2.0 to make civic assistance simpler and more actionable. Instead of expecting people to know which department, scheme, or service they need, Sahay lets them describe their situation naturally and guides them toward relevant public services, crisis assistance, eligibility information, required documents, and practical next steps.
What We Built
Sahay 2.0 is an AI-powered Civic Navigator designed around one simple idea: help people move from a problem to a clear next action.
The platform provides a conversational experience that can understand a user's situation, identify relevant civic assistance, and present useful information in a structured and accessible way.
At the core of Sahay is a multi-stage conversational decision pipeline:
User Message
↓
Intent & Entity Understanding
↓
Context Resolution
↓
Decision Planning
↓
Tool / Knowledge Selection
↓
Tool Execution
↓
Result Validation
↓
Actionable Response
How We Built It
Sahay 2.0 is a modular full-stack application built with a responsive frontend and API-driven backend.
Technology Stack
- Frontend: React + Vite
- Backend: FastAPI
- Validation & Schemas: Pydantic
- Weather Intelligence: Open-Meteo
- Knowledge & Retrieval: RAG and knowledge workflows
- Decision Engine: Multi-stage conversational orchestration
- Testing: Pytest
- Deployment: Vercel
- Tooling: Tool Registry + TTE Sandbox
The architecture is modular so that civic-service data, intelligence workflows, evaluation datasets, and application services can evolve independently.
Conversational Intelligence
One of the main engineering challenges was making Sahay behave like a conversational system rather than a simple keyword-based chatbot.
Sahay uses topic-scoped context for different domains:
- Weather
- Public Services
- Crisis Assistance
- Eligibility
This prevents unrelated information from leaking between different requests.
For example:
Weather in Chennai
↓
Food assistance in Bihar
The Bihar public-service request does not inherit the Chennai weather location.
Explicit information from the current user message also takes precedence over stale conversation context.
For example:
Patna → Supaul → Triveniganj → Chennai
Each explicit new location updates the current request instead of silently reusing an earlier location.
Universal Location Intelligence
Real users do not always provide standardized city names.
They may ask about:
- Cities
- Towns
- Villages
- Districts
- States
- Union Territories
- Capitals
- Countries
- Abbreviations
- Historical names
- Alternate names
- Misspelled locations
- Ambiguous geographic names
Sahay therefore goes beyond a fixed city dictionary.
Its location pipeline combines:
- Location extraction
- Normalization
- Geographic entity classification
- Dynamic geocoding
- Candidate ranking
- Context and jurisdiction validation
- Safe clarification and failure handling
Examples supported by the current system include:
- UP → Uttar Pradesh
- MADRAS → Chennai, Tamil Nadu
- Darbhangha → Darbhanga, Bihar
- Bombay → Mumbai, Maharashtra
- Calcutta → Kolkata, West Bengal
- Bangalore → Bengaluru, Karnataka
For state-level requests, Sahay provides a clearly labeled representative forecast rather than silently treating a state as an unrelated previous city.
Example:
UP → Representative forecast for Uttar Pradesh (Lucknow region)
If an unknown location cannot be confidently resolved, Sahay returns a transparent clarification or failure response instead of silently falling back to an old location.
Temporal Understanding
Sahay dynamically understands temporal expressions such as:
- today
- tomorrow
- day after tomorrow
This allows requests such as:
- Will today rain in Patna?
- Will tomorrow rain in Chennai?
- Will day after tomorrow rain in Triveniganj?
Temporal context is resolved independently from location context, while the current user message takes precedence over older conversational context.
Tool Selection & Validation
Sahay does not blindly trust external tool responses.
For weather workflows, the orchestration layer tracks and validates information such as:
- Requested location
- Normalized location
- Resolved location
- Requested date
- Resolved date
- Tool location
- Tool date
- Validation status
If the returned result does not match the requested location or date, the system can reject the result rather than presenting unrelated information as verified.
This creates a structured flow:
Understand → Decide → Execute → Validate → Respond
Public-Service & Crisis Assistance
Sahay is designed to help users with more than weather.
The platform includes workflows for:
- Public-service discovery
- Government assistance
- Eligibility guidance
- Required document guidance
- Crisis and emergency assistance
- Situation analysis
- Knowledge retrieval
- Actionable next-step recommendations
The objective is to reduce the amount of government-system knowledge a citizen needs before they can take action.
Instead of requiring users to know the exact scheme or department, Sahay starts from the user's problem.
Security & Trust
Because Sahay deals with public-service and potentially crisis-related information, reliability and safety are important design goals.
The system includes:
- Production
SECRET_KEYvalidation - Input validation
- Jurisdiction isolation
- Tool-result validation
- TTE sandbox restrictions
- Prompt-injection defenses
- Structured decision metadata
- No chain-of-thought exposure
The system is designed to be transparent when information cannot be resolved confidently rather than silently guessing.
Challenges
One of the biggest challenges was designing a conversational system that could maintain useful context without allowing stale information to contaminate new requests.
We had to solve several interconnected problems:
- Understanding user intent from natural language
- Resolving locations across different geographic levels
- Handling abbreviations, alternate names, and misspellings
- Separating location context from service and crisis context
- Interpreting dynamic temporal expressions
- Validating external tool results
- Building reliable frontend and backend integration
- Making the application production-ready
The result is a system designed to:
Understand first. Decide second. Validate third. Respond clearly.
What We Learned
Building Sahay 2.0 taught us that effective AI applications are not only about generating fluent responses.
The harder problem is deciding:
What does the user mean?
Which context should be used?
What information is missing?
Which tool should be selected?
Can the returned result be trusted?
What should the user do next?
This pushed us toward a more structured approach to conversational AI that combines semantic understanding, deterministic decision logic, topic-scoped memory, tool selection, external data, and result validation.
We also learned how to take a broad social-impact problem and turn it into a focused, production-oriented full-stack application with automated regression testing and live deployment verification.
Validation & Results
Sahay 2.0 has been verified through automated testing, production builds, API checks, and live production testing.
Verified Results
- 120/120 backend tests passed
- Frontend production build completed successfully
- Backend and frontend service implementations synchronized
- Production health endpoints verified
- Production OpenAPI endpoint verified
- Production weather and location scenarios verified
- Location switching verified
- Temporal switching verified
- Unknown locations handled without silent stale-context fallback
Production Examples
- "will day after tomorrow rain in UP" → Representative forecast for Uttar Pradesh (Lucknow region)
- "will day after tomorrow rain in MADRAS" → Chennai, Tamil Nadu
- "will day after tomorrow rain in Darbhangha" → Darbhanga, Bihar
- "will today rain in Chennai" → Today in Chennai, Tamil Nadu
Hackathon Highlights
- Conversational civic assistance
- Universal location intelligence
- Topic-scoped contextual reasoning
- Temporal-aware weather resolution
- Tool-result validation
- Eligibility workflows
- Crisis assistance
- Production deployment
- Automated regression testing
- Security-focused architecture
What's Next
Sahay can be extended with:
- Broader civic-service coverage
- Multilingual and regional-language assistance
- Stronger source verification
- More personalized eligibility workflows
- Location-aware public-service discovery
- Deeper integrations with official government services
- Offline and low-bandwidth support
- Direct submission workflows where official APIs are available
Our long-term goal is to build a reliable civic navigation layer that makes public assistance easier to discover, understand, and act on.
Sahay 2.0
Find the help you need. Know what to do next.
Built for civic empowerment • Designed for trust • Engineered for impact
Built With
- ai
- css
- fastapi
- github
- postgresql
- python
- react
- sqlalchemy
- tailwind
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.