Chat with your CSV data in plain English. No SQL. No formulas. Just ask.
CSV Intelligence is an AI-powered chatbot that lets you have a full conversation with any CSV file.
Upload your data, ask a question, and the agent:
- Writes and executes Python code against your CSV on the fly
- Generates interactive charts (bar, pie, line) rendered in the browser
- Returns a written summary explaining the insight in plain English
No data science skills needed.
| Ask a question | Get a chart + summary |
|---|---|
| "What are the top 10 products by price?" | Bar chart + ranked list |
| "What % of items are Large vs Small?" | Pie chart + percentage breakdown |
| "Show me the distribution of stock values" | Line chart + stats summary |
- 🧠 AI-powered analysis — DeepSeek V3 reasons step-by-step to answer complex data questions
- 📊 Auto visualisation — generates Chart.js HTML charts tailored to the data
- 🔁 Agent caching — the CSV agent is built once and reused, keeping responses fast
- 🎨 Modern UI — dark gradient theme, live progress steps, sidebar CSV preview & stats
- 💬 Sample questions — clickable chips to get started immediately
- 🛡️ Resilient parsing —
json-repairhandles imperfect LLM JSON output gracefully - 🗑️ Auto cleanup — temporary files deleted on exit
| Layer | Technology |
|---|---|
| UI | Streamlit |
| AI Agent | LangChain — ReAct CSV Agent |
| LLM | DeepSeek V3 (deepseek-chat) |
| Data | Pandas |
| Validation | Pydantic |
| Package Manager | uv |
├── ModernChatbot.py # Modern UI — start here
├── Chatbot.py # Original UI
├── csv_agent.py # LangChain ReAct agent (reads & analyses CSV)
├── plotter.py # DeepSeek formatter (generates charts + summaries)
├── pyproject.toml # Dependencies
└── .env # API keys (not committed)
git clone https://github.com/kamalviewcode-spec/Project_6_AI_Agent_CSV_Visual.git
cd Project_6_AI_Agent_CSV_VisualCreate a .env file in the project root:
DEEPSEEK_API_KEY=your_key_here
Get your key at platform.deepseek.com/api_keys
uv syncstreamlit run ModernChatbot.pyYour browser will open at http://localhost:8501
User question
│
▼
LangChain ReAct Agent
→ writes pandas code
→ executes against CSV
→ returns text answer
│
▼
DeepSeek Formatter
→ generates HTML chart
→ writes summary
│
▼
Streamlit UI
→ renders chart in iframe
→ displays summary
This project is licensed under the MIT License — see the LICENSE file for full details.
Free to use, modify, and distribute.
Built with LangChain · DeepSeek · Streamlit · Python