A local AI-powered data exploration application built using PandasAI, Llama 3, and Ollama.
This project allows you to explore, clean, and analyze datasets using natural language queries, all while running completely on your local machine.
Data analysis doesn’t always require complex setups or cloud-based APIs.
This repository demonstrates how to build a simple application that empowers local data exploration using modern Large Language Models (LLMs).
The application combines:
- PandasAI for natural language interaction with Pandas DataFrames
- Llama 3 as the reasoning and language engine
- Ollama to run LLMs locally without relying on external services
PandasAI bridges the gap between Pandas DataFrames and LLMs, enabling:
- Natural language querying
- Data cleaning
- Exploratory analysis
- Automated visualizations
Llama 3 is a powerful open-source Large Language Model from Meta, capable of:
- Question answering
- Summarization
- Code generation
- Reasoning over structured data
Ollama runs LLMs locally and exposes them through a simple API, allowing applications to:
- Send prompts to models like Llama 3
- Receive responses without cloud dependency
- Maintain full data privacy
- 📊 Analyze CSV / tabular data using natural language
- 🧠 Local LLM inference (no API keys required)
- ⚡ Fast iteration with Streamlit UI
- 🔐 Data never leaves your machine
- Python 3.8+
- Ollama installed locally
- Llama 3 model pulled in Ollama
- Basic familiarity with Pandas
git clone https://github.com/GeneralSubhra/Llama-3-with-PandasAI.git
cd Llama-3-with-PandasAIpython -m venv venv
source venv/bin/activate # Linux / macOS
venv\Scripts\activate # Windowspip install -r requirements.txtFollow instructions from: https://ollama.com
ollama pull llama3ollama servestreamlit run app.pyOpen the Streamlit URL shown in your terminal.
- "Show me summary statistics of the dataset"
- "What columns have missing values?"
- "Plot the distribution of age"
- "Find correlations between numerical features"
- Dataset is loaded into a Pandas DataFrame
- PandasAI connects the DataFrame to Llama 3 via Ollama
- User enters a natural language prompt
- LLM interprets the query and generates Pandas code
- Results are returned as text or plots
This project is open-source and available under the MIT License.
Built by Subhranil Paul
Exploring the intersection of LLMs, local AI, and data analysis.