Skip to content

Monuj123/AskDocs_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Document Question Answering System

A document-based question answering system using vector embeddings and retrieval-augmented generation(RAG) powered by OpenAI and ChromaDB.

✨ Features

  • πŸ“‚ Document ingestion from directory
  • βœ‚οΈ Smart text chunking with overlap
  • πŸ” Semantic search with ChromaDB
  • πŸ€– AI-powered answers using GPT-3.5
  • πŸ’Ύ Persistent vector storage
  • πŸ”§ Configurable chunking parameters

πŸš€ Quick Start

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/AskDocs_AI.git
    cd AskDocs_AI
    
  2. Set up virtual environment:
    python -m venv venv
    source venv/bin/activate  # Linux/Mac
    venv\Scripts\activate     # Windows   
  3. Install dependencies:
    pip install -r requirements.txt
  4. Create .env file:
    echo "OPENAI_API_KEY=your_api_key_here" > .env
    

Usage

  1. Add your text documents to ./news_articles directory
  2. Run the system:
    python main.py
  3. Enter your questions when prompted

πŸ›  Configuration

Modify these in main.py:

# Document processing
CHUNK_SIZE = 1000      # Characters per chunk
CHUNK_OVERLAP = 20     # Overlap between chunks

# Query settings
N_RESULTS = 2          # Number of chunks to retrieve

# Model settings
EMBEDDING_MODEL = "text-embedding-3-small"
LLM_MODEL = "gpt-3.5-turbo"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages