|
Ever wanted to ask the Gita a question without flipping through 700 verses? This chatbot gets it. Type your question in plain English, and it pulls the most relevant verses, then explains them using Retrieval-Augmented Generation. No hallucinations. No generic wisdom. Just grounded answers from the actual text. |
|
| 🔍 | 💬 | 🎯 |
| Semantic Search | Memory | Zero BS |
| Natural language queries | Remembers conversation | Grounded in actual verses |
| ⚡ | 🎨 | 📱 |
| Streaming | Clean UI | Responsive |
| Real-time responses | No clutter | Works everywhere |
┌──────────────────────────────────────────────────────────────────┐
│ │
│ 👤 YOU │
│ │ "What does Krishna say about dharma?" │
│ │ │
│ ↓ │
│ 🧠 MISTRAL EMBEDDINGS │
│ │ Query → Vector [0.234, 0.891, ...] │
│ │ │
│ ↓ │
│ 🗄️ PINECONE │
│ │ Search 10,000+ pre-embedded Gita chunks │
│ │ Return top 5 most similar verses │
│ │ │
│ ↓ │
│ 📦 CONTEXT BUILDER │
│ │ Combine: Retrieved verses + Chat history + Your query │
│ │ │
│ ↓ │
│ 🤖 GROQ (LLAMA MODEL) │
│ │ Generate answer grounded in retrieved context │
│ │ │
│ ↓ │
│ 💬 STREAM RESPONSE │
│ │ "In Chapter 3, Krishna explains..." │
│ │
└──────────────────────────────────────────────────────────────────┘
+ Gita PDF pre-chunked and embedded in vector DB
+ Query → Embed → Search → Retrieve → Generate → Stream
+ Context stays in chat memory for follow-up questions
- No hallucinations because answers are grounded in retrieved text|
Next.js 14 TailwindCSS Vercel AI SDK |
FastAPI LangChain Uvicorn |
Groq API Mistral Embeddings Pinecone |
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run server
uvicorn main:app --reloadServer runs on: |
cd frontend
# Install dependencies
npm install
# Run dev server
npm run devApp runs on: |
🔐 Environment Variables (click to expand)
Backend .env
GROQ_API_KEY=your_groq_key_here
PINECONE_API_KEY=your_pinecone_key_here
PINECONE_INDEX_NAME=gitarag
MISTRAL_API_KEY=your_mistral_key_hereFrontend .env.local
NEXT_PUBLIC_API_URL=http://localhost:8000