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
- 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.
- Semantic cache. The query is embedded and compared with previously answered queries. On a hit, the cached results come back directly.
- 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.
- RAG response. The retrieved records go to an LLM, which writes a context-aware answer instead of returning a raw list.