# Shamba AI (Luna) 🌱
**Shamba AI** is a smart, multilingual agricultural assistant designed to empower farmers in Kenya with instant, reliable, and localized knowledge. By combining advanced AI with curated agricultural expertise, Shamba AI bridges the gap between farmers and critical information.
---
## 🚀 Key Features
- **Retrieval-Augmented Generation (RAG)**: Anchored in verified knowledge bases with **mandatory source citation** (KALRO/KARI).
- **Context-Aware Guidance**: Automatically detects **Location (Counties/Towns)** and **Crops** to tailor advice.
- **Practical Intelligence**: Integrated **Weather forecasts** and **Market commodity prices** for Kenyan staples.
- **Trust & Safety**: Built-in **Safe Dosage Guardrails** and disclaimer layers for all chemical advice.
- **Premium UI/UX**: Stunning **Glassmorphism web interface** with smooth animations and voice-first design.
- **Multilingual Support**: Fully fluent in **Swahili**, **Kikuyu**, and **English**, with automatic language detection.
- **Omni-channel Access**:
- 🌐 **Web Dashboard**: Modern, responsive interface.
- 📱 **SMS (Africa's Talking)**: Low-bandwidth accessibility.
- 💬 **WhatsApp (Twilio)**: Real-time messaging with image support placeholders.
- **Voice Intelligence**: Send voice notes in Swahili or Kikuyu; processed using the **Groq Whisper API**.
---
## 🛠️ The Tech Stack
### AI & Data
- **LLM**: Llama-3.3-70b (via Groq) for blazing-fast inference.
- **Embeddings**: HuggingFace `multilingual-e5-large`.
- **Vector Store**: ChromaDB (Persistent Local Mode).
- **Relational DB**: PostgreSQL (Neon.tech) for managed chat history.
- **STT**: Groq Distil-Whisper for low-latency speech-to-text.
### Development & Hosting
- **Backend**: Python / FastAPI
- **Frontend**: React
- **Deployment**: Render (Backend) & Vercel (Frontend).
---
## 🧠 How it Works
1. **Ingest**: Agricultural manuals (PDF/TXT) are processed, chunked, and stored as vectors in ChromaDB.
2. **Query**: When a farmer asks a que …