Skip to content

A sophisticated PDF document analysis and question-answering application that leverages advanced AI models to provide detailed responses to user queries about PDF documents.

License

Notifications You must be signed in to change notification settings

Prathameshv07/AlyaAloft

Repository files navigation

AlyaAloft: Advanced Document Q&A

AlyaAloft Banner

Overview

AlyaAloft is a powerful document question-answering application that uses the FLAN-T5 language model with enhanced prompting techniques to provide high-quality responses to user queries about document content.

Key Features

  • Advanced Prompting Techniques: Domain-specific templates, chain-of-thought reasoning, and iterative refinement for complex questions
  • Optimized Model Performance: 8-bit quantization for CUDA-enabled devices to reduce memory usage while maintaining quality
  • PDF Document Processing: Extract and chunk document content for efficient retrieval
  • Conversation Memory: Maintain context across multiple user queries
  • Responsive Web Interface: Clean, modern UI for document upload and querying

Screenshots

Screenshot 2025-05-09 185756

Demo & Documentation

Getting Started

Prerequisites

  • Python 3.8+ with pip
  • PyTorch with CUDA support (recommended for faster inference)
  • 4GB+ RAM (8GB+ recommended)
  • 2GB+ free disk space for models

Installation

  1. Clone the repository:

    git clone https://github.com/Prathameshv07/AlyaAloft.git
    cd AlyaAloft
  2. Create a virtual environment in python or conda:

    # create a python virtual environment
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
    # create a conda virtual environment
    conda create -n venv python=3.9
    conda activate venv
  3. Install dependencies:

    pip install -r requirements.txt
  4. Download the FLAN-T5 model:

    python scripts/download_t5_model.py

    For a smaller model (better for limited resources):

    python scripts/download_t5_model.py --model google/flan-t5-small

    For better quality (requires more RAM):

    python scripts/download_t5_model.py --model google/flan-t5-large

Running the Application

Start the application with:

python start_app.py

By default, the server will run on http://127.0.0.1:8000.

Command-line options:

python start_app.py --host 0.0.0.0 --port 9000 --log-level DEBUG

Usage

  1. Open the web interface in your browser at http://127.0.0.1:8000/chat
  2. Upload a PDF document using the upload button
  3. Ask questions about the document in natural language
  4. View responses with reference to the source document

License

License: CC BY-NC 4.0

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.
You are free to use, share, and adapt the material for non-commercial and educational purposes, as long as proper credit is given and any changes are noted.

Learn more: http://creativecommons.org/licenses/by-nc/4.0/

About

A sophisticated PDF document analysis and question-answering application that leverages advanced AI models to provide detailed responses to user queries about PDF documents.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published