Logo Lanfrica

semereherruy/ai-agri-advisor-rag

Domain:

agriculturenatural language processing

Record type:

softwareproject
Creator:
sem
Host:
AI-powered agriculture advisory chatbot using Retrieval-Augmented Generation (RAG) to deliver localized, multilingual farming guidance for Ethiopian farmers. # 🌾 AI Agriculture Advisor (RAG-based MVP) An AI-powered agriculture question-answering system focused on Teff and Maize, designed for Ethiopia β†’ Africa β†’ Global use. This project uses Retrieval-Augmented Generation (RAG) to answer farmers' questions based on trusted agricultural documents. ## πŸš€ Quick Start ### Backend Setup 1. Navigate to the backend directory: ```bash cd backend ``` 2. Install dependencies: ```bash pip3 install -r requirements.txt ``` **Note:** Use `pip3` and `python3` (macOS default python is 2.7) 3. Run the FastAPI server: ```bash python3 -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 ``` Or use the helper script: ```bash ./start-backend.sh ``` The API will be available at `localhost` ### Frontend Setup 1. Navigate to the frontend directory: ```bash cd frontend ``` 2. Install dependencies: ```bash npm install ``` 3. Start the development server: ```bash npm start ``` The app will open at `localhost` ## πŸ“‹ Project Structure ``` agri-advisor-rag/ β”œβ”€β”€ backend/ # FastAPI backend β”‚ β”œβ”€β”€ main.py # Main FastAPI application β”‚ β”œβ”€β”€ services/ # Service modules β”‚ β”‚ β”œβ”€β”€ rag_service.py # Mock RAG service β”‚ β”‚ β”œβ”€β”€ translation_service.py # Translation with Ge'ez detection β”‚ β”‚ β”œβ”€β”€ logging_service.py # JSONL logging β”‚ β”‚ └── cache_service.py # In-memory cache β”‚ β”œβ”€β”€ requirements.txt # Python dependencies β”‚ └── README.md # Backend documentation β”œβ”€β”€ frontend/ # React frontend β”‚ β”œβ”€β”€ src/ β”‚ β”‚ β”œβ”€β”€ components/ # React components β”‚ β”‚ └── App.tsx # Main app component β”‚ β”œβ”€β”€ package.json # Node dependencies β”‚ └── README.md # Frontend documentation β”œβ”€β”€ data/ # Agricultural documents β”œβ”€β”€ logs/ # Application logs (JSONL) └── README.md # This file ``` ## 🎯 Features ### Backend - **FastAPI** async endpoints - **RAG service** data retrieval - **Translation …