🏛️ GovRAG - Intelligent Government Scheme & Policy Retrieval using Retrieval-Augmented Generation (RAG)
GovRAG is an AI-powered Retrieval-Augmented Generation (RAG) system designed to help government officials efficiently retrieve information from large collections of government schemes, policies, circulars, and official documents.
Instead of manually searching through hundreds of documents, the system performs semantic search over indexed government knowledge and generates accurate, context-aware responses using Large Language Models (LLMs).
Government departments maintain thousands of policy documents, schemes, guidelines, and notifications. Retrieving relevant information from these documents using traditional keyword search is time-consuming and often fails to capture the user's intent.
GovRAG addresses this challenge by combining semantic search with Retrieval-Augmented Generation (RAG), enabling intelligent retrieval of relevant information and reducing the time required to access government knowledge.
- 📄 Process large collections of government documents
- 🔍 Semantic search using vector embeddings
- 🤖 AI-generated responses grounded in retrieved documents
- 📚 Context-aware policy and scheme retrieval
- ⚡ Fast document retrieval using vector databases
- 🧠 Embedding-based similarity search
- 📖 Source-aware responses
- 📊 Scalable knowledge retrieval pipeline
Government Documents
(PDFs, Policies, Schemes, Circulars)
│
▼
Document Processing
│
┌──────────────────────────┐
│ Text Extraction │
│ Cleaning │
│ Chunking │
│ Embedding Generation │
└──────────────────────────┘
│
▼
Vector Database
▲
│
Government Officer Query
│
▼
Query Embedding Generation
│
▼
Semantic Similarity Search
│
▼
Retrieve Relevant Chunks
│
▼
LLM + Retrieved Context
│
▼
Contextual Response
- Python
- Streamlit
- Retrieval-Augmented Generation (RAG)
- Large Language Models (LLMs)
- Sentence Embeddings
- Knowledge Graph Integration
- ChromaDB / FAISS
- LangChain
- Hugging Face
- Sentence Transformers
- PyMuPDF
- NumPy
- Pandas
The ingestion pipeline processes government documents before they become searchable.
Steps include:
- Extract text from documents
- Clean and preprocess text
- Split documents into chunks
- Generate embeddings
- Store embeddings inside the vector database
When a government official submits a query:
- Convert the query into an embedding
- Perform semantic similarity search
- Retrieve the most relevant document chunks
- Provide retrieved context to the LLM
- Generate an accurate response grounded in official documents
Traditional LLMs rely only on pretrained knowledge and may generate outdated or hallucinated information.
RAG improves reliability by retrieving relevant information from official government documents before generating responses.
Benefits include:
- Reduced hallucinations
- Faster policy retrieval
- Improved answer accuracy
- Access to updated government documents
- Better decision support
GovRAG/
│
├── frontend/
│
├── chunking.py
├── ingestion_pipeline.py
├── retrieval.py
├── vectorization.py
├── evaluation.py
├── verification.py
├── ingestion_with_images.py
│
├── graph_rag/
│
├── data/
│
├── requirements.txt
│
└── README.md
Government Documents
│
▼
Text Extraction
│
▼
Chunking
│
▼
Embedding Generation
│
▼
Vector Database
▲
│
User Query
│
▼
Query Embedding
│
▼
Semantic Search
│
▼
Relevant Chunks
│
▼
Large Language Model
│
▼
Generated Response
- Hybrid Search (Keyword + Semantic Search)
- Metadata Filtering
- Multi-document Reasoning
- Agentic RAG
- Graph RAG Enhancements
- OCR Support
- Citation Generation
- Query Expansion
- Response Evaluation Dashboard
- Government Departments
- Public Administration
- Policy Analysis
- Scheme Discovery
- Administrative Decision Support
- Citizen Service Portals
- Government Knowledge Management
This project demonstrates practical implementation of:
- Retrieval-Augmented Generation (RAG)
- Semantic Search
- Embedding Models
- Vector Databases
- Knowledge Graph Integration
- Prompt Engineering
- Document Processing Pipelines
- AI-powered Information Retrieval
Developed as part of an AI-powered Government Knowledge Retrieval System that leverages Retrieval-Augmented Generation (RAG), semantic search, and knowledge graph integration to improve the retrieval of government schemes and policy documents.