Skip to content

alagarsamy-m/Document-Responder-Multi-AI-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ DOCUMENT RESPONDER MULTI AI AGENT - COMPREHENSIVE PROJECT REPORT

🎯 PROJECT OVERVIEW

Document Responder AI is a cutting-edge multi-agent AI system that revolutionizes how users interact with documents. This privacy-focused solution leverages local AI processing to provide intelligent document analysis, question answering, and knowledge extraction capabilities.

πŸ—οΈ PROJECT STRUCTURE

document_responder_ai_venv_chat_ui/
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ document_processor_agent.py    # Document ingestion & preprocessing
β”‚   β”œβ”€β”€ retriever_agent.py            # Document retrieval & search
β”‚   └── answerer_agent.py             # Question answering with local LLaMA
β”œβ”€β”€ ui/
β”‚   β”œβ”€β”€ main_app.py                   # Main Streamlit application
|
β”œβ”€β”€ chroma_db/                        # Persistent vector database
β”œβ”€β”€ docs/                             # Uploaded documents storage
└── requirements.txt                  # Python dependencies

πŸ”§ TECHNOLOGY STACK

Core Technologies

  • Python 3.8+ - Primary programming language
  • Streamlit - Web framework for interactive UI
  • LangChain - AI orchestration and document processing
  • Ollama - Local LLaMA 3-8B model interface
  • ChromaDB - Vector database for embeddings storage
  • PyMuPDF - PDF text extraction

Key Dependencies

langchain                    # AI orchestration framework
langchain-community          # Community integrations
sentence-transformers        # Embedding models
chromadb                    # Vector database
faiss-cpu                   # Similarity search
unstructured[pdf]           # Document parsing
pymupdf                     # PDF processing
streamlit                   # Web UI framework
torch                       # PyTorch for embeddings

πŸ€– AGENT SYSTEM ARCHITECTURE

1. DocumentProcessorAgent

Purpose: Document ingestion and preprocessing

  • Features:
    • Extract text from PDF, DOCX, TXT files
    • Split documents into 500-character chunks with 50-char overlap
    • Generate embeddings using HuggingFace all-MiniLM-L6-v2
    • Store in persistent Chroma vector database

2. RetrieverAgent

Purpose: Document retrieval and similarity search

  • Features:
    • Load Chroma vector store from disk
    • Create retriever interface for similarity search
    • Retrieve relevant document chunks for queries

3. AnswererAgent

Purpose: Question answering with local LLaMA

  • Features:
    • Interface with local LLaMA 3-8B via Ollama
    • Run RetrievalQA chain for RAG
    • Generate contextual answers from retrieved documents

πŸ”„ WORKFLOW PROCESS

RAG Workflow Implementation

Document Processing Pipeline

  1. Upload β†’ User uploads documents via web interface
  2. Store β†’ Files saved to docs/ folder
  3. Extract β†’ Text extracted based on file type:
    • PDF: PyMuPDF extraction
    • DOCX: Processed with python-docx
    • TXT: Direct text processing
  4. Chunk β†’ Split into 500-character chunks with 50-char overlap
  5. Embed β†’ Generate embeddings using HuggingFace models
  6. Store β†’ Save to Chroma vector database

Query Processing Pipeline

  1. Receive Query β†’ User asks question via chat
  2. Retrieve Context β†’ Similarity search in vector store
  3. Augment Query β†’ Combine with relevant chunks
  4. Generate Answer β†’ LLaMA 3-8B creates response
  5. Display Result β†’ Show answer in chat interface

πŸ”— LOCAL LLAMA 3-8B MODEL ACCESS

Connection Method

  • Interface: Ollama Python client via langchain_community.llms.Ollama
  • Model: llama3:8b (8-billion parameter version)
  • Access: Local HTTP API (default: http://localhost:11434)
  • Configuration:
    from langchain_community.llms import Ollama
    llm = Ollama(model="llama3:8b", temperature=0.2)

Setup Instructions

  1. Install Ollama: Download from https://ollama.ai
  2. Download Model: ollama pull llama3:8b
  3. Start Service: ollama serve

πŸ“„ DOCUMENT PROCESSING DETAILS

Supported Formats

  • PDF: Extracted using PyMuPDF (fitz)
  • DOCX: Processed with python-docx
  • TXT: Direct text processing

Processing Specifications

  • Chunk Size: 500 characters
  • Chunk Overlap: 50 characters
  • Embedding Model: HuggingFace all-MiniLM-L6-v2 (384 dimensions)
  • Vector Database: ChromaDB with cosine similarity
  • Storage: Persistent vector database in chroma_db/

πŸ“Š PROJECT METRICS

Performance Specifications

  • Model Size: 8 billion parameters (LLaMA 3-8B)
  • Embedding Dimensions: 384
  • Response Time: 2-5 seconds per query
  • Supported Languages: English (primary)
  • Storage: Persistent vector database

System Requirements

  • Python: 3.8 or higher
  • Memory: 8GB+ RAM recommended
  • Storage: 2GB+ for model and data
  • OS: Windows 10/11, macOS, or Linux

🎯 USE CASES

Primary Applications

  • Research Document Analysis: Extract insights from academic papers
  • Legal Document Review: Analyze contracts and legal documents
  • Academic Paper Q&A: Ask questions about research papers
  • Technical Documentation: Query technical manuals and guides
  • Report Summarization: Extract key points from reports
  • Knowledge Base Creation: Build searchable document repositories

Target Users

  • Researchers and academics
  • Legal professionals
  • Students and educators
  • Technical writers
  • Business analysts
  • Anyone needing efficient document analysis

πŸš€ GETTING STARTED

Installation

python -m venv venv
venv\Scripts\activate

# 1. Install dependencies
pip install -r requirements.txt

# 2. Download LLaMA 3-8B model
ollama pull llama3:8b
ollama serve

ollama run llama3

# 3. Run the application
streamlit run ui/main_app.py

Quick Start

  1. Upload Documents: Use the web interface to upload PDF, DOCX, or TXT files
  2. Ask Questions: Use the chat interface to ask questions about your documents
  3. Get Answers: Receive contextual answers generated by the local AI model

πŸ”’ PRIVACY & SECURITY

  • Local Processing: All processing happens on your machine
  • No External APIs: No data sent to external services
  • Encrypted Storage: Vector database is stored locally
  • Privacy-First: Designed for sensitive document handling

Document Responder AI - Your intelligent, privacy-focused document analysis companion.

Screenshots

Screenshot 2025-08-05 140103 Screenshot 2025-08-05 140558 Screenshot 2025-08-05 140622 Screenshot 2025-08-05 140732

About

Document Responder - Multi Agent AI - Powered By OpenSource LLM (Llama3 - 8b)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages