YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Document Chat with Google Drive
Model Description
This application is a document-based question-answering system that integrates with Google Drive for document ingestion and uses LangChain with local LLMs for generating responses. It provides a Streamlit-based chat interface with source verification and relevancy scoring capabilities.
Model Architecture
The system uses a multi-component architecture:
- Document Processing: Handles multiple file formats (PDF, DOCX, TXT, CSV, XLSX)
- Embedding Model:
sentence-transformers/all-MiniLM-L6-v2for document embedding - Vector Database: FAISS for efficient document retrieval
- Language Model: Local LLM (Ollama) with options for llama3 or mistral
- Frontend: Streamlit-based interactive chat interface
Intended Use
Primary Use Cases
- Document-based question answering
- Enterprise knowledge base interaction
- Customer service automation
- Internal documentation search and retrieval
Out-of-Scope Uses
- General conversation without document context
- Processing of non-text-based media
- Real-time document generation
- Autonomous decision making
Performance and Limitations
Performance Metrics
- Uses cosine similarity for relevancy scoring
- Configurable chunk sizes (default: 512 tokens)
- Chunk overlap: 256 tokens
- Response length: 2-5 sentences (max 100 words)
Limitations
- Requires Google Drive API credentials
- Limited to text-based document formats
- Requires local installation of Ollama
- Memory constraints based on document volume
Training Data
This system doesn't require training as it uses:
- Pre-trained sentence transformers for embeddings
- Pre-trained local LLMs for response generation
- Real-time document processing from user-provided sources
Technical Specifications
Model Dependencies
langchain_community>=0.0.10
langchain_core>=0.1.10
sentence_transformers>=2.2.2
faiss-cpu>=1.7.4
streamlit>=1.29.0
google-auth-oauthlib>=1.2.0
google-auth>=2.23.0
google-api-python-client>=2.100.0
pandas>=2.1.0
Hardware Requirements
- Minimum 8GB RAM
- Storage space dependent on document volume
- CPU with AVX2 support recommended
- GPU optional but recommended for larger document sets
Ethical Considerations
- Privacy: All documents are processed locally
- Data Security: Requires secure handling of Google Drive credentials
- Transparency: Provides source documents for verification
- Accuracy: Includes relevancy scoring for response validation
Deployment
Requirements
- Google Drive API credentials (
credentials.json) - Local Ollama installation
- Python 3.8+
- Required Python packages
Installation Steps
# Clone the repository
git clone [repository-url]
# Install dependencies
pip install -r requirements.txt
# Set up Google Drive credentials
# Place credentials.json in the root directory
# Run the application
streamlit run app.py
Additional Information
Version Control
- Version: 1.0.0
- Last Updated: 2024-11-12
- License: MIT
Contact Information
For support or questions, please open an issue in the GitHub repository.
Citation
If you use this code in your research, please cite:
@software{document_chat_drive,
title = {Document Chat with Google Drive},
year = {2024},
url = {[repository-url]},
version = {1.0.0}
}
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support