Skip to content

vishwaswami24/insight-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InsightDocs AI: Chat with Your PDF

A powerful Streamlit application that allows you to upload PDF documents and chat with them using Retrieval-Augmented Generation (RAG) powered by Google's Gemini AI.

Screenshot 2026-02-04 123147

Features

  • 📄 PDF Upload & Processing: Upload PDF documents and process them for analysis
  • 🤖 AI-Powered Chat: Chat with your documents using Google's Gemini AI models
  • 🔍 Intelligent Retrieval: Uses FAISS vector search for efficient document retrieval
  • 🎨 Modern UI: Clean and intuitive Streamlit interface
  • 🔒 Secure API Key Management: Secure input for your Gemini API key

Prerequisites

  • Python 3.8 or higher
  • A valid Google Gemini API key (get one from Google AI Studio)

Installation

  1. Clone the repository:
git clone <your-repo-url>
cd chat-pdf
  1. Install the required dependencies:
pip install -r requirements.txt

Usage

  1. Run the Streamlit app:
streamlit run app.py
  1. Open your browser and navigate to http://localhost:8501

  2. In the sidebar:

    • Enter your Gemini API key
    • Upload a PDF document
    • Click "Process Document"
  3. Start chatting with your PDF in the chat interface!

Dependencies

  • streamlit: Web app framework
  • langchain: Framework for building LLM applications
  • langchain-community: Community integrations for LangChain
  • langchain-huggingface: HuggingFace integrations
  • langchain-google-genai: Google Generative AI integration
  • pypdf: PDF processing library
  • sentence-transformers: Text embeddings
  • faiss-cpu: Vector similarity search

How It Works

  1. Document Processing: PDFs are loaded and split into manageable chunks
  2. Embeddings: Text chunks are converted to vector embeddings using HuggingFace models
  3. Vector Storage: Embeddings are stored in a FAISS vector database
  4. Retrieval: When you ask a question, relevant document chunks are retrieved
  5. Generation: Gemini AI generates answers based on the retrieved context

Configuration

  • Chunk Size: 1000 characters with 200 character overlap
  • Embedding Model: all-MiniLM-L6-v2 (fast and efficient)
  • Vector Store: FAISS for local similarity search
  • LLM: Google Gemini (configurable in the code)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This application requires a valid Google Gemini API key. Usage costs may apply based on your API usage. Please refer to Google's pricing for more information.

About

InsightDocs AI is a Streamlit-based web application that enables users to upload PDF documents and engage in conversational interactions with them using Retrieval-Augmented Generation (RAG) powered by Google's Gemini AI. Key features include PDF processing, AI-driven chat capabilities, intelligent document retrieval via FAISS vector search.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors