Inspiration
Government assistance programs are designed to help, but their fragmented bureaucracy makes them impossible to navigate. In Indonesia alone, dozens of overlapping programs (PKH, Prakerja, BPJS) operate under different ministries with hidden exclusion clauses.
Applicants often don't know what exists or if they qualify, wasting time only to be rejected over technicalities. We asked: What if everyone had an expert friend who could audit official policy documents and give an honest, direct answer? That is ClaimIt.
What it does
ClaimIt is a situation-first, AI-powered government benefits navigator. Instead of searching by program names, users describe their life situation in plain language ("I lost my job in Indonesia and have 2 kids").
The application evaluates eligibility through a Disqualification-First lens. If a user matches an exclusion rule (e.g., being a civil servant), the AI doesn't give false hope—it explicitly states the rejection reason with citations and immediately "pivots" to alternative programs they can claim.
How we built it
- Architecture: A deterministic 3-node LangGraph.js pipeline (
intakeNode->retrievalNode->synthesizerNode) built with explicit async functions instead of unpredictable black-box agent wrappers. - Resilient 3-Tier Waterfall: To ensure zero downtime during judging, we built a cascading LLM failover: OpenRouter (Tier 1: Gemini 1.5 Flash) -> Google AI Studio (Tier 2: Gemini 2.0 Flash via direct API with a 20s abort timeout) -> Groq (Tier 3: Llama 3.3 70B).
- Zero-Budget RAG: Built a custom serverless markdown parser, generated text embeddings via HuggingFace API (
all-MiniLM-L6-v2), and managed an ultra-fast, in-memory cosine similarity index triggered viaGET /api/ingest. - Tech Stack: Next.js 16 (App Router), LangGraph.js, TypeScript, HuggingFace Inference API, Vanilla CSS.
Challenges we ran into
- The Infinite Intake Loop: The extraction LLM kept asking redundant questions. Fix: Implemented strict code-level guards—a hard turn counter (max 2 turns) and a field-presence trigger to force completion.
- Silent RAG Failures & Hallucinations: Early testing showed the AI missing crucial exclusion rules due to a silent environment variable mismatch. Fix: Corrected the HuggingFace API key binding and injected a mandatory Phase 1 Disqualification Check in the prompt logic.
- Cascading Model Deprecations: Three endpoints broke during dev week due to provider changes. Fix: Updated our error classifier to catch "endpoint not found" errors, allowing the waterfall system to seamlessly absorb API failures.
Accomplishments that we're proud of
- Deterministic Pipeline: 100% predictable state transitions using pure functions within LangGraph.
- Radical Transparency: Every output card features a strict Verdict Badge (Eligible / Verify / Not Ready) and a Source Badge (Verified RAG vs. General Knowledge Fallback).
- Bulletproof Uptime: The 3-tier LLM architecture ensures the app remains fully functional even if two out of three AI providers crash.
What we learned
- Prompting for Honesty is Hard: Forcing an LLM to reliably say "No, you qualify for nothing" requires aggressive negative prompting and rigid structural constraints compared to just prompting it to be "helpful."
- Timeouts > Retries: Network hangs ruin UX. Wrapping direct API calls in an
AbortControlleris non-negotiable for high-stakes hackathon demos.
What's next
- Automated Document Scraping: Build an LLM-driven CRON pipeline to track official government websites, diff policy updates, and auto-ingest new markdown data.
- Offline-First PWA: Cache country-specific embedding vectors locally in the browser to make ClaimIt fully functional in low-connectivity rural environments.
Built With
- css
- googleaistudio
- huggingface-inference-api
- langgraph.js
- next.js-16-(app-router)
- openrouter
- typescript
- vanilla
Log in or sign up for Devpost to join the conversation.