Local RAG assistant for Royal Enfield motorcycles (v1):
- User chats with problem description
- Retrieval from local dataset stored in ChromaDB
- Gemini generates structured diagnosis/checks/solution strictly from retrieved context
- Chat history saved in SQLite
- Python 3.11+
- Windows 11
- Environment variable:
GEMINI_API_KEY
- Create venv (project-local)
python -m venv venv
venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Set Gemini key
set GEMINI_API_KEY=your_key_hereuvicorn backend.main:app --reload --port 8000streamlit run frontend/app.py --server.port 8501- Start the backend server (see "Run Backend" above)
- In a new terminal, start the Streamlit frontend
- Open browser to
http://localhost:8501 - Describe your Royal Enfield motorcycle issue
- Get AI-generated diagnosis and solutions based on your knowledge base
├── backend/
│ └── main.py # FastAPI backend
├── frontend/
│ └── app.py # Streamlit UI
├── knowledge_base/
│ └── royal_enfield_troubleshooting.csv # RAG dataset
├── vector_db/ # ChromaDB persisted vectors
├── data/
│ └── royal_enfield.db # SQLite chat history
├── requirements.txt
└── README.md
- Dataset:
knowledge_base/royal_enfield_troubleshooting.csv - Vector DB: persisted under
vector_db/ - Chat history: stored in
data/royal_enfield.db