A powerful Retrieval-Augmented Generation (RAG) application that lets you upload PDF documents and have intelligent conversations about their content. Built with Streamlit, LangChain, and Google Gemini AI.
- π PDF Upload & Processing - Upload any PDF document through the web interface
- π§ Intelligent Q&A - Ask questions about your document content in natural language
- π¬ Conversational Memory - Maintains context across questions (example - remembers "she", "it", "that company")
- β‘ Real-time Chat Interface - Modern chat UI
- ποΈ Easy Reset - Clear conversation history or upload new documents anytime
- π Local Processing - Your documents are processed locally for privacy
- Python 3.8+
- Google API Key (for Gemini AI)
-
Clone the repository
git clone https://github.com/yourusername/Knowledge-Retriever-AI.git cd Knowledge-Retriever-AI -
Create virtual environment
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
# Create .env file echo "GOOGLE_API_KEY=your_google_api_key_here" > .env echo "HUGGINGFACE_API_TOKEN=your_huggingface_token_here" >> .env
-
Run the application
streamlit run rag_app.py
-
Open your browser to
http://localhost:8501
- Go to Google AI Studio
- Create a new API key
- Copy the key to your
.envfile
- Go to HuggingFace Settings
- Create a new token
- Copy the token to your
.envfile
- Upload a PDF - Click "Choose a PDF file" in the sidebar
- Process Document - Click "Process PDF" to analyze the document
- Start Chatting - Ask questions in the chat input at the bottom
- Continue Conversation - Ask follow-up questions using pronouns like "she", "it", "that"
Happy Knowledge Retrieving! π