An open API service indexing awesome lists of open source software.

https://github.com/k0msenapati/waterwise

πŸ’§ Smart Water Chatbot
https://github.com/k0msenapati/waterwise

chainlit chroma docling langchain openrouter python rag uv water

Last synced: 2 months ago
JSON representation

πŸ’§ Smart Water Chatbot

Awesome Lists containing this project

README

          

# πŸ’§ WaterWise

**WaterWise** is an AI-powered chatbot dedicated to educating communities about **water conservation techniques** and **best practices for maintaining clean water**.

It answers questions about water-saving methods, provides practical tips for reducing usage, and raises awareness about the importance of sanitation and sustainable water management.

---

## πŸ“š Knowledge Base Sources

### πŸ“„ PDFs
- [Water Conservation Strategies and Solutions](https://www.researchgate.net/publication/312525328_WATER_CONSERVATION_STRATEGIES_AND_SOLUTIONS)
- [Water For Life – UN](https://www.un.org/esa/sustdev/publications/water_for_life.pdf)
- [Water Conservation Ideas](https://www.wvca.us/wvwrc/pdf/Uploads/Water%20Conservation%20Ideas.pdf)

### 🌐 Web Links
- [A Guide to Water Conservation – The Berkey](https://theberkey.com/pages/a-guide-to-water-conservation)
- [Sustainable Development Goal 6 – Wikiwand](https://www.wikiwand.com/en/articles/Sustainable_Development_Goal_6)
- [Water – Wikiwand](https://www.wikiwand.com/en/articles/water)

---

## πŸ›  Technologies Used
- [LangChain](https://python.langchain.com/docs/) – RAG pipeline & prompt engineering
- [OpenRouter](https://openrouter.ai/) – LLM API provider
- [ChromaDB](https://www.trychroma.com/) – Vector database for storing embeddings
- [Chainlit](https://github.com/Chainlit/chainlit) – Interactive chat interface
- [Python](https://www.python.org/) – Core language
- [uv](https://github.com/astral-sh/uv) – Python package & environment manager

---

## πŸš€ How to Run Locally

### 1️⃣ Clone the repository
```bash
git clone https://github.com/k0msenapati/waterwise.git
```

### 2️⃣ Navigate to the project folder

```bash
cd waterwise
```

### 3️⃣ Install dependencies

```bash
uv sync
```

### 4️⃣ Set environment variables

```bash
export OPENAI_API_KEY=your_openrouter_api_key
```

πŸ’‘ You can get a free API key from [OpenRouter](https://openrouter.ai/).

### 5️⃣ Create the Knowledge Base

```bash
uv run scripts/create_kb.py
```

This step:

* Loads PDFs & URLs from `raw_data/sources.yaml`
* Generates embeddings using **HuggingFace**
* Stores them in **ChromaDB**

### 6️⃣ Start the Chainlit app

```bash
source .venv/bin/activate
chainlit run app.py -w
```

Now open the URL shown in your terminal to start chatting with **WaterWise** πŸ’§.

---

## πŸ’‘ Example Questions

* *"What are some water-related problems?"*
* *"How can I save water at home?"*
* *"What is rainwater harvesting?"*

---

πŸ’§ **Water is life β€” Let’s save it together.**