SyntaxSphinx/Itivrit-ai
0
Indian History RAG System ๐ช
A Retrival-Augmented Generation (RAG) system for exploring Indian history using authenticated sources. This application uses Sentence Transformers for semantic search and an Ollama LLM to answer questions about India's rich historical heritage.
Features
- Semantic search across multiple historical texts
- Accurate page citations for all sources
- Beautiful Streamlit UI with Indian-themed styling
- Contextual answers grounded in retrieved documents
Setup
Local Development
- Clone this repository:
git clone <your-repo-url>
cd india-history-rag- Install dependencies:
pip install -r requirements.txt- Download pre-built FAISS index and embeddings:
- Ensure
data/vector_db_faiss/faiss.indexanddata/vector_db_faiss/metadata.jsonare present
- Start Ollama server:
ollama serve
ollama pull mistral:7b- Run the Streamlit app:
streamlit run streamlit_app.pyDeployment
Streamlit Community Cloud
- Push your code to GitHub
- Go to streamlit.io/cloud
- Connect your GitHub repository
- Deploy!
Note: Ensure your FAISS index files are committed to the repository or rebuild them during deployment.
Structure
india-history-rag/
โโโ streamlit_app.py # Main Streamlit UI
โโโ rag_pipeline.py # RAG orchestration
โโโ retriever.py # FAISS-based retrieval
โโโ llm_ollama.py # Ollama LLM client
โโโ generate_embeddings_local.py # Build FAISS index
โโโ data/
โโโ vector_db_faiss/ # FAISS index and metadataLicense
MIT License
