Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatBot With Memory

RAG chatbot with persistent conversation history and PDF document querying.


What it does

Upload a PDF and ask questions about it. The chatbot maintains conversation context across turns, retrieves relevant document chunks using vector embeddings, and generates answers via Google Gemini.


Stack

Python LangChain Google Gemini FAISS Streamlit HuggingFace Embeddings


Quick start

git clone https://github.com/umran666/ChatBot_With_Memory.git
cd ChatBot_With_Memory
pip install -r requirements.txt

Create .env with your Google API key:

GOOGLE_API_KEY=your_key_here

Launch:

streamlit run app.py

Upload a PDF in the sidebar and start asking questions.


Architecture

PDF Upload → Text Extraction → Chunking → Embeddings → FAISS Index
                                                           ↓
User Query → Retrieve relevant chunks → LLM → Answer + Sources

Key features

  • Conversation memory — retains history for context-aware follow-ups
  • PDF Q&A — extract and search document content via RAG
  • Semantic search — HuggingFace embeddings + FAISS for fast retrieval
  • Source transparency — shows which document sections informed each answer

Configuration

Parameter Default Description
k (retrieval) 4 Number of document chunks to retrieve
temperature 0.3 LLM response creativity
chunk_size 1000 PDF text split size
chunk_overlap 200 Overlap between chunks

Use cases

  • AI document assistant
  • Research paper Q&A
  • Company knowledge base chatbot
  • Resume / portfolio analyzer
  • Legal document search

Requirements

  • Python 3.8+
  • Google Gemini API key (free tier available)
  • Internet connection

License

MIT

About

An intelligent AI chatbot that remembers conversations and answers questions from your PDF documents using Retrieval-Augmented Generation (RAG)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages