Ashwin Mishra
AI/ML developer · New Delhi, India

ES-RAG: natural-language search over government grievances

August 5, 2025 · #rag #elasticsearch #iit-kanpur

Government grievance portals hold large volumes of unstructured complaint records spanning states, districts, ministries, departments and dates. Staff used to filter them by hand. ES-RAG lets them ask in plain language and returns the most relevant records, cutting manual filtering and search time by about 50%.

How it works

  1. Query translation. An LLM parses the natural-language query for intent and entities (state, district, ministry, department, date, complaint category) and builds a structured Elasticsearch query.
  2. Semantic cache. The query is embedded and compared with previously answered queries. On a hit, the cached results come back directly.
  3. Hybrid retrieval. On a miss, keyword search over structured fields is combined with vector search over free text, and the top 10 records are ranked by combined relevance.
  4. RAG response. The retrieved records go to an LLM, which writes a context-aware answer instead of returning a raw list.

Code: github.com/Ashwin07Mishra/ElasticSearch-Rag

← back to case studies


This is the plain-HTML version of this site — no JavaScript, CSS 2.1 only, built to render in Dillo.
Full version of this page · github · linkedin · resume.pdf · ashwin.mishra07@gmail.com