ClimateInsight is an AI-powered chatbot designed to make information from the Intergovernmental Panel on Climate Change (IPCC) more accessible through natural language conversations. Instead of manually searching through lengthy reports, users can ask questions in plain English and receive context-aware responses grounded in the indexed IPCC reference material.
The project was developed to demonstrate how Retrieval-Augmented Generation (RAG), semantic search, and locally hosted Large Language Models (LLMs) can be combined to create an interpretable, privacy-friendly question-answering system. Rather than relying on cloud-hosted AI services, ClimateInsight performs retrieval and inference locally using Ollama and ChromaDB, making it suitable for experimentation, education, and offline development.
Before starting, ensure you have the following installed:
- Python 3.10 or later
- Git
- Ollama
- (Optional) Cloudflared, if you plan to expose the application externally
Clone the repository to your local machine.
git clone https://github.com/semanticClimate/ClimateInsight.gitcd ClimateInsightReplace ClimateInsight with the repository name if different.
Creating a virtual environment keeps this project's Python packages isolated from packages installed globally on your computer. This prevents dependency conflicts between different Python projects and makes the project easier to reproduce across different machines.
The virtual environment is created inside a folder named .venv.
python -m venv .venvpython3 -m venv .venvAfter creating the virtual environment, activate it before installing any dependencies.
When activated, all Python packages installed using pip will be placed inside .venv rather than your global Python installation.
.\.venv\Scripts\Activate.ps1source .venv/bin/activateOnce activated, your terminal should display something similar to:
(.venv)
at the beginning of the command prompt.
Once the virtual environment is active, install all required Python libraries.
These dependencies include:
- Flask
- ChromaDB
- Sentence Transformers
- LangChain components
- Ollama integration
- Other libraries required by the chatbot
pip install -r requirements.txtpip install -r requirements.txtInstalling packages while the virtual environment is active ensures that they are stored inside .venv instead of your system-wide Python installation.
ClimateInsight uses a locally hosted Large Language Model (LLM) through Ollama for response generation.
Download and install Ollama from:
ollama serveollama serveKeep this terminal running while using the chatbot.
ClimateInsight expects the llama3.2 model.
ollama pull llama3.2:latestollama pull llama3.2:latestThis only needs to be done once.
Place the IPCC HTML reference document at:
data/raw/ipcc_reference.html
This document serves as the chatbot's knowledge base.
ClimateInsight uses a Retrieval-Augmented Generation (RAG) pipeline.
During ingestion, the project will:
- Parse the IPCC document
- Clean the extracted text
- Split the document into semantic chunks
- Generate embeddings
- Store the embeddings inside ChromaDB
Run the ingestion pipeline from the backend directory.
cd backend
python -m ingest.ingestcd backend
python3 -m ingest.ingestNote: During the first ingestion, the embedding model (
all-MiniLM-L6-v2) will automatically be downloaded. This may take several minutes depending on your internet connection.
There are two supported ways to run ClimateInsight during development.
Use this option if you only need to access the chatbot from your own computer.
Open a terminal.
cd backend
python app.pycd backend
python3 app.pyThe backend will run at:
http://localhost:5000
Before starting the frontend, create a file named:
frontend/tunnel-base.txt
The file should contain exactly:
https://localhost:5000
The frontend reads this file to determine which backend endpoint it should communicate with.
For local development, this should point to the localhost backend.
Open a second terminal.
cd frontend
python -m http.server 3000cd frontend
python3 -m http.server 3000Open your browser and visit:
http://localhost:3000
If you want to share the chatbot with others or access it from another device without deploying it to a server, ClimateInsight includes support for Cloudflare Quick Tunnels.
This is the recommended method for external development and testing.
Install the Cloudflare CLI and ensure it is available from your system PATH.
Run the backend as described in Option A.
Run the frontend as described in Option A.
From the project root:
python scripts/inject-tunnel.pypython3 scripts/inject-tunnel.pyThe tunnel utility automatically:
- Creates temporary Cloudflare Quick Tunnels
- Generates a public URL for the frontend
- Generates a public URL for the backend
- Updates the frontend configuration with the active backend tunnel
- Displays both URLs in the terminal
No manual editing of configuration files is required.
Open the generated frontend URL in your browser.
The frontend will automatically communicate with the backend through the generated Cloudflare tunnel.
When finished, press:
Ctrl + C
The tunnel utility will:
- Close both Cloudflare tunnels
- Restore the frontend configuration back to localhost
- Clean up temporary configuration changes