Skip to main content

Add a short description here!

Project description

RAGSkeleton

A foundational, modular framework for building customizable Retrieval-Augmented Generation (RAG) systems across any domain.

Installation via pip

This section is recommended for users who want a quick setup for running RAGSkeleton with minimal configuration.

1. Installation

  • Create a Conda Environment

    To ensure compatibility, first set up a new conda environment:

    conda create -n rag_skeleton python=3.10
    conda activate rag_skeleton
    
  • Install via pip

    Install RAGSkeleton and its dependencies using pip:

    pip install rag_skeleton
    

2. Login to Hugging Face

RAGSkeleton relies on Hugging Face for both the embedding model and the generative language model. Log in to Hugging Face from the terminal to access the necessary models:

huggingface-cli login

Enter your Hugging Face access token when prompted. You can obtain an API token by signing up at [Hugging Face] and navigating to your account settings.

Note: Some models, like Meta LLaMA, may require additional permission from the owner on Hugging Face. To use these models, request access through the model's Hugging Face page, and you’ll be notified when access is granted.

3. Run the RAG System

Run RAGSkeleton with:

rag_skeleton --data_path /path/to/your/pdf/folder --load_mode local --model_name "meta-llama/Llama-3.2-3B-Instruct"
  • --data_path: Path to a directory of PDF files for creating a vector database. If omitted, the system will use the existing knowledge base (if available) or prompt you to provide a path. If you want to ground your RAG on a different set of documents, simply provide the new directory path here, and the system will create a fresh knowledge base.

  • --load_mode: Specify local to use a model hosted on your system, or api to use Hugging Face's API. local mode is suitable if you have the necessary computational resources, while api mode is useful if you prefer not to host the model locally or lack the computational resources.

  • --model_name: Name of the language model to use. Default is "meta-llama/Llama-3.2-3B-Instruct". Any model available on Hugging Face can be specified here, allowing you to choose models best suited to your requirements.

  • --api_token: Required if using the Hugging Face API (--load_mode api).

Note: With the API, you can opt for larger models that might otherwise be challenging to run locally. However, keep in mind that the Hugging Face Free API has a model size limit of 10GB. If you need to use larger models, consider a paid API plan or explore model optimization techniques.

Usage

When you start RAGSkeleton, you’ll be welcomed by a chatbot interface where you can ask questions. The system will retrieve relevant information from the knowledge base and generate responses grounded in the PDF documents you provided.

To exit, type exit.

Documentation

Full documentation is available on Read the Docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rag_skeleton-0.1.4.tar.gz (256.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rag_skeleton-0.1.4-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file rag_skeleton-0.1.4.tar.gz.

File metadata

  • Download URL: rag_skeleton-0.1.4.tar.gz
  • Upload date:
  • Size: 256.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for rag_skeleton-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6f2ec701eb2dd38ab6884d51492e2f0ef0ff920ea346eed232a3fc13d6949bb8
MD5 67189e8c92eb591ea644f31c61ad8b41
BLAKE2b-256 cb7d2dc9d7d9e452b50bcf4b915faa4502ddbd17637109a1433194f8ce64dfab

See more details on using hashes here.

File details

Details for the file rag_skeleton-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: rag_skeleton-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for rag_skeleton-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2c0856fc66123c3804a48aa919f8081340ed6637b5ebea69dd11f7f41e26fd91
MD5 ec18f01d2d31ecce512a575116b53d83
BLAKE2b-256 dec8dbde08437fa4cf60de83e2a7c736c85a4d7273880a41080265f76277fe5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page