About
BudgetLens is an AI-powered interface for Indian government financial data. It lets you ask plain-English questions and get sourced, accurate answers in seconds — a task that currently takes a data journalist 2 days.
The system combines Text-to-SQL (for structured budget and spending queries) with RAG (for document-based questions about CAG audit reports) to answer a wide range of questions.
Data Sources
- Union Budget (Expenditure Profile Statement 3) — FY 2022-23 to 2026-27
- CGA Monthly Accounts — actual spend vs budget, updated monthly
- CAG Audit Reports — findings on government debt, railways, GST, and more
- MGNREGA MIS — district-level fund flows across 37 states/UTs
- State Budgets — sector-wise expenditure for 31 states/UTs via PRS India
How It Works
When you ask a question, a query router classifies it as either a data question (Text-to-SQL) or a document question (RAG). For data questions, AI generates a SQL query against the structured database. For document questions, it searches embedded CAG report chunks and synthesizes an answer with citations.
Every answer includes source references linking back to the original government documents.
Built With
Python, FastAPI, PostgreSQL + pgvector, Claude (Anthropic), OpenAI Embeddings, Next.js, Tailwind CSS, shadcn/ui, Recharts.
Disclaimer
BudgetLens is an experimental tool that uses AI to interpret government financial data. While we strive for accuracy, AI-generated answers may contain errors, misinterpretations, or outdated information. The data is sourced from publicly available government documents which themselves may have revisions or corrections published later.
We actively work to keep our data current. Automated pipelines pull the latest Union Budget documents, CGA monthly accounts, and MGNREGA fund releases as they are published by the government. However, there can be a lag between when new data is released and when it appears on BudgetLens.
Do not rely on BudgetLens as your sole source of truth. Always verify critical figures against the original government documents (linked as sources in each answer) before using them in reporting, research, or decision-making. BudgetLens is not affiliated with or endorsed by any government body.