
A 3rd year CS student's attempt to reduce AI's water footprint — EcoCache (A Python Library)
Did you know that every ~20 questions you ask an AI chatbot consumes roughly a 500ml bottle of water for data centre cooling? As AI scales, so does its thirst. A huge chunk of this is pure waste — because we ask LLMs the same things over and over. Every redundant query is a real, physical cost. I'm a 3rd year CS engineering student and I built EcoCache to reduce and measure that waste. What it does EcoCache sits in front of your LLM API calls. Before hitting the model, it checks whether a semantically similar question was already answered. If yes — it returns the cached answer instantly. If no — it calls the API and stores the result for next time. It's not exact string matching. "What is TCP?" and "Can you explain TCP protocols?" are recognised as the same question using vector embeddings and cosine similarity. See it in action from ecocache.client import EcoCacheClient client = EcoCacheClient () # add your Gemini API key to .env # First call — hits the API r1 = client . chat ( " What
Continue reading on Dev.to Python
Opens in a new tab




