cd /news/artificial-intelligence/nirmalair-turning-today-s-smog-readi… · home › topics › artificial-intelligence › article
[ARTICLE · art-178201] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

NirmalAir: turning today's smog reading into a plan for every person at home

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).

recommendation

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.

more in playbook: Verifying model output
by read5 min views6 publishedNov 29, 2026

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.

Every 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?

For 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.

The organisers were clear that the AQI must never come from the model. I took that further and split the job three ways:

Pick 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.

You 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.

Around 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.

On 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:

cleanest         Cleanest time: 1 pm to 4 pm tomorrow.
windows          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.
routine_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.
indoor_shut      With windows shut, the main room is about 78 µg/m³, 33% below outdoors.
indoor_purifier  With windows shut and the purifier on, about 13 µg/m³: about 0.6 cigarettes a day instead of about 5.3 outdoors.

The 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.

The first versions let the model make more decisions. Live testing changed that, one mistake at a time:

The 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).

The 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.

This 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.

One place, one day: 9:30 am, 1 pm, 4:30 pm, 6:30 pm and 9:30 pm.

The 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 re the page.

I 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.

What 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.

If 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.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @nirmalair 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/nirmalair-turning-to…] indexed:0 read:5min 2026-11-29 · —