{"slug": "nirmalair-turning-today-s-smog-reading-into-a-plan-for-every-person-at-home", "title": "NirmalAir: turning today's smog reading into a plan for every person at home", "summary": "A developer built NirmalAir, a generative-AI clean-air assistant for Indian households that converts measured AQI data into per-person daily action plans, with all calculations handled by code and the model restricted to explaining pre-computed facts. In live testing on a Delhi sample household, the system sent the model 20 labelled facts (measured, forecast, estimate or CPCB guidance) and verified that every number in the model's output appeared in a cited fact before display. The project was submitted for PromptWars Virtual Challenge 6 (Urban Air Quality Assistant).", "body_md": "*How I built NirmalAir, a GenAI clean-air assistant for Indian households, where real data decides, code calculates, and the AI is only allowed to explain.*\n\nEvery November the same thing happens. The AQI app on my phone turns red, the number says 288, and the family group fills up with forwards. But a number does not tell you anything you can act on. Can the kids play outside at 5? Should Dadi skip her morning walk, or just move it? When do you open the windows, if ever? Is the bus actually better than the car, or does it just feel virtuous?\n\nFor **PromptWars Virtual Challenge 6 (Urban Air Quality Assistant)** I built the thing I wanted in that moment: tell it who lives in your home, and it turns today's *measured* air into a step for each person, with what each step changes. Meet **NirmalAir**: [nirmal-air.vercel.app](https://nirmal-air.vercel.app).\n\nThe organisers were clear that the AQI must never come from the model. I took that further and split the job three ways:\n\nPick a sample household or describe your own in about a minute: up to eight people with their age group and sensitivities (asthma, heart condition, pregnancy), their routines, their trips, and the home. Type any place in India, or use your location.\n\nYou get a timeline for the day. The next step is set large, every step says who it is for, and its figure sits at the right edge: *1 to 4 pm*, *13 µg/m³*, *−15.7 kg CO₂ a week*. Tap **The numbers behind this** and you see the facts it rests on, each labelled measured, forecast, estimate or CPCB guidance.\n\nAround the plan: a strip of the next 24 hours with the cleanest and worst three-hour windows, an **Ask** box (\"Can Aarav play cricket at 5 pm?\"), an **At home** panel, **Getting around** with the swaps, and **This week**, where ticking \"I did this\" adds up the CO₂ avoided and the change in PM2.5 breathed over seven days.\n\nOn 27 November at 4 pm, ITO in Delhi read AQI 288 (Poor). For the Delhi family sample, code sent the model 20 facts, including these:\n\n```\ncleanest         Cleanest time: 1 pm to 4 pm tomorrow.\nwindows          Today's rule for windows on Poor air: keep windows shut; open them briefly only during the cleanest time, 1 pm to 4 pm tomorrow.\nroutine_1        Aarav's usual outdoor play: 5 pm, for 60 minutes. Today's rule for Poor air and a more sensitive person: move it indoors today.\nindoor_shut      With windows shut, the main room is about 78 µg/m³, 33% below outdoors.\nindoor_purifier  With windows shut and the purifier on, about 13 µg/m³: about 0.6 cigarettes a day instead of about 5.3 outdoors.\n```\n\nThe model wrote, among other steps: *\"Keep windows shut; open briefly only during the cleanest time, 1 pm to 4 pm tomorrow\"*, citing `windows`, `cleanest` and `indoor_shut`. Every number in it is in a cited fact, and before it reached the screen, code checked exactly that. Every plan and answer has a **How this was generated** panel with the model, the prompt version, the facts sent and the raw reply, so nobody has to take my word for it.\n\nThe first versions let the model make more decisions. Live testing changed that, one mistake at a time:\n\nThe pattern held all the way through prompt version 7: every time the AI made a judgement call wrong, the judgement moved into tested code, and the AI was left to explain it. A failed answer is sent back once with the exact problem, then to the next model, and if every model fails, the page shows rules-based advice clearly labelled *Standard advice (not AI-generated)*.\n\nThe explainer session mentioned plants, so I looked it up properly. A 2019 review of chamber studies (Cummings and Waring) found it would take 10 to 1,000 plants per square metre to match a building's normal air exchange. So NirmalAir says it plainly in the At home panel: houseplants do not measurably clean a room's air; the windows rule and a purifier do. Indoor values are estimates from outdoor air, and the page says so.\n\nThis is my favourite detail. At the top of every plan is a band of sky for the place you chose. Code works out sunrise and sunset for that spot, so the sun climbs and sets on its real path, the clouds come from the actual cloud cover, and it rains in the band when it is raining there. After sunset the page turns to dusk and then midnight blue, with the moon and stars.\n\n*One place, one day: 9:30 am, 1 pm, 4:30 pm, 6:30 pm and 9:30 pm.*\n\nThe whole page follows along, and the measured AQI dulls the colours toward smog: on a Very Poor day the sky looks greyer, and there are fewer stars at night. It is decoration only, never carries information you need, and stops moving for anyone who prefers reduced motion. If you would rather choose, the switch in the top bar pins light or dark colours without reloading the page.\n\nI built NirmalAir with an AI coding agent, and I used Gemini in Google Antigravity for an independent review of the code and the problem alignment. Inside the app, Groq's `gpt-oss-120b` usually writes the plan in a few seconds, with Gemini 3.5 and 3.1 Flash-Lite as backups on separate quotas.\n\nWhat I decided: the data sources (CPCB first, the forecast only for timing), no database (the household lives in a signed cookie in your own browser), the name, the look (including the idea that the page follows the sky), and every approval before code. What the AI did under my review: research into the published sources (read from the PDFs themselves), the code and tests, live checks against CPCB and the models, and design reviews.\n\nIf you live with a child who loves the evening cricket match, or a grandparent who will not skip the morning walk, I hope it helps you decide what to do today, and not just how bad the air is.", "url": "https://wpnews.pro/news/nirmalair-turning-today-s-smog-reading-into-a-plan-for-every-person-at-home", "canonical_source": "https://dev.to/mitalipatle/nirmalair-turning-todays-smog-reading-into-a-plan-for-every-person-at-home-4c32", "published_at": "2026-11-29 17:08:36+00:00", "updated_at": "2026-11-29 17:15:34.034800+00:00", "lang": "en", "topics": ["artificial-intelligence", "generative-ai", "ai-agents", "ai-tools"], "entities": ["NirmalAir", "PromptWars Virtual Challenge 6", "Delhi", "CPCB", "Cummings and Waring"], "also_reported_by": [], "takeaway": "Moving every judgement call out of the model and into tested code, then checking that each number in the model's explanation appears in a cited fact, let the assistant produce air-quality plans whose figures are all traceable to measured, forecast or guidance data.", "recommendation": {"advice": "Compute decisions in code and pass the model only labelled facts, then programmatically reject any output containing a number not present in those cited facts before showing it to users.", "playbook": "output-verification", "playbook_url": "https://wpnews.pro/playbooks/output-verification"}, "alternates": {"html": "https://wpnews.pro/news/nirmalair-turning-today-s-smog-reading-into-a-plan-for-every-person-at-home", "markdown": "https://wpnews.pro/news/nirmalair-turning-today-s-smog-reading-into-a-plan-for-every-person-at-home.md", "text": "https://wpnews.pro/news/nirmalair-turning-today-s-smog-reading-into-a-plan-for-every-person-at-home.txt", "jsonld": "https://wpnews.pro/news/nirmalair-turning-today-s-smog-reading-into-a-plan-for-every-person-at-home.jsonld"}}