Chat with your PDF documents using AI. Upload a PDF, ask anything — answers are grounded in your document.
- Frontend/UI — Streamlit
- Embedding —
paraphrase-multilingual-MiniLM-L12-v2(SentenceTransformers) - Vector DB — FAISS
- LLM — Llama 3.3 via Groq API (free)
- Upload PDF directly from the browser
- Automatic chunking & embedding
- Similarity search with FAISS
- Context-grounded answers (RAG)
- Supports English & Indonesian
rag/
├── streamlit_app.py # Main UI
├── vector_store.py # FAISS index
├── retriever.py # Similarity search
├── chain.py # Groq LLM chain
├── requirements.txt
└── src/
├── loader.py # PDF loader
└── embedding.py # Chunking & embedding
1. Clone the repo
git clone https://github.com/givenglorious/rag.git
cd rag2. Install dependencies
pip install -r requirements.txt3. Create .streamlit/secrets.toml
GROQ_API_KEY = "gsk_xxxxxxxxxx"4. Run
streamlit run streamlit_app.py- Push to GitHub
- Go to share.streamlit.io → New app
- Select repo, set main file:
streamlit_app.py - Under Advanced settings → Secrets, add:
GROQ_API_KEY = "gsk_xxxxxxxxxx"- Deploy!
- Sign up at console.groq.com
- Create a new API key
- Paste it into Streamlit secrets